diff --git a/api.md b/api.md
index 301f9c2aa7cd..b476b3327d69 100644
--- a/api.md
+++ b/api.md
@@ -2338,10 +2338,10 @@ from cloudflare.types.secondary_dns import (
Methods:
-- client.secondary_dns.incoming.create(\*, zone_id, \*\*params) -> IncomingCreateResponse
-- client.secondary_dns.incoming.update(\*, zone_id, \*\*params) -> IncomingUpdateResponse
-- client.secondary_dns.incoming.delete(\*, zone_id, \*\*params) -> IncomingDeleteResponse
-- client.secondary_dns.incoming.get(\*, zone_id) -> IncomingGetResponse
+- client.secondary_dns.incoming.create(\*, zone_id, \*\*params) -> Optional
+- client.secondary_dns.incoming.update(\*, zone_id, \*\*params) -> Optional
+- client.secondary_dns.incoming.delete(\*, zone_id, \*\*params) -> Optional
+- client.secondary_dns.incoming.get(\*, zone_id) -> Optional
## OutgoingResource
@@ -2363,13 +2363,13 @@ from cloudflare.types.secondary_dns import (
Methods:
-- client.secondary_dns.outgoing.create(\*, zone_id, \*\*params) -> OutgoingCreateResponse
-- client.secondary_dns.outgoing.update(\*, zone_id, \*\*params) -> OutgoingUpdateResponse
-- client.secondary_dns.outgoing.delete(\*, zone_id, \*\*params) -> OutgoingDeleteResponse
+- client.secondary_dns.outgoing.create(\*, zone_id, \*\*params) -> Optional
+- client.secondary_dns.outgoing.update(\*, zone_id, \*\*params) -> Optional
+- client.secondary_dns.outgoing.delete(\*, zone_id, \*\*params) -> Optional
- client.secondary_dns.outgoing.disable(\*, zone_id, \*\*params) -> str
- client.secondary_dns.outgoing.enable(\*, zone_id, \*\*params) -> str
- client.secondary_dns.outgoing.force_notify(\*, zone_id, \*\*params) -> str
-- client.secondary_dns.outgoing.get(\*, zone_id) -> OutgoingGetResponse
+- client.secondary_dns.outgoing.get(\*, zone_id) -> Optional
### Status
@@ -2387,11 +2387,11 @@ from cloudflare.types.secondary_dns import ACL, ACLDeleteResponse
Methods:
-- client.secondary_dns.acls.create(\*, account_id, \*\*params) -> ACL
-- client.secondary_dns.acls.update(acl_id, \*, account_id, \*\*params) -> ACL
+- client.secondary_dns.acls.create(\*, account_id, \*\*params) -> Optional
+- client.secondary_dns.acls.update(acl_id, \*, account_id, \*\*params) -> Optional
- client.secondary_dns.acls.list(\*, account_id) -> SyncSinglePage[ACL]
-- client.secondary_dns.acls.delete(acl_id, \*, account_id, \*\*params) -> ACLDeleteResponse
-- client.secondary_dns.acls.get(acl_id, \*, account_id) -> ACL
+- client.secondary_dns.acls.delete(acl_id, \*, account_id, \*\*params) -> Optional
+- client.secondary_dns.acls.get(acl_id, \*, account_id) -> Optional
## Peers
@@ -2403,11 +2403,11 @@ from cloudflare.types.secondary_dns import Peer, PeerDeleteResponse
Methods:
-- client.secondary_dns.peers.create(\*, account_id, \*\*params) -> Peer
-- client.secondary_dns.peers.update(peer_id, \*, account_id, \*\*params) -> Peer
+- client.secondary_dns.peers.create(\*, account_id, \*\*params) -> Optional
+- client.secondary_dns.peers.update(peer_id, \*, account_id, \*\*params) -> Optional
- client.secondary_dns.peers.list(\*, account_id) -> SyncSinglePage[Peer]
-- client.secondary_dns.peers.delete(peer_id, \*, account_id, \*\*params) -> PeerDeleteResponse
-- client.secondary_dns.peers.get(peer_id, \*, account_id) -> Peer
+- client.secondary_dns.peers.delete(peer_id, \*, account_id, \*\*params) -> Optional
+- client.secondary_dns.peers.get(peer_id, \*, account_id) -> Optional
## TSIGs
@@ -2419,11 +2419,11 @@ from cloudflare.types.secondary_dns import TSIG, TSIGDeleteResponse
Methods:
-- client.secondary_dns.tsigs.create(\*, account_id, \*\*params) -> TSIG
-- client.secondary_dns.tsigs.update(tsig_id, \*, account_id, \*\*params) -> TSIG
+- client.secondary_dns.tsigs.create(\*, account_id, \*\*params) -> Optional
+- client.secondary_dns.tsigs.update(tsig_id, \*, account_id, \*\*params) -> Optional
- client.secondary_dns.tsigs.list(\*, account_id) -> SyncSinglePage[TSIG]
-- client.secondary_dns.tsigs.delete(tsig_id, \*, account_id, \*\*params) -> TSIGDeleteResponse
-- client.secondary_dns.tsigs.get(tsig_id, \*, account_id) -> TSIG
+- client.secondary_dns.tsigs.delete(tsig_id, \*, account_id, \*\*params) -> Optional
+- client.secondary_dns.tsigs.get(tsig_id, \*, account_id) -> Optional
# WaitingRooms
diff --git a/src/cloudflare/resources/secondary_dns/acls.py b/src/cloudflare/resources/secondary_dns/acls.py
index 1f6d3a76a6c9..b861b8b5fe64 100644
--- a/src/cloudflare/resources/secondary_dns/acls.py
+++ b/src/cloudflare/resources/secondary_dns/acls.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
import httpx
@@ -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.
@@ -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(
@@ -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.
@@ -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(
@@ -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.
@@ -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(
@@ -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.
@@ -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]),
)
@@ -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.
@@ -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(
@@ -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.
@@ -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(
@@ -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.
@@ -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(
@@ -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.
@@ -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]),
)
diff --git a/src/cloudflare/resources/secondary_dns/incoming.py b/src/cloudflare/resources/secondary_dns/incoming.py
index 336b3436e0a8..3acee66761ed 100644
--- a/src/cloudflare/resources/secondary_dns/incoming.py
+++ b/src/cloudflare/resources/secondary_dns/incoming.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, Iterable, cast
+from typing import Type, Iterable, Optional, cast
import httpx
@@ -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.
@@ -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(
@@ -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.
@@ -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(
@@ -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.
@@ -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(
@@ -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.
@@ -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]),
)
@@ -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.
@@ -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(
@@ -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.
@@ -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(
@@ -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.
@@ -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(
@@ -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.
@@ -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]),
)
diff --git a/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py b/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py
index a453dd56e0d0..b2f8e8ea36db 100644
--- a/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py
+++ b/src/cloudflare/resources/secondary_dns/outgoing/outgoing.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, Iterable, cast
+from typing import Type, Iterable, Optional, cast
import httpx
@@ -72,7 +72,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OutgoingCreateResponse:
+ ) -> Optional[OutgoingCreateResponse]:
"""
Create primary zone configuration for outgoing zone transfers.
@@ -107,7 +107,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[OutgoingCreateResponse], ResultWrapper[OutgoingCreateResponse]),
+ cast_to=cast(Type[Optional[OutgoingCreateResponse]], ResultWrapper[OutgoingCreateResponse]),
)
def update(
@@ -122,7 +122,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OutgoingUpdateResponse:
+ ) -> Optional[OutgoingUpdateResponse]:
"""
Update primary zone configuration for outgoing zone transfers.
@@ -157,7 +157,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[OutgoingUpdateResponse], ResultWrapper[OutgoingUpdateResponse]),
+ cast_to=cast(Type[Optional[OutgoingUpdateResponse]], ResultWrapper[OutgoingUpdateResponse]),
)
def delete(
@@ -171,7 +171,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OutgoingDeleteResponse:
+ ) -> Optional[OutgoingDeleteResponse]:
"""
Delete primary zone configuration for outgoing zone transfers.
@@ -196,7 +196,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[OutgoingDeleteResponse], ResultWrapper[OutgoingDeleteResponse]),
+ cast_to=cast(Type[Optional[OutgoingDeleteResponse]], ResultWrapper[OutgoingDeleteResponse]),
)
def disable(
@@ -327,7 +327,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OutgoingGetResponse:
+ ) -> Optional[OutgoingGetResponse]:
"""
Get primary zone configuration for outgoing zone transfers.
@@ -351,7 +351,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[OutgoingGetResponse], ResultWrapper[OutgoingGetResponse]),
+ cast_to=cast(Type[Optional[OutgoingGetResponse]], ResultWrapper[OutgoingGetResponse]),
)
@@ -380,7 +380,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OutgoingCreateResponse:
+ ) -> Optional[OutgoingCreateResponse]:
"""
Create primary zone configuration for outgoing zone transfers.
@@ -415,7 +415,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[OutgoingCreateResponse], ResultWrapper[OutgoingCreateResponse]),
+ cast_to=cast(Type[Optional[OutgoingCreateResponse]], ResultWrapper[OutgoingCreateResponse]),
)
async def update(
@@ -430,7 +430,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OutgoingUpdateResponse:
+ ) -> Optional[OutgoingUpdateResponse]:
"""
Update primary zone configuration for outgoing zone transfers.
@@ -465,7 +465,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[OutgoingUpdateResponse], ResultWrapper[OutgoingUpdateResponse]),
+ cast_to=cast(Type[Optional[OutgoingUpdateResponse]], ResultWrapper[OutgoingUpdateResponse]),
)
async def delete(
@@ -479,7 +479,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OutgoingDeleteResponse:
+ ) -> Optional[OutgoingDeleteResponse]:
"""
Delete primary zone configuration for outgoing zone transfers.
@@ -504,7 +504,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[OutgoingDeleteResponse], ResultWrapper[OutgoingDeleteResponse]),
+ cast_to=cast(Type[Optional[OutgoingDeleteResponse]], ResultWrapper[OutgoingDeleteResponse]),
)
async def disable(
@@ -635,7 +635,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> OutgoingGetResponse:
+ ) -> Optional[OutgoingGetResponse]:
"""
Get primary zone configuration for outgoing zone transfers.
@@ -659,7 +659,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[OutgoingGetResponse], ResultWrapper[OutgoingGetResponse]),
+ cast_to=cast(Type[Optional[OutgoingGetResponse]], ResultWrapper[OutgoingGetResponse]),
)
diff --git a/src/cloudflare/resources/secondary_dns/peers.py b/src/cloudflare/resources/secondary_dns/peers.py
index 8377b8512128..ccdee7935ef6 100644
--- a/src/cloudflare/resources/secondary_dns/peers.py
+++ b/src/cloudflare/resources/secondary_dns/peers.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
import httpx
@@ -50,7 +50,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Peer:
+ ) -> Optional[Peer]:
"""
Create Peer.
@@ -75,7 +75,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Peer], ResultWrapper[Peer]),
+ cast_to=cast(Type[Optional[Peer]], ResultWrapper[Peer]),
)
def update(
@@ -94,7 +94,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Peer:
+ ) -> Optional[Peer]:
"""
Modify Peer.
@@ -146,7 +146,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Peer], ResultWrapper[Peer]),
+ cast_to=cast(Type[Optional[Peer]], ResultWrapper[Peer]),
)
def list(
@@ -195,7 +195,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PeerDeleteResponse:
+ ) -> Optional[PeerDeleteResponse]:
"""
Delete Peer.
@@ -222,7 +222,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PeerDeleteResponse], ResultWrapper[PeerDeleteResponse]),
+ cast_to=cast(Type[Optional[PeerDeleteResponse]], ResultWrapper[PeerDeleteResponse]),
)
def get(
@@ -236,7 +236,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Peer:
+ ) -> Optional[Peer]:
"""
Get Peer.
@@ -262,7 +262,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Peer], ResultWrapper[Peer]),
+ cast_to=cast(Type[Optional[Peer]], ResultWrapper[Peer]),
)
@@ -286,7 +286,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Peer:
+ ) -> Optional[Peer]:
"""
Create Peer.
@@ -311,7 +311,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Peer], ResultWrapper[Peer]),
+ cast_to=cast(Type[Optional[Peer]], ResultWrapper[Peer]),
)
async def update(
@@ -330,7 +330,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Peer:
+ ) -> Optional[Peer]:
"""
Modify Peer.
@@ -382,7 +382,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Peer], ResultWrapper[Peer]),
+ cast_to=cast(Type[Optional[Peer]], ResultWrapper[Peer]),
)
def list(
@@ -431,7 +431,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PeerDeleteResponse:
+ ) -> Optional[PeerDeleteResponse]:
"""
Delete Peer.
@@ -458,7 +458,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PeerDeleteResponse], ResultWrapper[PeerDeleteResponse]),
+ cast_to=cast(Type[Optional[PeerDeleteResponse]], ResultWrapper[PeerDeleteResponse]),
)
async def get(
@@ -472,7 +472,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Peer:
+ ) -> Optional[Peer]:
"""
Get Peer.
@@ -498,7 +498,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Peer], ResultWrapper[Peer]),
+ cast_to=cast(Type[Optional[Peer]], ResultWrapper[Peer]),
)
diff --git a/src/cloudflare/resources/secondary_dns/tsigs.py b/src/cloudflare/resources/secondary_dns/tsigs.py
index eb255ae63372..e750497b5733 100644
--- a/src/cloudflare/resources/secondary_dns/tsigs.py
+++ b/src/cloudflare/resources/secondary_dns/tsigs.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
import httpx
@@ -52,7 +52,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TSIG:
+ ) -> Optional[TSIG]:
"""
Create TSIG.
@@ -90,7 +90,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TSIG], ResultWrapper[TSIG]),
+ cast_to=cast(Type[Optional[TSIG]], ResultWrapper[TSIG]),
)
def update(
@@ -107,7 +107,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TSIG:
+ ) -> Optional[TSIG]:
"""
Modify TSIG.
@@ -147,7 +147,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TSIG], ResultWrapper[TSIG]),
+ cast_to=cast(Type[Optional[TSIG]], ResultWrapper[TSIG]),
)
def list(
@@ -196,7 +196,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TSIGDeleteResponse:
+ ) -> Optional[TSIGDeleteResponse]:
"""
Delete TSIG.
@@ -223,7 +223,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TSIGDeleteResponse], ResultWrapper[TSIGDeleteResponse]),
+ cast_to=cast(Type[Optional[TSIGDeleteResponse]], ResultWrapper[TSIGDeleteResponse]),
)
def get(
@@ -237,7 +237,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TSIG:
+ ) -> Optional[TSIG]:
"""
Get TSIG.
@@ -263,7 +263,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TSIG], ResultWrapper[TSIG]),
+ cast_to=cast(Type[Optional[TSIG]], ResultWrapper[TSIG]),
)
@@ -289,7 +289,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TSIG:
+ ) -> Optional[TSIG]:
"""
Create TSIG.
@@ -327,7 +327,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TSIG], ResultWrapper[TSIG]),
+ cast_to=cast(Type[Optional[TSIG]], ResultWrapper[TSIG]),
)
async def update(
@@ -344,7 +344,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TSIG:
+ ) -> Optional[TSIG]:
"""
Modify TSIG.
@@ -384,7 +384,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TSIG], ResultWrapper[TSIG]),
+ cast_to=cast(Type[Optional[TSIG]], ResultWrapper[TSIG]),
)
def list(
@@ -433,7 +433,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TSIGDeleteResponse:
+ ) -> Optional[TSIGDeleteResponse]:
"""
Delete TSIG.
@@ -460,7 +460,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TSIGDeleteResponse], ResultWrapper[TSIGDeleteResponse]),
+ cast_to=cast(Type[Optional[TSIGDeleteResponse]], ResultWrapper[TSIGDeleteResponse]),
)
async def get(
@@ -474,7 +474,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TSIG:
+ ) -> Optional[TSIG]:
"""
Get TSIG.
@@ -500,7 +500,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TSIG], ResultWrapper[TSIG]),
+ cast_to=cast(Type[Optional[TSIG]], ResultWrapper[TSIG]),
)
diff --git a/tests/api_resources/secondary_dns/test_acls.py b/tests/api_resources/secondary_dns/test_acls.py
index 7b89e068b429..2b05db03287c 100644
--- a/tests/api_resources/secondary_dns/test_acls.py
+++ b/tests/api_resources/secondary_dns/test_acls.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -41,7 +41,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -54,7 +54,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -76,7 +76,7 @@ def test_method_update(self, client: Cloudflare) -> None:
ip_range="192.0.2.53/28",
name="my-acl-1",
)
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -91,7 +91,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -106,7 +106,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -179,7 +179,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(ACLDeleteResponse, acl, path=["response"])
+ assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -193,7 +193,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = response.parse()
- assert_matches_type(ACLDeleteResponse, acl, path=["response"])
+ assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -207,7 +207,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = response.parse()
- assert_matches_type(ACLDeleteResponse, acl, path=["response"])
+ assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -235,7 +235,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"23ff594956f20c2a721606e94745a8aa",
account_id="01a7362d577a6c3019a474fd6f485823",
)
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -248,7 +248,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -261,7 +261,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -291,7 +291,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -304,7 +304,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = await response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -317,7 +317,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = await response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -339,7 +339,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
ip_range="192.0.2.53/28",
name="my-acl-1",
)
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -354,7 +354,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = await response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -369,7 +369,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = await response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -442,7 +442,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(ACLDeleteResponse, acl, path=["response"])
+ assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -456,7 +456,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = await response.parse()
- assert_matches_type(ACLDeleteResponse, acl, path=["response"])
+ assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -470,7 +470,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = await response.parse()
- assert_matches_type(ACLDeleteResponse, acl, path=["response"])
+ assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -498,7 +498,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"23ff594956f20c2a721606e94745a8aa",
account_id="01a7362d577a6c3019a474fd6f485823",
)
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -511,7 +511,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = await response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -524,7 +524,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
acl = await response.parse()
- assert_matches_type(ACL, acl, path=["response"])
+ assert_matches_type(Optional[ACL], acl, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/secondary_dns/test_incoming.py b/tests/api_resources/secondary_dns/test_incoming.py
index f2619c9b378a..d1e07ab8c8dd 100644
--- a/tests/api_resources/secondary_dns/test_incoming.py
+++ b/tests/api_resources/secondary_dns/test_incoming.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None:
name="www.example.com.",
peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"],
)
- assert_matches_type(IncomingCreateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -46,7 +46,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = response.parse()
- assert_matches_type(IncomingCreateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -61,7 +61,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = response.parse()
- assert_matches_type(IncomingCreateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -85,7 +85,7 @@ def test_method_update(self, client: Cloudflare) -> None:
name="www.example.com.",
peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"],
)
- assert_matches_type(IncomingUpdateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -100,7 +100,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = response.parse()
- assert_matches_type(IncomingUpdateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -115,7 +115,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = response.parse()
- assert_matches_type(IncomingUpdateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -137,7 +137,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
zone_id="269d8f4853475ca241c4e730be286b20",
body={},
)
- assert_matches_type(IncomingDeleteResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -150,7 +150,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = response.parse()
- assert_matches_type(IncomingDeleteResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -163,7 +163,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = response.parse()
- assert_matches_type(IncomingDeleteResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -182,7 +182,7 @@ def test_method_get(self, client: Cloudflare) -> None:
incoming = client.secondary_dns.incoming.get(
zone_id="269d8f4853475ca241c4e730be286b20",
)
- assert_matches_type(IncomingGetResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -194,7 +194,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = response.parse()
- assert_matches_type(IncomingGetResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -206,7 +206,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = response.parse()
- assert_matches_type(IncomingGetResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -231,7 +231,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
name="www.example.com.",
peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"],
)
- assert_matches_type(IncomingCreateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -246,7 +246,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = await response.parse()
- assert_matches_type(IncomingCreateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -261,7 +261,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = await response.parse()
- assert_matches_type(IncomingCreateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingCreateResponse], incoming, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -285,7 +285,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
name="www.example.com.",
peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"],
)
- assert_matches_type(IncomingUpdateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -300,7 +300,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = await response.parse()
- assert_matches_type(IncomingUpdateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -315,7 +315,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = await response.parse()
- assert_matches_type(IncomingUpdateResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingUpdateResponse], incoming, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -337,7 +337,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
zone_id="269d8f4853475ca241c4e730be286b20",
body={},
)
- assert_matches_type(IncomingDeleteResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -350,7 +350,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = await response.parse()
- assert_matches_type(IncomingDeleteResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -363,7 +363,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = await response.parse()
- assert_matches_type(IncomingDeleteResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingDeleteResponse], incoming, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -382,7 +382,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
incoming = await async_client.secondary_dns.incoming.get(
zone_id="269d8f4853475ca241c4e730be286b20",
)
- assert_matches_type(IncomingGetResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -394,7 +394,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = await response.parse()
- assert_matches_type(IncomingGetResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -406,7 +406,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
incoming = await response.parse()
- assert_matches_type(IncomingGetResponse, incoming, path=["response"])
+ assert_matches_type(Optional[IncomingGetResponse], incoming, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/secondary_dns/test_outgoing.py b/tests/api_resources/secondary_dns/test_outgoing.py
index 5eb4ff40ab9d..8f1280a12c21 100644
--- a/tests/api_resources/secondary_dns/test_outgoing.py
+++ b/tests/api_resources/secondary_dns/test_outgoing.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
name="www.example.com.",
peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"],
)
- assert_matches_type(OutgoingCreateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -44,7 +44,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = response.parse()
- assert_matches_type(OutgoingCreateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -58,7 +58,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = response.parse()
- assert_matches_type(OutgoingCreateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -80,7 +80,7 @@ def test_method_update(self, client: Cloudflare) -> None:
name="www.example.com.",
peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"],
)
- assert_matches_type(OutgoingUpdateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -94,7 +94,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = response.parse()
- assert_matches_type(OutgoingUpdateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -108,7 +108,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = response.parse()
- assert_matches_type(OutgoingUpdateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -129,7 +129,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
zone_id="269d8f4853475ca241c4e730be286b20",
body={},
)
- assert_matches_type(OutgoingDeleteResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -142,7 +142,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = response.parse()
- assert_matches_type(OutgoingDeleteResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -155,7 +155,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = response.parse()
- assert_matches_type(OutgoingDeleteResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -312,7 +312,7 @@ def test_method_get(self, client: Cloudflare) -> None:
outgoing = client.secondary_dns.outgoing.get(
zone_id="269d8f4853475ca241c4e730be286b20",
)
- assert_matches_type(OutgoingGetResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -324,7 +324,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = response.parse()
- assert_matches_type(OutgoingGetResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -336,7 +336,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = response.parse()
- assert_matches_type(OutgoingGetResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -360,7 +360,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
name="www.example.com.",
peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"],
)
- assert_matches_type(OutgoingCreateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -374,7 +374,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = await response.parse()
- assert_matches_type(OutgoingCreateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -388,7 +388,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = await response.parse()
- assert_matches_type(OutgoingCreateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingCreateResponse], outgoing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -410,7 +410,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
name="www.example.com.",
peers=["23ff594956f20c2a721606e94745a8aa", "00920f38ce07c2e2f4df50b1f61d4194"],
)
- assert_matches_type(OutgoingUpdateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -424,7 +424,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = await response.parse()
- assert_matches_type(OutgoingUpdateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -438,7 +438,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = await response.parse()
- assert_matches_type(OutgoingUpdateResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingUpdateResponse], outgoing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -459,7 +459,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
zone_id="269d8f4853475ca241c4e730be286b20",
body={},
)
- assert_matches_type(OutgoingDeleteResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -472,7 +472,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = await response.parse()
- assert_matches_type(OutgoingDeleteResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -485,7 +485,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = await response.parse()
- assert_matches_type(OutgoingDeleteResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingDeleteResponse], outgoing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -642,7 +642,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
outgoing = await async_client.secondary_dns.outgoing.get(
zone_id="269d8f4853475ca241c4e730be286b20",
)
- assert_matches_type(OutgoingGetResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -654,7 +654,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = await response.parse()
- assert_matches_type(OutgoingGetResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -666,7 +666,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
outgoing = await response.parse()
- assert_matches_type(OutgoingGetResponse, outgoing, path=["response"])
+ assert_matches_type(Optional[OutgoingGetResponse], outgoing, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/secondary_dns/test_peers.py b/tests/api_resources/secondary_dns/test_peers.py
index c42e05c6157e..1de87b407c40 100644
--- a/tests/api_resources/secondary_dns/test_peers.py
+++ b/tests/api_resources/secondary_dns/test_peers.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -41,7 +41,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -54,7 +54,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -75,7 +75,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
name="my-peer-1",
)
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -89,7 +89,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
port=53,
tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a",
)
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -103,7 +103,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -117,7 +117,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -188,7 +188,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(PeerDeleteResponse, peer, path=["response"])
+ assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -202,7 +202,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = response.parse()
- assert_matches_type(PeerDeleteResponse, peer, path=["response"])
+ assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -216,7 +216,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = response.parse()
- assert_matches_type(PeerDeleteResponse, peer, path=["response"])
+ assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -244,7 +244,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"23ff594956f20c2a721606e94745a8aa",
account_id="01a7362d577a6c3019a474fd6f485823",
)
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -257,7 +257,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -270,7 +270,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -300,7 +300,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -313,7 +313,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = await response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -326,7 +326,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = await response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -347,7 +347,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
name="my-peer-1",
)
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -361,7 +361,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
port=53,
tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a",
)
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -375,7 +375,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = await response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -389,7 +389,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = await response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -460,7 +460,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(PeerDeleteResponse, peer, path=["response"])
+ assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -474,7 +474,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = await response.parse()
- assert_matches_type(PeerDeleteResponse, peer, path=["response"])
+ assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -488,7 +488,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = await response.parse()
- assert_matches_type(PeerDeleteResponse, peer, path=["response"])
+ assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -516,7 +516,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"23ff594956f20c2a721606e94745a8aa",
account_id="01a7362d577a6c3019a474fd6f485823",
)
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -529,7 +529,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = await response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -542,7 +542,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
peer = await response.parse()
- assert_matches_type(Peer, peer, path=["response"])
+ assert_matches_type(Optional[Peer], peer, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/secondary_dns/test_tsigs.py b/tests/api_resources/secondary_dns/test_tsigs.py
index b0370353a289..e4d734d402d5 100644
--- a/tests/api_resources/secondary_dns/test_tsigs.py
+++ b/tests/api_resources/secondary_dns/test_tsigs.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
name="tsig.customer.cf.",
secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c",
)
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -45,7 +45,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -60,7 +60,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -85,7 +85,7 @@ def test_method_update(self, client: Cloudflare) -> None:
name="tsig.customer.cf.",
secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c",
)
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -101,7 +101,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -117,7 +117,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -192,7 +192,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(TSIGDeleteResponse, tsig, path=["response"])
+ assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -206,7 +206,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = response.parse()
- assert_matches_type(TSIGDeleteResponse, tsig, path=["response"])
+ assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -220,7 +220,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = response.parse()
- assert_matches_type(TSIGDeleteResponse, tsig, path=["response"])
+ assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -248,7 +248,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"69cd1e104af3e6ed3cb344f263fd0d5a",
account_id="01a7362d577a6c3019a474fd6f485823",
)
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -261,7 +261,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -274,7 +274,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -306,7 +306,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
name="tsig.customer.cf.",
secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c",
)
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -321,7 +321,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = await response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -336,7 +336,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = await response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -361,7 +361,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
name="tsig.customer.cf.",
secret="caf79a7804b04337c9c66ccd7bef9190a1e1679b5dd03d8aa10f7ad45e1a9dab92b417896c15d4d007c7c14194538d2a5d0feffdecc5a7f0e1c570cfa700837c",
)
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -377,7 +377,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = await response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -393,7 +393,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = await response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -468,7 +468,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="01a7362d577a6c3019a474fd6f485823",
body={},
)
- assert_matches_type(TSIGDeleteResponse, tsig, path=["response"])
+ assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -482,7 +482,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = await response.parse()
- assert_matches_type(TSIGDeleteResponse, tsig, path=["response"])
+ assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -496,7 +496,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = await response.parse()
- assert_matches_type(TSIGDeleteResponse, tsig, path=["response"])
+ assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -524,7 +524,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"69cd1e104af3e6ed3cb344f263fd0d5a",
account_id="01a7362d577a6c3019a474fd6f485823",
)
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -537,7 +537,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = await response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -550,7 +550,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tsig = await response.parse()
- assert_matches_type(TSIG, tsig, path=["response"])
+ assert_matches_type(Optional[TSIG], tsig, path=["response"])
assert cast(Any, response.is_closed) is True