From 4ae5600e32116d64cb0f349bc8630e5220945eb0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 31 May 2024 22:07:59 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API --- .stats.yml | 2 +- .../resources/zero_trust/dex/colos.py | 24 ++-- .../zero_trust/dex/fleet_status/devices.py | 42 ++++-- .../dex/fleet_status/fleet_status.py | 24 ++-- .../zero_trust/dex/http_tests/http_tests.py | 28 ++-- .../zero_trust/dex/http_tests/percentiles.py | 24 ++-- .../zero_trust/dex/traceroute_tests.py | 80 +++++------ .../types/zero_trust/dex/colo_list_params.py | 8 +- .../dex/fleet_status/device_list_params.py | 18 ++- .../dex/fleet_status_over_time_params.py | 8 +- .../zero_trust/dex/http_test_get_params.py | 8 +- .../dex/http_tests/percentile_get_params.py | 8 +- .../dex/traceroute_test_get_params.py | 8 +- .../traceroute_test_network_path_params.py | 8 +- .../dex/traceroute_test_percentiles_params.py | 8 +- .../network_path_get_response.py | 3 - .../dex/fleet_status/test_devices.py | 50 ++++--- .../dex/http_tests/test_percentiles.py | 48 +++---- .../zero_trust/dex/test_colos.py | 40 +++--- .../zero_trust/dex/test_fleet_status.py | 40 +++--- .../zero_trust/dex/test_http_tests.py | 48 +++---- .../zero_trust/dex/test_traceroute_tests.py | 136 +++++++++--------- 22 files changed, 350 insertions(+), 313 deletions(-) diff --git a/.stats.yml b/.stats.yml index b3c2fa72c4a..62a18d0f9d3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1321 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a18a8d7f1f80a39beb83a6541eb29dea4a69df37444aeb85493c94256c11d3a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7080386fb1d04dafc80523803a44e41bab56e2907c13694ced938d02a3abb9d5.yml diff --git a/src/cloudflare/resources/zero_trust/dex/colos.py b/src/cloudflare/resources/zero_trust/dex/colos.py index 6423b82ef5a..82c072ad419 100644 --- a/src/cloudflare/resources/zero_trust/dex/colos.py +++ b/src/cloudflare/resources/zero_trust/dex/colos.py @@ -39,8 +39,8 @@ def list( self, *, account_id: str, - time_end: str, - time_start: str, + from_: str, + to: str, sort_by: Literal["fleet-status-usage", "application-tests-usage"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -55,9 +55,9 @@ def list( are also returned and sorted alphabetically. Args: - time_end: End time for connection period in RFC3339 (ISO 8601) format. + from_: Start time for connection period in RFC3339 (ISO 8601) format. - time_start: Start time for connection period in RFC3339 (ISO 8601) format. + to: End time for connection period in RFC3339 (ISO 8601) format. sort_by: Type of usage that colos should be sorted by. If unspecified, returns all Cloudflare colos sorted alphabetically. @@ -82,8 +82,8 @@ def list( timeout=timeout, query=maybe_transform( { - "time_end": time_end, - "time_start": time_start, + "from_": from_, + "to": to, "sort_by": sort_by, }, colo_list_params.ColoListParams, @@ -106,8 +106,8 @@ def list( self, *, account_id: str, - time_end: str, - time_start: str, + from_: str, + to: str, sort_by: Literal["fleet-status-usage", "application-tests-usage"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -122,9 +122,9 @@ def list( are also returned and sorted alphabetically. Args: - time_end: End time for connection period in RFC3339 (ISO 8601) format. + from_: Start time for connection period in RFC3339 (ISO 8601) format. - time_start: Start time for connection period in RFC3339 (ISO 8601) format. + to: End time for connection period in RFC3339 (ISO 8601) format. sort_by: Type of usage that colos should be sorted by. If unspecified, returns all Cloudflare colos sorted alphabetically. @@ -149,8 +149,8 @@ def list( timeout=timeout, query=maybe_transform( { - "time_end": time_end, - "time_start": time_start, + "from_": from_, + "to": to, "sort_by": sort_by, }, colo_list_params.ColoListParams, 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 34a786574f9..1aec99e00cf 100644 --- a/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py +++ b/src/cloudflare/resources/zero_trust/dex/fleet_status/devices.py @@ -40,10 +40,11 @@ def list( self, *, account_id: str, + from_: str, page: float, per_page: float, - time_end: str, - time_start: str, + source: Literal["last_seen", "hourly", "raw"], + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: str | NotGiven = NOT_GIVEN, mode: str | NotGiven = NOT_GIVEN, @@ -63,13 +64,20 @@ def list( List details for devices using WARP Args: + from_: Timestamp in ISO format + page: Page number of paginated results per_page: Number of items per page - time_end: Timestamp in ISO format + source: + Source: + + - `hourly` - device details aggregated hourly, up to 7 days prior + - `last_seen` - device details, up to 24 hours prior + - `raw` - device details, up to 7 days prior - time_start: Timestamp in ISO format + to: Timestamp in ISO format colo: Cloudflare colo @@ -105,10 +113,11 @@ def list( timeout=timeout, query=maybe_transform( { + "from_": from_, "page": page, "per_page": per_page, - "time_end": time_end, - "time_start": time_start, + "source": source, + "to": to, "colo": colo, "device_id": device_id, "mode": mode, @@ -137,10 +146,11 @@ def list( self, *, account_id: str, + from_: str, page: float, per_page: float, - time_end: str, - time_start: str, + source: Literal["last_seen", "hourly", "raw"], + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: str | NotGiven = NOT_GIVEN, mode: str | NotGiven = NOT_GIVEN, @@ -160,13 +170,20 @@ def list( List details for devices using WARP Args: + from_: Timestamp in ISO format + page: Page number of paginated results per_page: Number of items per page - time_end: Timestamp in ISO format + source: + Source: + + - `hourly` - device details aggregated hourly, up to 7 days prior + - `last_seen` - device details, up to 24 hours prior + - `raw` - device details, up to 7 days prior - time_start: Timestamp in ISO format + to: Timestamp in ISO format colo: Cloudflare colo @@ -202,10 +219,11 @@ def list( timeout=timeout, query=maybe_transform( { + "from_": from_, "page": page, "per_page": per_page, - "time_end": time_end, - "time_start": time_start, + "source": source, + "to": to, "colo": colo, "device_id": device_id, "mode": mode, 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 23033b3ea99..fd44aab6d52 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 @@ -95,8 +95,8 @@ def over_time( self, *, account_id: str, - time_end: str, - time_start: str, + from_: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_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. @@ -110,9 +110,9 @@ def over_time( List details for devices using WARP, up to 7 days Args: - time_end: Timestamp in ISO format + from_: Timestamp in ISO format - time_start: Timestamp in ISO format + to: Timestamp in ISO format colo: Cloudflare colo @@ -138,8 +138,8 @@ def over_time( timeout=timeout, query=maybe_transform( { - "time_end": time_end, - "time_start": time_start, + "from_": from_, + "to": to, "colo": colo, "device_id": device_id, }, @@ -210,8 +210,8 @@ async def over_time( self, *, account_id: str, - time_end: str, - time_start: str, + from_: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_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. @@ -225,9 +225,9 @@ async def over_time( List details for devices using WARP, up to 7 days Args: - time_end: Timestamp in ISO format + from_: Timestamp in ISO format - time_start: Timestamp in ISO format + to: Timestamp in ISO format colo: Cloudflare colo @@ -253,8 +253,8 @@ async def over_time( timeout=timeout, query=await async_maybe_transform( { - "time_end": time_end, - "time_start": time_start, + "from_": from_, + "to": to, "colo": colo, "device_id": device_id, }, 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 31b71442618..efeb1dec67e 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 @@ -56,9 +56,9 @@ def get( test_id: str, *, account_id: str, + from_: str, interval: Literal["minute", "hour"], - time_end: str, - time_start: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: 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. @@ -75,11 +75,11 @@ def get( Args: test_id: API Resource UUID tag. - interval: Time interval for aggregate time slots. + from_: Start time for aggregate metrics in ISO ms - time_end: End time for aggregate metrics in ISO ms + interval: Time interval for aggregate time slots. - time_start: Start time for aggregate metrics in ISO ms + to: End time for aggregate metrics in ISO ms colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -108,9 +108,9 @@ def get( timeout=timeout, query=maybe_transform( { + "from_": from_, "interval": interval, - "time_end": time_end, - "time_start": time_start, + "to": to, "colo": colo, "device_id": device_id, }, @@ -140,9 +140,9 @@ async def get( test_id: str, *, account_id: str, + from_: str, interval: Literal["minute", "hour"], - time_end: str, - time_start: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: 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. @@ -159,11 +159,11 @@ async def get( Args: test_id: API Resource UUID tag. - interval: Time interval for aggregate time slots. + from_: Start time for aggregate metrics in ISO ms - time_end: End time for aggregate metrics in ISO ms + interval: Time interval for aggregate time slots. - time_start: Start time for aggregate metrics in ISO ms + to: End time for aggregate metrics in ISO ms colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -192,9 +192,9 @@ async def get( timeout=timeout, query=await async_maybe_transform( { + "from_": from_, "interval": interval, - "time_end": time_end, - "time_start": time_start, + "to": to, "colo": colo, "device_id": device_id, }, 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 b8b4330a11c..3f38cee74f1 100644 --- a/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py +++ b/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py @@ -43,8 +43,8 @@ def get( test_id: str, *, account_id: str, - time_end: str, - time_start: str, + from_: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: 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. @@ -61,9 +61,9 @@ def get( Args: test_id: API Resource UUID tag. - time_end: End time for aggregate metrics in ISO format + from_: Start time for aggregate metrics in ISO format - time_start: Start time for aggregate metrics in ISO format + to: End time for aggregate metrics in ISO format colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -92,8 +92,8 @@ def get( timeout=timeout, query=maybe_transform( { - "time_end": time_end, - "time_start": time_start, + "from_": from_, + "to": to, "colo": colo, "device_id": device_id, }, @@ -119,8 +119,8 @@ async def get( test_id: str, *, account_id: str, - time_end: str, - time_start: str, + from_: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: 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. @@ -137,9 +137,9 @@ async def get( Args: test_id: API Resource UUID tag. - time_end: End time for aggregate metrics in ISO format + from_: Start time for aggregate metrics in ISO format - time_start: Start time for aggregate metrics in ISO format + to: End time for aggregate metrics in ISO format colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -168,8 +168,8 @@ async def get( timeout=timeout, query=await async_maybe_transform( { - "time_end": time_end, - "time_start": time_start, + "from_": from_, + "to": to, "colo": colo, "device_id": device_id, }, diff --git a/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py b/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py index ebbf05826a8..865312380a0 100644 --- a/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py +++ b/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py @@ -50,9 +50,9 @@ def get( test_id: str, *, account_id: str, + from_: str, interval: Literal["minute", "hour"], - time_end: str, - time_start: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: 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. @@ -69,11 +69,11 @@ def get( Args: test_id: API Resource UUID tag. - interval: Time interval for aggregate time slots. + from_: Start time for aggregate metrics in ISO ms - time_end: End time for aggregate metrics in ISO ms + interval: Time interval for aggregate time slots. - time_start: Start time for aggregate metrics in ISO ms + to: End time for aggregate metrics in ISO ms colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -102,9 +102,9 @@ def get( timeout=timeout, query=maybe_transform( { + "from_": from_, "interval": interval, - "time_end": time_end, - "time_start": time_start, + "to": to, "colo": colo, "device_id": device_id, }, @@ -121,9 +121,9 @@ def network_path( *, account_id: str, device_id: str, + from_: str, interval: Literal["minute", "hour"], - time_end: str, - time_start: str, + to: 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, @@ -139,11 +139,11 @@ def network_path( device_id: Device to filter tracroute result runs to - interval: Time interval for aggregate time slots. + from_: Start time for aggregate metrics in ISO ms - time_end: End time for aggregate metrics in ISO ms + interval: Time interval for aggregate time slots. - time_start: Start time for aggregate metrics in ISO ms + to: End time for aggregate metrics in ISO ms extra_headers: Send extra headers @@ -167,9 +167,9 @@ def network_path( query=maybe_transform( { "device_id": device_id, + "from_": from_, "interval": interval, - "time_end": time_end, - "time_start": time_start, + "to": to, }, traceroute_test_network_path_params.TracerouteTestNetworkPathParams, ), @@ -183,8 +183,8 @@ def percentiles( test_id: str, *, account_id: str, - time_end: str, - time_start: str, + from_: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: 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. @@ -201,9 +201,9 @@ def percentiles( Args: test_id: API Resource UUID tag. - time_end: End time for aggregate metrics in ISO format + from_: Start time for aggregate metrics in ISO format - time_start: Start time for aggregate metrics in ISO format + to: End time for aggregate metrics in ISO format colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -232,8 +232,8 @@ def percentiles( timeout=timeout, query=maybe_transform( { - "time_end": time_end, - "time_start": time_start, + "from_": from_, + "to": to, "colo": colo, "device_id": device_id, }, @@ -261,9 +261,9 @@ async def get( test_id: str, *, account_id: str, + from_: str, interval: Literal["minute", "hour"], - time_end: str, - time_start: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: 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. @@ -280,11 +280,11 @@ async def get( Args: test_id: API Resource UUID tag. - interval: Time interval for aggregate time slots. + from_: Start time for aggregate metrics in ISO ms - time_end: End time for aggregate metrics in ISO ms + interval: Time interval for aggregate time slots. - time_start: Start time for aggregate metrics in ISO ms + to: End time for aggregate metrics in ISO ms colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -313,9 +313,9 @@ async def get( timeout=timeout, query=await async_maybe_transform( { + "from_": from_, "interval": interval, - "time_end": time_end, - "time_start": time_start, + "to": to, "colo": colo, "device_id": device_id, }, @@ -332,9 +332,9 @@ async def network_path( *, account_id: str, device_id: str, + from_: str, interval: Literal["minute", "hour"], - time_end: str, - time_start: str, + to: 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, @@ -350,11 +350,11 @@ async def network_path( device_id: Device to filter tracroute result runs to - interval: Time interval for aggregate time slots. + from_: Start time for aggregate metrics in ISO ms - time_end: End time for aggregate metrics in ISO ms + interval: Time interval for aggregate time slots. - time_start: Start time for aggregate metrics in ISO ms + to: End time for aggregate metrics in ISO ms extra_headers: Send extra headers @@ -378,9 +378,9 @@ async def network_path( query=await async_maybe_transform( { "device_id": device_id, + "from_": from_, "interval": interval, - "time_end": time_end, - "time_start": time_start, + "to": to, }, traceroute_test_network_path_params.TracerouteTestNetworkPathParams, ), @@ -394,8 +394,8 @@ async def percentiles( test_id: str, *, account_id: str, - time_end: str, - time_start: str, + from_: str, + to: str, colo: str | NotGiven = NOT_GIVEN, device_id: 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. @@ -412,9 +412,9 @@ async def percentiles( Args: test_id: API Resource UUID tag. - time_end: End time for aggregate metrics in ISO format + from_: Start time for aggregate metrics in ISO format - time_start: Start time for aggregate metrics in ISO format + to: End time for aggregate metrics in ISO format colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -443,8 +443,8 @@ async def percentiles( timeout=timeout, query=await async_maybe_transform( { - "time_end": time_end, - "time_start": time_start, + "from_": from_, + "to": to, "colo": colo, "device_id": device_id, }, diff --git a/src/cloudflare/types/zero_trust/dex/colo_list_params.py b/src/cloudflare/types/zero_trust/dex/colo_list_params.py index f078937ff17..975e137ecac 100644 --- a/src/cloudflare/types/zero_trust/dex/colo_list_params.py +++ b/src/cloudflare/types/zero_trust/dex/colo_list_params.py @@ -12,12 +12,12 @@ class ColoListParams(TypedDict, total=False): account_id: Required[str] - time_end: Required[Annotated[str, PropertyInfo(alias="timeEnd")]] - """End time for connection period in RFC3339 (ISO 8601) format.""" - - time_start: Required[Annotated[str, PropertyInfo(alias="timeStart")]] + from_: Required[Annotated[str, PropertyInfo(alias="from")]] """Start time for connection period in RFC3339 (ISO 8601) format.""" + to: Required[str] + """End time for connection period in RFC3339 (ISO 8601) format.""" + sort_by: Annotated[Literal["fleet-status-usage", "application-tests-usage"], PropertyInfo(alias="sortBy")] """Type of usage that colos should be sorted by. diff --git a/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_params.py b/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_params.py index 187868d3ef2..f75de002a5a 100644 --- a/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_params.py +++ b/src/cloudflare/types/zero_trust/dex/fleet_status/device_list_params.py @@ -2,7 +2,9 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ....._utils import PropertyInfo __all__ = ["DeviceListParams"] @@ -10,16 +12,24 @@ class DeviceListParams(TypedDict, total=False): account_id: Required[str] + from_: Required[Annotated[str, PropertyInfo(alias="from")]] + """Timestamp in ISO format""" + page: Required[float] """Page number of paginated results""" per_page: Required[float] """Number of items per page""" - time_end: Required[str] - """Timestamp in ISO format""" + source: Required[Literal["last_seen", "hourly", "raw"]] + """Source: + + - `hourly` - device details aggregated hourly, up to 7 days prior + - `last_seen` - device details, up to 24 hours prior + - `raw` - device details, up to 7 days prior + """ - time_start: Required[str] + to: Required[str] """Timestamp in ISO format""" colo: str diff --git a/src/cloudflare/types/zero_trust/dex/fleet_status_over_time_params.py b/src/cloudflare/types/zero_trust/dex/fleet_status_over_time_params.py index ce01bfb979e..42bb856443c 100644 --- a/src/cloudflare/types/zero_trust/dex/fleet_status_over_time_params.py +++ b/src/cloudflare/types/zero_trust/dex/fleet_status_over_time_params.py @@ -2,7 +2,9 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Required, Annotated, TypedDict + +from ...._utils import PropertyInfo __all__ = ["FleetStatusOverTimeParams"] @@ -10,10 +12,10 @@ class FleetStatusOverTimeParams(TypedDict, total=False): account_id: Required[str] - time_end: Required[str] + from_: Required[Annotated[str, PropertyInfo(alias="from")]] """Timestamp in ISO format""" - time_start: Required[str] + to: Required[str] """Timestamp in ISO format""" colo: str diff --git a/src/cloudflare/types/zero_trust/dex/http_test_get_params.py b/src/cloudflare/types/zero_trust/dex/http_test_get_params.py index d0ce2cbe5d3..dd57bbf6128 100644 --- a/src/cloudflare/types/zero_trust/dex/http_test_get_params.py +++ b/src/cloudflare/types/zero_trust/dex/http_test_get_params.py @@ -13,15 +13,15 @@ class HTTPTestGetParams(TypedDict, total=False): account_id: Required[str] + from_: Required[Annotated[str, PropertyInfo(alias="from")]] + """Start time for aggregate metrics in ISO ms""" + interval: Required[Literal["minute", "hour"]] """Time interval for aggregate time slots.""" - time_end: Required[Annotated[str, PropertyInfo(alias="timeEnd")]] + to: Required[str] """End time for aggregate metrics in ISO ms""" - time_start: Required[Annotated[str, PropertyInfo(alias="timeStart")]] - """Start time for aggregate metrics in ISO ms""" - colo: str """Optionally filter result stats to a Cloudflare colo. diff --git a/src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py b/src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py index febc0fd6177..78d1009603e 100644 --- a/src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py +++ b/src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py @@ -13,12 +13,12 @@ class PercentileGetParams(TypedDict, total=False): account_id: Required[str] - time_end: Required[Annotated[str, PropertyInfo(alias="timeEnd")]] - """End time for aggregate metrics in ISO format""" - - time_start: Required[Annotated[str, PropertyInfo(alias="timeStart")]] + from_: Required[Annotated[str, PropertyInfo(alias="from")]] """Start time for aggregate metrics in ISO format""" + to: Required[str] + """End time for aggregate metrics in ISO format""" + colo: str """Optionally filter result stats to a Cloudflare colo. diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_get_params.py b/src/cloudflare/types/zero_trust/dex/traceroute_test_get_params.py index dc8afa0c5d9..54b4a51b5fb 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_get_params.py +++ b/src/cloudflare/types/zero_trust/dex/traceroute_test_get_params.py @@ -13,15 +13,15 @@ class TracerouteTestGetParams(TypedDict, total=False): account_id: Required[str] + from_: Required[Annotated[str, PropertyInfo(alias="from")]] + """Start time for aggregate metrics in ISO ms""" + interval: Required[Literal["minute", "hour"]] """Time interval for aggregate time slots.""" - time_end: Required[Annotated[str, PropertyInfo(alias="timeEnd")]] + to: Required[str] """End time for aggregate metrics in ISO ms""" - time_start: Required[Annotated[str, PropertyInfo(alias="timeStart")]] - """Start time for aggregate metrics in ISO ms""" - colo: str """Optionally filter result stats to a Cloudflare colo. diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_params.py b/src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_params.py index b23b29c2bff..b6ffc3f49e0 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_params.py +++ b/src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_params.py @@ -15,11 +15,11 @@ class TracerouteTestNetworkPathParams(TypedDict, total=False): device_id: Required[Annotated[str, PropertyInfo(alias="deviceId")]] """Device to filter tracroute result runs to""" + from_: Required[Annotated[str, PropertyInfo(alias="from")]] + """Start time for aggregate metrics in ISO ms""" + interval: Required[Literal["minute", "hour"]] """Time interval for aggregate time slots.""" - time_end: Required[Annotated[str, PropertyInfo(alias="timeEnd")]] + to: Required[str] """End time for aggregate metrics in ISO ms""" - - time_start: Required[Annotated[str, PropertyInfo(alias="timeStart")]] - """Start time for aggregate metrics in ISO ms""" diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py b/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py index 5a4199a097d..d6ada52d1d2 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py +++ b/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py @@ -13,12 +13,12 @@ class TracerouteTestPercentilesParams(TypedDict, total=False): account_id: Required[str] - time_end: Required[Annotated[str, PropertyInfo(alias="timeEnd")]] - """End time for aggregate metrics in ISO format""" - - time_start: Required[Annotated[str, PropertyInfo(alias="timeStart")]] + from_: Required[Annotated[str, PropertyInfo(alias="from")]] """Start time for aggregate metrics in ISO format""" + to: Required[str] + """End time for aggregate metrics in ISO format""" + colo: str """Optionally filter result stats to a Cloudflare colo. diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_get_response.py b/src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_get_response.py index 2dc7a507b92..8b14533ea18 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_get_response.py +++ b/src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_get_response.py @@ -45,9 +45,6 @@ class NetworkPathGetResponse(BaseModel): result_id: str = FieldInfo(alias="resultId") """API Resource UUID tag.""" - time_start: str - """date time of this traceroute test""" - device_name: Optional[str] = FieldInfo(alias="deviceName", default=None) """name of the device associated with this network path response""" diff --git a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py index 3f7e10dbbc6..53def98e79c 100644 --- a/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py +++ b/tests/api_resources/zero_trust/dex/fleet_status/test_devices.py @@ -23,10 +23,11 @@ class TestDevices: def test_method_list(self, client: Cloudflare) -> None: device = client.zero_trust.dex.fleet_status.devices.list( account_id="01a7362d577a6c3019a474fd6f485823", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", ) assert_matches_type(SyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) @@ -35,10 +36,11 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: device = client.zero_trust.dex.fleet_status.devices.list( account_id="01a7362d577a6c3019a474fd6f485823", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", colo="SJC", device_id="cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7", mode="proxy", @@ -54,10 +56,11 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dex.fleet_status.devices.with_raw_response.list( account_id="01a7362d577a6c3019a474fd6f485823", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", ) assert response.is_closed is True @@ -70,10 +73,11 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dex.fleet_status.devices.with_streaming_response.list( account_id="01a7362d577a6c3019a474fd6f485823", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -89,10 +93,11 @@ 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.dex.fleet_status.devices.with_raw_response.list( account_id="", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", ) @@ -104,10 +109,11 @@ class TestAsyncDevices: async def test_method_list(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.dex.fleet_status.devices.list( account_id="01a7362d577a6c3019a474fd6f485823", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", ) assert_matches_type(AsyncV4PagePaginationArray[DeviceListResponse], device, path=["response"]) @@ -116,10 +122,11 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.dex.fleet_status.devices.list( account_id="01a7362d577a6c3019a474fd6f485823", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", colo="SJC", device_id="cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7", mode="proxy", @@ -135,10 +142,11 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.fleet_status.devices.with_raw_response.list( account_id="01a7362d577a6c3019a474fd6f485823", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", ) assert response.is_closed is True @@ -151,10 +159,11 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.fleet_status.devices.with_streaming_response.list( account_id="01a7362d577a6c3019a474fd6f485823", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -170,8 +179,9 @@ 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.dex.fleet_status.devices.with_raw_response.list( account_id="", + from_="2023-10-11T00:00:00Z", page=1, per_page=10, - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + source="last_seen", + to="2023-10-11T00:00:00Z", ) 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 417e9fe4ec4..73561c37fb5 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 @@ -22,8 +22,8 @@ def test_method_get(self, client: Cloudflare) -> None: percentile = client.zero_trust.dex.http_tests.percentiles.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) @@ -32,8 +32,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", colo="string", device_id=["string", "string", "string"], ) @@ -44,8 +44,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) assert response.is_closed is True @@ -58,8 +58,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -75,16 +75,16 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) 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( "", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) @@ -96,8 +96,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) @@ -106,8 +106,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - percentile = await async_client.zero_trust.dex.http_tests.percentiles.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", colo="string", device_id=["string", "string", "string"], ) @@ -118,8 +118,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) assert response.is_closed is True @@ -132,8 +132,8 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.zero_trust.dex.http_tests.percentiles.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -149,14 +149,14 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) 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( "", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) diff --git a/tests/api_resources/zero_trust/dex/test_colos.py b/tests/api_resources/zero_trust/dex/test_colos.py index ea3b48d65ae..8e4d0db4399 100644 --- a/tests/api_resources/zero_trust/dex/test_colos.py +++ b/tests/api_resources/zero_trust/dex/test_colos.py @@ -21,8 +21,8 @@ class TestColos: def test_method_list(self, client: Cloudflare) -> None: colo = client.zero_trust.dex.colos.list( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", ) assert_matches_type(SyncSinglePage[object], colo, path=["response"]) @@ -30,8 +30,8 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: colo = client.zero_trust.dex.colos.list( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", sort_by="fleet-status-usage", ) assert_matches_type(SyncSinglePage[object], colo, path=["response"]) @@ -40,8 +40,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dex.colos.with_raw_response.list( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", ) assert response.is_closed is True @@ -53,8 +53,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dex.colos.with_streaming_response.list( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,8 +69,8 @@ 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.dex.colos.with_raw_response.list( account_id="", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", ) @@ -81,8 +81,8 @@ class TestAsyncColos: async def test_method_list(self, async_client: AsyncCloudflare) -> None: colo = await async_client.zero_trust.dex.colos.list( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", ) assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) @@ -90,8 +90,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: colo = await async_client.zero_trust.dex.colos.list( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", sort_by="fleet-status-usage", ) assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) @@ -100,8 +100,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.colos.with_raw_response.list( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", ) assert response.is_closed is True @@ -113,8 +113,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.colos.with_streaming_response.list( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -129,6 +129,6 @@ 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.dex.colos.with_raw_response.list( account_id="", - time_end="2023-08-24T20:45:00Z", - time_start="2023-08-20T20:45:00Z", + from_="2023-08-20T20:45:00Z", + to="2023-08-24T20:45:00Z", ) diff --git a/tests/api_resources/zero_trust/dex/test_fleet_status.py b/tests/api_resources/zero_trust/dex/test_fleet_status.py index c8810f5404b..db1676eacde 100644 --- a/tests/api_resources/zero_trust/dex/test_fleet_status.py +++ b/tests/api_resources/zero_trust/dex/test_fleet_status.py @@ -65,8 +65,8 @@ def test_path_params_live(self, client: Cloudflare) -> None: def test_method_over_time(self, client: Cloudflare) -> None: fleet_status = client.zero_trust.dex.fleet_status.over_time( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", ) assert fleet_status is None @@ -74,8 +74,8 @@ def test_method_over_time(self, client: Cloudflare) -> None: def test_method_over_time_with_all_params(self, client: Cloudflare) -> None: fleet_status = client.zero_trust.dex.fleet_status.over_time( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", colo="SJC", device_id="cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7", ) @@ -85,8 +85,8 @@ def test_method_over_time_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_over_time(self, client: Cloudflare) -> None: response = client.zero_trust.dex.fleet_status.with_raw_response.over_time( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", ) assert response.is_closed is True @@ -98,8 +98,8 @@ def test_raw_response_over_time(self, client: Cloudflare) -> None: def test_streaming_response_over_time(self, client: Cloudflare) -> None: with client.zero_trust.dex.fleet_status.with_streaming_response.over_time( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,8 +114,8 @@ def test_path_params_over_time(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.fleet_status.with_raw_response.over_time( account_id="", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", ) @@ -168,8 +168,8 @@ async def test_path_params_live(self, async_client: AsyncCloudflare) -> None: async def test_method_over_time(self, async_client: AsyncCloudflare) -> None: fleet_status = await async_client.zero_trust.dex.fleet_status.over_time( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", ) assert fleet_status is None @@ -177,8 +177,8 @@ async def test_method_over_time(self, async_client: AsyncCloudflare) -> None: async def test_method_over_time_with_all_params(self, async_client: AsyncCloudflare) -> None: fleet_status = await async_client.zero_trust.dex.fleet_status.over_time( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", colo="SJC", device_id="cb49c27f-7f97-49c5-b6f3-f7c01ead0fd7", ) @@ -188,8 +188,8 @@ async def test_method_over_time_with_all_params(self, async_client: AsyncCloudfl async def test_raw_response_over_time(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.fleet_status.with_raw_response.over_time( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", ) assert response.is_closed is True @@ -201,8 +201,8 @@ async def test_raw_response_over_time(self, async_client: AsyncCloudflare) -> No async def test_streaming_response_over_time(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.fleet_status.with_streaming_response.over_time( account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00:00:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,6 +217,6 @@ async def test_path_params_over_time(self, async_client: AsyncCloudflare) -> Non with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dex.fleet_status.with_raw_response.over_time( account_id="", - time_end="2023-10-11T00:00:00Z", - time_start="2023-10-11T00:00:00Z", + from_="2023-10-11T00:00:00Z", + to="2023-10-11T00: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 48a2fa21dfe..2b038de5a40 100644 --- a/tests/api_resources/zero_trust/dex/test_http_tests.py +++ b/tests/api_resources/zero_trust/dex/test_http_tests.py @@ -22,9 +22,9 @@ def test_method_get(self, client: Cloudflare) -> None: http_test = client.zero_trust.dex.http_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) @@ -33,9 +33,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", colo="string", device_id=["string", "string", "string"], ) @@ -46,9 +46,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert response.is_closed is True @@ -61,9 +61,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -79,18 +79,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.zero_trust.dex.http_tests.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) 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( "", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) @@ -102,9 +102,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) @@ -113,9 +113,9 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - http_test = await async_client.zero_trust.dex.http_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", colo="string", device_id=["string", "string", "string"], ) @@ -126,9 +126,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert response.is_closed is True @@ -141,9 +141,9 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.zero_trust.dex.http_tests.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -159,16 +159,16 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.dex.http_tests.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) 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( "", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) 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 687a44e7675..a5a47a30db8 100644 --- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py +++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py @@ -26,9 +26,9 @@ def test_method_get(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) @@ -37,9 +37,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", colo="string", device_id=["string", "string", "string"], ) @@ -50,9 +50,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert response.is_closed is True @@ -65,9 +65,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,18 +83,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.zero_trust.dex.traceroute_tests.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) 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( "", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) @parametrize @@ -103,9 +103,9 @@ def test_method_network_path(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert_matches_type(Optional[NetworkPathResponse], traceroute_test, path=["response"]) @@ -115,9 +115,9 @@ def test_raw_response_network_path(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert response.is_closed is True @@ -131,9 +131,9 @@ def test_streaming_response_network_path(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -150,9 +150,9 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -160,9 +160,9 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) @parametrize @@ -170,8 +170,8 @@ def test_method_percentiles(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.percentiles( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) @@ -180,8 +180,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", colo="string", device_id=["string", "string", "string"], ) @@ -192,8 +192,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) assert response.is_closed is True @@ -206,8 +206,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -223,16 +223,16 @@ def test_path_params_percentiles(self, client: Cloudflare) -> None: client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) 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( "", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) @@ -244,9 +244,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) @@ -255,9 +255,9 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - traceroute_test = await async_client.zero_trust.dex.traceroute_tests.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", colo="string", device_id=["string", "string", "string"], ) @@ -268,9 +268,9 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert response.is_closed is True @@ -283,9 +283,9 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -301,18 +301,18 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.dex.traceroute_tests.with_raw_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) 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( "", account_id="01a7362d577a6c3019a474fd6f485823", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) @parametrize @@ -321,9 +321,9 @@ async def test_method_network_path(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert_matches_type(Optional[NetworkPathResponse], traceroute_test, path=["response"]) @@ -333,9 +333,9 @@ async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) assert response.is_closed is True @@ -349,9 +349,9 @@ async def test_streaming_response_network_path(self, async_client: AsyncCloudfla "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -368,9 +368,9 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -378,9 +378,9 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> "", account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", + from_="1689520412000", interval="minute", - time_end="1689606812000", - time_start="1689520412000", + to="1689606812000", ) @parametrize @@ -388,8 +388,8 @@ 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", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) @@ -398,8 +398,8 @@ async def test_method_percentiles_with_all_params(self, async_client: AsyncCloud traceroute_test = await async_client.zero_trust.dex.traceroute_tests.percentiles( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", colo="string", device_id=["string", "string", "string"], ) @@ -410,8 +410,8 @@ async def test_raw_response_percentiles(self, async_client: AsyncCloudflare) -> response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) assert response.is_closed is True @@ -424,8 +424,8 @@ async def test_streaming_response_percentiles(self, async_client: AsyncCloudflar async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.percentiles( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -441,14 +441,14 @@ async def test_path_params_percentiles(self, async_client: AsyncCloudflare) -> N await async_client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", ) 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( "", account_id="01a7362d577a6c3019a474fd6f485823", - time_end="2023-09-20T17:00:00Z", - time_start="2023-09-20T17:00:00Z", + from_="2023-09-20T17:00:00Z", + to="2023-09-20T17:00:00Z", )