Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent c774af3 commit dd6a5b7
Show file tree
Hide file tree
Showing 372 changed files with 8,107 additions and 13,529 deletions.
377 changes: 241 additions & 136 deletions api.md

Large diffs are not rendered by default.

160 changes: 21 additions & 139 deletions src/cloudflare/resources/healthchecks/healthchecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
from __future__ import annotations

from typing import List, Type, Optional, cast
from typing_extensions import Literal

import httpx

from ...types import (
Healthcheck,
CheckRegionItem,
TcpConfigurationParam,
HTTPConfigurationParam,
HealthcheckDeleteResponse,
healthcheck_edit_params,
healthcheck_create_params,
Expand Down Expand Up @@ -65,35 +67,15 @@ def create(
zone_id: str,
address: str,
name: str,
check_regions: Optional[
List[
Literal[
"WNAM",
"ENAM",
"WEU",
"EEU",
"NSAM",
"SSAM",
"OC",
"ME",
"NAF",
"SAF",
"IN",
"SEAS",
"NEAS",
"ALL_REGIONS",
]
]
]
| NotGiven = NOT_GIVEN,
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
consecutive_fails: int | NotGiven = NOT_GIVEN,
consecutive_successes: int | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
http_config: Optional[healthcheck_create_params.HTTPConfig] | NotGiven = NOT_GIVEN,
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
interval: int | NotGiven = NOT_GIVEN,
retries: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
tcp_config: Optional[healthcheck_create_params.TcpConfig] | NotGiven = NOT_GIVEN,
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -190,35 +172,15 @@ def update(
zone_id: str,
address: str,
name: str,
check_regions: Optional[
List[
Literal[
"WNAM",
"ENAM",
"WEU",
"EEU",
"NSAM",
"SSAM",
"OC",
"ME",
"NAF",
"SAF",
"IN",
"SEAS",
"NEAS",
"ALL_REGIONS",
]
]
]
| NotGiven = NOT_GIVEN,
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
consecutive_fails: int | NotGiven = NOT_GIVEN,
consecutive_successes: int | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
http_config: Optional[healthcheck_update_params.HTTPConfig] | NotGiven = NOT_GIVEN,
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
interval: int | NotGiven = NOT_GIVEN,
retries: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
tcp_config: Optional[healthcheck_update_params.TcpConfig] | NotGiven = NOT_GIVEN,
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -401,35 +363,15 @@ def edit(
zone_id: str,
address: str,
name: str,
check_regions: Optional[
List[
Literal[
"WNAM",
"ENAM",
"WEU",
"EEU",
"NSAM",
"SSAM",
"OC",
"ME",
"NAF",
"SAF",
"IN",
"SEAS",
"NEAS",
"ALL_REGIONS",
]
]
]
| NotGiven = NOT_GIVEN,
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
consecutive_fails: int | NotGiven = NOT_GIVEN,
consecutive_successes: int | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
http_config: Optional[healthcheck_edit_params.HTTPConfig] | NotGiven = NOT_GIVEN,
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
interval: int | NotGiven = NOT_GIVEN,
retries: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
tcp_config: Optional[healthcheck_edit_params.TcpConfig] | NotGiven = NOT_GIVEN,
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -587,35 +529,15 @@ async def create(
zone_id: str,
address: str,
name: str,
check_regions: Optional[
List[
Literal[
"WNAM",
"ENAM",
"WEU",
"EEU",
"NSAM",
"SSAM",
"OC",
"ME",
"NAF",
"SAF",
"IN",
"SEAS",
"NEAS",
"ALL_REGIONS",
]
]
]
| NotGiven = NOT_GIVEN,
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
consecutive_fails: int | NotGiven = NOT_GIVEN,
consecutive_successes: int | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
http_config: Optional[healthcheck_create_params.HTTPConfig] | NotGiven = NOT_GIVEN,
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
interval: int | NotGiven = NOT_GIVEN,
retries: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
tcp_config: Optional[healthcheck_create_params.TcpConfig] | NotGiven = NOT_GIVEN,
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -712,35 +634,15 @@ async def update(
zone_id: str,
address: str,
name: str,
check_regions: Optional[
List[
Literal[
"WNAM",
"ENAM",
"WEU",
"EEU",
"NSAM",
"SSAM",
"OC",
"ME",
"NAF",
"SAF",
"IN",
"SEAS",
"NEAS",
"ALL_REGIONS",
]
]
]
| NotGiven = NOT_GIVEN,
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
consecutive_fails: int | NotGiven = NOT_GIVEN,
consecutive_successes: int | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
http_config: Optional[healthcheck_update_params.HTTPConfig] | NotGiven = NOT_GIVEN,
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
interval: int | NotGiven = NOT_GIVEN,
retries: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
tcp_config: Optional[healthcheck_update_params.TcpConfig] | NotGiven = NOT_GIVEN,
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -923,35 +825,15 @@ async def edit(
zone_id: str,
address: str,
name: str,
check_regions: Optional[
List[
Literal[
"WNAM",
"ENAM",
"WEU",
"EEU",
"NSAM",
"SSAM",
"OC",
"ME",
"NAF",
"SAF",
"IN",
"SEAS",
"NEAS",
"ALL_REGIONS",
]
]
]
| NotGiven = NOT_GIVEN,
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
consecutive_fails: int | NotGiven = NOT_GIVEN,
consecutive_successes: int | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
http_config: Optional[healthcheck_edit_params.HTTPConfig] | NotGiven = NOT_GIVEN,
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
interval: int | NotGiven = NOT_GIVEN,
retries: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
tcp_config: Optional[healthcheck_edit_params.TcpConfig] | NotGiven = NOT_GIVEN,
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down
61 changes: 12 additions & 49 deletions src/cloudflare/resources/healthchecks/previews.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
from __future__ import annotations

from typing import List, Type, Optional, cast
from typing_extensions import Literal

import httpx

from ...types import Healthcheck
from ...types import (
Healthcheck,
TcpConfigurationParam,
HTTPConfigurationParam,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
Expand All @@ -25,7 +28,7 @@
from ..._base_client import (
make_request_options,
)
from ...types.healthchecks import PreviewDeleteResponse, preview_create_params, preview_delete_params
from ...types.healthchecks import CheckRegionItem, PreviewDeleteResponse, preview_create_params, preview_delete_params

__all__ = ["Previews", "AsyncPreviews"]

Expand All @@ -45,35 +48,15 @@ def create(
zone_id: str,
address: str,
name: str,
check_regions: Optional[
List[
Literal[
"WNAM",
"ENAM",
"WEU",
"EEU",
"NSAM",
"SSAM",
"OC",
"ME",
"NAF",
"SAF",
"IN",
"SEAS",
"NEAS",
"ALL_REGIONS",
]
]
]
| NotGiven = NOT_GIVEN,
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
consecutive_fails: int | NotGiven = NOT_GIVEN,
consecutive_successes: int | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
http_config: Optional[preview_create_params.HTTPConfig] | NotGiven = NOT_GIVEN,
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
interval: int | NotGiven = NOT_GIVEN,
retries: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
tcp_config: Optional[preview_create_params.TcpConfig] | NotGiven = NOT_GIVEN,
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -269,35 +252,15 @@ async def create(
zone_id: str,
address: str,
name: str,
check_regions: Optional[
List[
Literal[
"WNAM",
"ENAM",
"WEU",
"EEU",
"NSAM",
"SSAM",
"OC",
"ME",
"NAF",
"SAF",
"IN",
"SEAS",
"NEAS",
"ALL_REGIONS",
]
]
]
| NotGiven = NOT_GIVEN,
check_regions: Optional[List[CheckRegionItem]] | NotGiven = NOT_GIVEN,
consecutive_fails: int | NotGiven = NOT_GIVEN,
consecutive_successes: int | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
http_config: Optional[preview_create_params.HTTPConfig] | NotGiven = NOT_GIVEN,
http_config: Optional[HTTPConfigurationParam] | NotGiven = NOT_GIVEN,
interval: int | NotGiven = NOT_GIVEN,
retries: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
tcp_config: Optional[preview_create_params.TcpConfig] | NotGiven = NOT_GIVEN,
tcp_config: Optional[TcpConfigurationParam] | NotGiven = NOT_GIVEN,
healthcheck_timeout: int | NotGiven = NOT_GIVEN,
type: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down
Loading

0 comments on commit dd6a5b7

Please sign in to comment.