From ab74d847efc696796cef40e387d8e1bc23adff16 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 05:15:56 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#476) --- api.md | 2 +- .../resources/load_balancers/pools/pools.py | 12 ++++++------ src/cloudflare/types/load_balancers/__init__.py | 2 -- src/cloudflare/types/load_balancers/pool.py | 4 ++-- .../types/load_balancers/pool_edit_params.py | 6 +++--- .../types/load_balancers/pool_update_params.py | 6 +++--- src/cloudflare/types/load_balancers/region_id.py | 9 --------- .../types/load_balancers/region_id_param.py | 14 -------------- 8 files changed, 15 insertions(+), 40 deletions(-) delete mode 100644 src/cloudflare/types/load_balancers/region_id.py delete mode 100644 src/cloudflare/types/load_balancers/region_id_param.py diff --git a/api.md b/api.md index 831736d9955..876bb0d3509 100644 --- a/api.md +++ b/api.md @@ -1160,7 +1160,7 @@ Methods: Types: ```python -from cloudflare.types.load_balancers import RegionID, RegionListResponse, RegionGetResponse +from cloudflare.types.load_balancers import RegionListResponse, RegionGetResponse ``` Methods: diff --git a/src/cloudflare/resources/load_balancers/pools/pools.py b/src/cloudflare/resources/load_balancers/pools/pools.py index 61c33e710d1..1652a3bed56 100644 --- a/src/cloudflare/resources/load_balancers/pools/pools.py +++ b/src/cloudflare/resources/load_balancers/pools/pools.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, Optional, cast +from typing import List, Type, Iterable, Optional, cast import httpx @@ -48,8 +48,8 @@ pool_update_params, ) from ....types.load_balancers.pool import Pool +from ....types.load_balancers.check_region import CheckRegion from ....types.load_balancers.origin_param import OriginParam -from ....types.load_balancers.region_id_param import RegionIDParam from ....types.load_balancers.load_shedding_param import LoadSheddingParam from ....types.load_balancers.pool_delete_response import PoolDeleteResponse from ....types.load_balancers.origin_steering_param import OriginSteeringParam @@ -189,7 +189,7 @@ def update( account_id: str, name: str, origins: Iterable[OriginParam], - check_regions: Optional[RegionIDParam] | NotGiven = NOT_GIVEN, + check_regions: Optional[List[CheckRegion]] | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, latitude: float | NotGiven = NOT_GIVEN, @@ -388,7 +388,7 @@ def edit( pool_id: str, *, account_id: str, - check_regions: Optional[RegionIDParam] | NotGiven = NOT_GIVEN, + check_regions: Optional[List[CheckRegion]] | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, latitude: float | NotGiven = NOT_GIVEN, @@ -672,7 +672,7 @@ async def update( account_id: str, name: str, origins: Iterable[OriginParam], - check_regions: Optional[RegionIDParam] | NotGiven = NOT_GIVEN, + check_regions: Optional[List[CheckRegion]] | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, latitude: float | NotGiven = NOT_GIVEN, @@ -871,7 +871,7 @@ async def edit( pool_id: str, *, account_id: str, - check_regions: Optional[RegionIDParam] | NotGiven = NOT_GIVEN, + check_regions: Optional[List[CheckRegion]] | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, enabled: bool | NotGiven = NOT_GIVEN, latitude: float | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/load_balancers/__init__.py b/src/cloudflare/types/load_balancers/__init__.py index 0dac8532e00..46d78e92ec5 100644 --- a/src/cloudflare/types/load_balancers/__init__.py +++ b/src/cloudflare/types/load_balancers/__init__.py @@ -8,7 +8,6 @@ from .header import Header as Header from .origin import Origin as Origin from .monitor import Monitor as Monitor -from .region_id import RegionID as RegionID from .rules_param import RulesParam as RulesParam from .check_region import CheckRegion as CheckRegion from .header_param import HeaderParam as HeaderParam @@ -19,7 +18,6 @@ from .filter_options import FilterOptions as FilterOptions from .origin_steering import OriginSteering as OriginSteering from .random_steering import RandomSteering as RandomSteering -from .region_id_param import RegionIDParam as RegionIDParam from .steering_policy import SteeringPolicy as SteeringPolicy from .adaptive_routing import AdaptiveRouting as AdaptiveRouting from .pool_edit_params import PoolEditParams as PoolEditParams diff --git a/src/cloudflare/types/load_balancers/pool.py b/src/cloudflare/types/load_balancers/pool.py index 2b5a549420b..beb27193b3d 100644 --- a/src/cloudflare/types/load_balancers/pool.py +++ b/src/cloudflare/types/load_balancers/pool.py @@ -5,7 +5,7 @@ from .origin import Origin from ..._models import BaseModel -from .region_id import RegionID +from .check_region import CheckRegion from .load_shedding import LoadShedding from .origin_steering import OriginSteering from .notification_filter import NotificationFilter @@ -16,7 +16,7 @@ class Pool(BaseModel): id: Optional[str] = None - check_regions: Optional[RegionID] = None + check_regions: Optional[List[CheckRegion]] = None """A list of regions from which to run health checks. Null means every Cloudflare data center. diff --git a/src/cloudflare/types/load_balancers/pool_edit_params.py b/src/cloudflare/types/load_balancers/pool_edit_params.py index 3a764923865..222e8ab9357 100644 --- a/src/cloudflare/types/load_balancers/pool_edit_params.py +++ b/src/cloudflare/types/load_balancers/pool_edit_params.py @@ -2,11 +2,11 @@ from __future__ import annotations -from typing import Iterable, Optional +from typing import List, Iterable, Optional from typing_extensions import Required, TypedDict +from .check_region import CheckRegion from .origin_param import OriginParam -from .region_id_param import RegionIDParam from .load_shedding_param import LoadSheddingParam from .origin_steering_param import OriginSteeringParam from .notification_filter_param import NotificationFilterParam @@ -18,7 +18,7 @@ class PoolEditParams(TypedDict, total=False): account_id: Required[str] """Identifier""" - check_regions: Optional[RegionIDParam] + check_regions: Optional[List[CheckRegion]] """A list of regions from which to run health checks. Null means every Cloudflare data center. diff --git a/src/cloudflare/types/load_balancers/pool_update_params.py b/src/cloudflare/types/load_balancers/pool_update_params.py index afbfd2a9af6..834c3ec1b70 100644 --- a/src/cloudflare/types/load_balancers/pool_update_params.py +++ b/src/cloudflare/types/load_balancers/pool_update_params.py @@ -2,11 +2,11 @@ from __future__ import annotations -from typing import Iterable, Optional +from typing import List, Iterable, Optional from typing_extensions import Required, TypedDict +from .check_region import CheckRegion from .origin_param import OriginParam -from .region_id_param import RegionIDParam from .load_shedding_param import LoadSheddingParam from .origin_steering_param import OriginSteeringParam from .notification_filter_param import NotificationFilterParam @@ -31,7 +31,7 @@ class PoolUpdateParams(TypedDict, total=False): provided the pool itself is healthy. """ - check_regions: Optional[RegionIDParam] + check_regions: Optional[List[CheckRegion]] """A list of regions from which to run health checks. Null means every Cloudflare data center. diff --git a/src/cloudflare/types/load_balancers/region_id.py b/src/cloudflare/types/load_balancers/region_id.py deleted file mode 100644 index 3b38543ab42..00000000000 --- a/src/cloudflare/types/load_balancers/region_id.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .check_region import CheckRegion - -__all__ = ["RegionID"] - -RegionID = List[CheckRegion] diff --git a/src/cloudflare/types/load_balancers/region_id_param.py b/src/cloudflare/types/load_balancers/region_id_param.py deleted file mode 100644 index 4dbec6ab70d..00000000000 --- a/src/cloudflare/types/load_balancers/region_id_param.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import Literal - -__all__ = ["CheckRegion"] - -CheckRegion = Literal[ - "WNAM", "ENAM", "WEU", "EEU", "NSAM", "SSAM", "OC", "ME", "NAF", "SAF", "SAS", "SEAS", "NEAS", "ALL_REGIONS" -] - -RegionIDParam = List[CheckRegion]