From b4dd610612086b6d135ddd79a10e2f7111cd0c8c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:41:43 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#1773) --- .stats.yml | 2 +- .../config_create_params.py | 6 ++++ .../config_edit_params.py | 6 ++++ .../config_update_params.py | 6 ++++ .../magic_network_monitoring/configuration.py | 6 ++++ .../magic_network_monitoring/test_configs.py | 30 +++++++++++++++---- 6 files changed, 49 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6e786352a2..baef4cc43a2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1342 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6561357b4e1771455d4e7524bed0826ab9a169a679fe7c095dce93a743354e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f8773718ab097ba127ddff8348a6c33fb796bffc55b0e7e3ac0eee0124d64cda.yml diff --git a/src/cloudflare/types/magic_network_monitoring/config_create_params.py b/src/cloudflare/types/magic_network_monitoring/config_create_params.py index 70e33517f2f..f69047a7aa8 100644 --- a/src/cloudflare/types/magic_network_monitoring/config_create_params.py +++ b/src/cloudflare/types/magic_network_monitoring/config_create_params.py @@ -31,3 +31,9 @@ class WARPDevice(TypedDict, total=False): name: Required[str] """Name of the warp device.""" + + router_ip: Required[str] + """IPv4 CIDR of the router sourcing flow data associated with this warp device. + + Only /32 addresses are currently supported. + """ diff --git a/src/cloudflare/types/magic_network_monitoring/config_edit_params.py b/src/cloudflare/types/magic_network_monitoring/config_edit_params.py index 62c2c9c23d6..37de63cadc7 100644 --- a/src/cloudflare/types/magic_network_monitoring/config_edit_params.py +++ b/src/cloudflare/types/magic_network_monitoring/config_edit_params.py @@ -31,3 +31,9 @@ class WARPDevice(TypedDict, total=False): name: Required[str] """Name of the warp device.""" + + router_ip: Required[str] + """IPv4 CIDR of the router sourcing flow data associated with this warp device. + + Only /32 addresses are currently supported. + """ diff --git a/src/cloudflare/types/magic_network_monitoring/config_update_params.py b/src/cloudflare/types/magic_network_monitoring/config_update_params.py index 3c870de4518..7d51f59ce97 100644 --- a/src/cloudflare/types/magic_network_monitoring/config_update_params.py +++ b/src/cloudflare/types/magic_network_monitoring/config_update_params.py @@ -31,3 +31,9 @@ class WARPDevice(TypedDict, total=False): name: Required[str] """Name of the warp device.""" + + router_ip: Required[str] + """IPv4 CIDR of the router sourcing flow data associated with this warp device. + + Only /32 addresses are currently supported. + """ diff --git a/src/cloudflare/types/magic_network_monitoring/configuration.py b/src/cloudflare/types/magic_network_monitoring/configuration.py index 8be6148bf42..462a3ef6e7d 100644 --- a/src/cloudflare/types/magic_network_monitoring/configuration.py +++ b/src/cloudflare/types/magic_network_monitoring/configuration.py @@ -14,6 +14,12 @@ class WARPDevice(BaseModel): name: str """Name of the warp device.""" + router_ip: str + """IPv4 CIDR of the router sourcing flow data associated with this warp device. + + Only /32 addresses are currently supported. + """ + class Configuration(BaseModel): default_sampling: float diff --git a/tests/api_resources/magic_network_monitoring/test_configs.py b/tests/api_resources/magic_network_monitoring/test_configs.py index d29de1d3b3f..ac018d0f5fb 100644 --- a/tests/api_resources/magic_network_monitoring/test_configs.py +++ b/tests/api_resources/magic_network_monitoring/test_configs.py @@ -34,19 +34,22 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="6f91088a406011ed95aed352566e8d4c", default_sampling=1, name="cloudflare user's account", - router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"], + router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"], warp_devices=[ { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, ], ) @@ -104,19 +107,22 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: account_id="6f91088a406011ed95aed352566e8d4c", default_sampling=1, name="cloudflare user's account", - router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"], + router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"], warp_devices=[ { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, ], ) @@ -210,19 +216,22 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: account_id="6f91088a406011ed95aed352566e8d4c", default_sampling=1, name="cloudflare user's account", - router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"], + router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"], warp_devices=[ { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, ], ) @@ -316,19 +325,22 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="6f91088a406011ed95aed352566e8d4c", default_sampling=1, name="cloudflare user's account", - router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"], + router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"], warp_devices=[ { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, ], ) @@ -386,19 +398,22 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare account_id="6f91088a406011ed95aed352566e8d4c", default_sampling=1, name="cloudflare user's account", - router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"], + router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"], warp_devices=[ { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, ], ) @@ -492,19 +507,22 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) account_id="6f91088a406011ed95aed352566e8d4c", default_sampling=1, name="cloudflare user's account", - router_ips=["203.0.113.1/32", "203.0.113.1/32", "203.0.113.1/32"], + router_ips=["203.0.113.1", "203.0.113.1", "203.0.113.1"], warp_devices=[ { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, { "id": "5360368d-b351-4791-abe1-93550dabd351", "name": "My warp device", + "router_ip": "203.0.113.1", }, ], )