Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#310)
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 21446e0 commit cf99b9b
Show file tree
Hide file tree
Showing 11 changed files with 232 additions and 232 deletions.
40 changes: 20 additions & 20 deletions api.md

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions src/cloudflare/resources/secondary_dns/acls.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 @@ -50,7 +50,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ACL:
) -> Optional[ACL]:
"""
Create ACL.
Expand All @@ -75,7 +75,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ACL], ResultWrapper[ACL]),
cast_to=cast(Type[Optional[ACL]], ResultWrapper[ACL]),
)

def update(
Expand All @@ -91,7 +91,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ACL:
) -> Optional[ACL]:
"""
Modify ACL.
Expand Down Expand Up @@ -132,7 +132,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ACL], ResultWrapper[ACL]),
cast_to=cast(Type[Optional[ACL]], ResultWrapper[ACL]),
)

def list(
Expand Down Expand Up @@ -181,7 +181,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ACLDeleteResponse:
) -> Optional[ACLDeleteResponse]:
"""
Delete ACL.
Expand All @@ -208,7 +208,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ACLDeleteResponse], ResultWrapper[ACLDeleteResponse]),
cast_to=cast(Type[Optional[ACLDeleteResponse]], ResultWrapper[ACLDeleteResponse]),
)

def get(
Expand All @@ -222,7 +222,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ACL:
) -> Optional[ACL]:
"""
Get ACL.
Expand All @@ -248,7 +248,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ACL], ResultWrapper[ACL]),
cast_to=cast(Type[Optional[ACL]], ResultWrapper[ACL]),
)


Expand All @@ -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,
) -> ACL:
) -> Optional[ACL]:
"""
Create ACL.
Expand All @@ -297,7 +297,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ACL], ResultWrapper[ACL]),
cast_to=cast(Type[Optional[ACL]], ResultWrapper[ACL]),
)

async def update(
Expand All @@ -313,7 +313,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ACL:
) -> Optional[ACL]:
"""
Modify ACL.
Expand Down Expand Up @@ -354,7 +354,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ACL], ResultWrapper[ACL]),
cast_to=cast(Type[Optional[ACL]], ResultWrapper[ACL]),
)

def list(
Expand Down Expand Up @@ -403,7 +403,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ACLDeleteResponse:
) -> Optional[ACLDeleteResponse]:
"""
Delete ACL.
Expand All @@ -430,7 +430,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ACLDeleteResponse], ResultWrapper[ACLDeleteResponse]),
cast_to=cast(Type[Optional[ACLDeleteResponse]], ResultWrapper[ACLDeleteResponse]),
)

async def get(
Expand All @@ -444,7 +444,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ACL:
) -> Optional[ACL]:
"""
Get ACL.
Expand All @@ -470,7 +470,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[ACL], ResultWrapper[ACL]),
cast_to=cast(Type[Optional[ACL]], ResultWrapper[ACL]),
)


Expand Down
34 changes: 17 additions & 17 deletions src/cloudflare/resources/secondary_dns/incoming.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, cast
from typing import Type, Iterable, Optional, cast

import httpx

Expand Down Expand Up @@ -58,7 +58,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IncomingCreateResponse:
) -> Optional[IncomingCreateResponse]:
"""
Create secondary zone configuration for incoming zone transfers.
Expand Down Expand Up @@ -97,7 +97,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IncomingCreateResponse], ResultWrapper[IncomingCreateResponse]),
cast_to=cast(Type[Optional[IncomingCreateResponse]], ResultWrapper[IncomingCreateResponse]),
)

def update(
Expand All @@ -113,7 +113,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IncomingUpdateResponse:
) -> Optional[IncomingUpdateResponse]:
"""
Update secondary zone configuration for incoming zone transfers.
Expand Down Expand Up @@ -152,7 +152,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IncomingUpdateResponse], ResultWrapper[IncomingUpdateResponse]),
cast_to=cast(Type[Optional[IncomingUpdateResponse]], ResultWrapper[IncomingUpdateResponse]),
)

def delete(
Expand All @@ -166,7 +166,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IncomingDeleteResponse:
) -> Optional[IncomingDeleteResponse]:
"""
Delete secondary zone configuration for incoming zone transfers.
Expand All @@ -191,7 +191,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IncomingDeleteResponse], ResultWrapper[IncomingDeleteResponse]),
cast_to=cast(Type[Optional[IncomingDeleteResponse]], ResultWrapper[IncomingDeleteResponse]),
)

def get(
Expand All @@ -204,7 +204,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IncomingGetResponse:
) -> Optional[IncomingGetResponse]:
"""
Get secondary zone configuration for incoming zone transfers.
Expand All @@ -228,7 +228,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IncomingGetResponse], ResultWrapper[IncomingGetResponse]),
cast_to=cast(Type[Optional[IncomingGetResponse]], ResultWrapper[IncomingGetResponse]),
)


Expand All @@ -254,7 +254,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IncomingCreateResponse:
) -> Optional[IncomingCreateResponse]:
"""
Create secondary zone configuration for incoming zone transfers.
Expand Down Expand Up @@ -293,7 +293,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IncomingCreateResponse], ResultWrapper[IncomingCreateResponse]),
cast_to=cast(Type[Optional[IncomingCreateResponse]], ResultWrapper[IncomingCreateResponse]),
)

async def update(
Expand All @@ -309,7 +309,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IncomingUpdateResponse:
) -> Optional[IncomingUpdateResponse]:
"""
Update secondary zone configuration for incoming zone transfers.
Expand Down Expand Up @@ -348,7 +348,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IncomingUpdateResponse], ResultWrapper[IncomingUpdateResponse]),
cast_to=cast(Type[Optional[IncomingUpdateResponse]], ResultWrapper[IncomingUpdateResponse]),
)

async def delete(
Expand All @@ -362,7 +362,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IncomingDeleteResponse:
) -> Optional[IncomingDeleteResponse]:
"""
Delete secondary zone configuration for incoming zone transfers.
Expand All @@ -387,7 +387,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IncomingDeleteResponse], ResultWrapper[IncomingDeleteResponse]),
cast_to=cast(Type[Optional[IncomingDeleteResponse]], ResultWrapper[IncomingDeleteResponse]),
)

async def get(
Expand All @@ -400,7 +400,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> IncomingGetResponse:
) -> Optional[IncomingGetResponse]:
"""
Get secondary zone configuration for incoming zone transfers.
Expand All @@ -424,7 +424,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[IncomingGetResponse], ResultWrapper[IncomingGetResponse]),
cast_to=cast(Type[Optional[IncomingGetResponse]], ResultWrapper[IncomingGetResponse]),
)


Expand Down
Loading

0 comments on commit cf99b9b

Please sign in to comment.