Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 7, 2024
1 parent d893b1a commit 3eb6f2e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 40 deletions.
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions src/cloudflare/resources/load_balancers/pools/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/cloudflare/types/load_balancers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/load_balancers/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/types/load_balancers/pool_edit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/types/load_balancers/pool_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
9 changes: 0 additions & 9 deletions src/cloudflare/types/load_balancers/region_id.py

This file was deleted.

14 changes: 0 additions & 14 deletions src/cloudflare/types/load_balancers/region_id_param.py

This file was deleted.

0 comments on commit 3eb6f2e

Please sign in to comment.