Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#337)
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 0b9bdab commit 0b41651
Show file tree
Hide file tree
Showing 17 changed files with 326 additions and 326 deletions.
52 changes: 26 additions & 26 deletions api.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Type, cast
from typing import Type, Optional, cast

import httpx

Expand Down Expand Up @@ -49,7 +49,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> GatewaySettings:
) -> Optional[GatewaySettings]:
"""
Updates Zero Trust Audit SSH settings.
Expand Down Expand Up @@ -84,7 +84,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[GatewaySettings], ResultWrapper[GatewaySettings]),
cast_to=cast(Type[Optional[GatewaySettings]], ResultWrapper[GatewaySettings]),
)

def get(
Expand All @@ -97,7 +97,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> GatewaySettings:
) -> Optional[GatewaySettings]:
"""
Get all Zero Trust Audit SSH settings for an account.
Expand All @@ -121,7 +121,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[GatewaySettings], ResultWrapper[GatewaySettings]),
cast_to=cast(Type[Optional[GatewaySettings]], ResultWrapper[GatewaySettings]),
)


Expand All @@ -146,7 +146,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> GatewaySettings:
) -> Optional[GatewaySettings]:
"""
Updates Zero Trust Audit SSH settings.
Expand Down Expand Up @@ -181,7 +181,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[GatewaySettings], ResultWrapper[GatewaySettings]),
cast_to=cast(Type[Optional[GatewaySettings]], ResultWrapper[GatewaySettings]),
)

async def get(
Expand All @@ -194,7 +194,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> GatewaySettings:
) -> Optional[GatewaySettings]:
"""
Get all Zero Trust Audit SSH settings for an account.
Expand All @@ -218,7 +218,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[GatewaySettings], ResultWrapper[GatewaySettings]),
cast_to=cast(Type[Optional[GatewaySettings]], ResultWrapper[GatewaySettings]),
)


Expand Down
26 changes: 13 additions & 13 deletions src/cloudflare/resources/zero_trust/gateway/configurations.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, cast
from typing import Type, Optional, cast

import httpx

Expand Down Expand Up @@ -55,7 +55,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConfigurationUpdateResponse:
) -> Optional[ConfigurationUpdateResponse]:
"""
Updates the current Zero Trust account configuration.
Expand All @@ -82,7 +82,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ConfigurationUpdateResponse], ResultWrapper[ConfigurationUpdateResponse]),
cast_to=cast(Type[Optional[ConfigurationUpdateResponse]], ResultWrapper[ConfigurationUpdateResponse]),
)

def edit(
Expand All @@ -96,7 +96,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConfigurationEditResponse:
) -> Optional[ConfigurationEditResponse]:
"""Patches the current Zero Trust account configuration.
This endpoint can update a
Expand Down Expand Up @@ -128,7 +128,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ConfigurationEditResponse], ResultWrapper[ConfigurationEditResponse]),
cast_to=cast(Type[Optional[ConfigurationEditResponse]], ResultWrapper[ConfigurationEditResponse]),
)

def get(
Expand All @@ -141,7 +141,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConfigurationGetResponse:
) -> Optional[ConfigurationGetResponse]:
"""
Fetches the current Zero Trust account configuration.
Expand All @@ -165,7 +165,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ConfigurationGetResponse], ResultWrapper[ConfigurationGetResponse]),
cast_to=cast(Type[Optional[ConfigurationGetResponse]], ResultWrapper[ConfigurationGetResponse]),
)


Expand All @@ -189,7 +189,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConfigurationUpdateResponse:
) -> Optional[ConfigurationUpdateResponse]:
"""
Updates the current Zero Trust account configuration.
Expand Down Expand Up @@ -218,7 +218,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ConfigurationUpdateResponse], ResultWrapper[ConfigurationUpdateResponse]),
cast_to=cast(Type[Optional[ConfigurationUpdateResponse]], ResultWrapper[ConfigurationUpdateResponse]),
)

async def edit(
Expand All @@ -232,7 +232,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConfigurationEditResponse:
) -> Optional[ConfigurationEditResponse]:
"""Patches the current Zero Trust account configuration.
This endpoint can update a
Expand Down Expand Up @@ -264,7 +264,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ConfigurationEditResponse], ResultWrapper[ConfigurationEditResponse]),
cast_to=cast(Type[Optional[ConfigurationEditResponse]], ResultWrapper[ConfigurationEditResponse]),
)

async def get(
Expand All @@ -277,7 +277,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ConfigurationGetResponse:
) -> Optional[ConfigurationGetResponse]:
"""
Fetches the current Zero Trust account configuration.
Expand All @@ -301,7 +301,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ConfigurationGetResponse], ResultWrapper[ConfigurationGetResponse]),
cast_to=cast(Type[Optional[ConfigurationGetResponse]], ResultWrapper[ConfigurationGetResponse]),
)


Expand Down
18 changes: 9 additions & 9 deletions src/cloudflare/resources/zero_trust/gateway/gateway.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, cast
from typing import Type, Optional, cast

import httpx

Expand Down Expand Up @@ -152,7 +152,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> GatewayCreateResponse:
) -> Optional[GatewayCreateResponse]:
"""
Creates a Zero Trust account with an existing Cloudflare account.
Expand All @@ -176,7 +176,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[GatewayCreateResponse], ResultWrapper[GatewayCreateResponse]),
cast_to=cast(Type[Optional[GatewayCreateResponse]], ResultWrapper[GatewayCreateResponse]),
)

def list(
Expand All @@ -189,7 +189,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> GatewayListResponse:
) -> Optional[GatewayListResponse]:
"""
Gets information about the current Zero Trust account.
Expand All @@ -213,7 +213,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[GatewayListResponse], ResultWrapper[GatewayListResponse]),
cast_to=cast(Type[Optional[GatewayListResponse]], ResultWrapper[GatewayListResponse]),
)


Expand Down Expand Up @@ -272,7 +272,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> GatewayCreateResponse:
) -> Optional[GatewayCreateResponse]:
"""
Creates a Zero Trust account with an existing Cloudflare account.
Expand All @@ -296,7 +296,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[GatewayCreateResponse], ResultWrapper[GatewayCreateResponse]),
cast_to=cast(Type[Optional[GatewayCreateResponse]], ResultWrapper[GatewayCreateResponse]),
)

async def list(
Expand All @@ -309,7 +309,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> GatewayListResponse:
) -> Optional[GatewayListResponse]:
"""
Gets information about the current Zero Trust account.
Expand All @@ -333,7 +333,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[GatewayListResponse], ResultWrapper[GatewayListResponse]),
cast_to=cast(Type[Optional[GatewayListResponse]], ResultWrapper[GatewayListResponse]),
)


Expand Down
Loading

0 comments on commit 0b41651

Please sign in to comment.