diff --git a/api.md b/api.md
index 6884ba0edfb6..737197d88fd7 100644
--- a/api.md
+++ b/api.md
@@ -4979,11 +4979,11 @@ from cloudflare.types.zero_trust import (
Methods:
-- client.zero_trust.identity_providers.create(\*, account_id, zone_id, \*\*params) -> IdentityProvider
-- client.zero_trust.identity_providers.update(uuid, \*, account_id, zone_id, \*\*params) -> IdentityProvider
+- client.zero_trust.identity_providers.create(\*, account_id, zone_id, \*\*params) -> Optional
+- client.zero_trust.identity_providers.update(uuid, \*, account_id, zone_id, \*\*params) -> Optional
- client.zero_trust.identity_providers.list(\*, account_id, zone_id) -> SyncSinglePage[IdentityProviderListResponse]
-- client.zero_trust.identity_providers.delete(uuid, \*, account_id, zone_id) -> IdentityProviderDeleteResponse
-- client.zero_trust.identity_providers.get(uuid, \*, account_id, zone_id) -> IdentityProvider
+- client.zero_trust.identity_providers.delete(uuid, \*, account_id, zone_id) -> Optional
+- client.zero_trust.identity_providers.get(uuid, \*, account_id, zone_id) -> Optional
## Organizations
@@ -4995,9 +4995,9 @@ from cloudflare.types.zero_trust import LoginDesign, Organization, OrganizationR
Methods:
-- client.zero_trust.organizations.create(\*, account_id, zone_id, \*\*params) -> Organization
-- client.zero_trust.organizations.update(\*, account_id, zone_id, \*\*params) -> Organization
-- client.zero_trust.organizations.list(\*, account_id, zone_id) -> Organization
+- client.zero_trust.organizations.create(\*, account_id, zone_id, \*\*params) -> Optional
+- client.zero_trust.organizations.update(\*, account_id, zone_id, \*\*params) -> Optional
+- client.zero_trust.organizations.list(\*, account_id, zone_id) -> Optional
- client.zero_trust.organizations.revoke_users(\*, account_id, zone_id, \*\*params) -> Optional
## Seats
@@ -5067,11 +5067,11 @@ from cloudflare.types.zero_trust.access import (
Methods:
-- client.zero_trust.access.applications.create(\*, account_id, zone_id, \*\*params) -> Application
-- client.zero_trust.access.applications.update(app_id, \*, account_id, zone_id, \*\*params) -> Application
+- client.zero_trust.access.applications.create(\*, account_id, zone_id, \*\*params) -> Optional
+- client.zero_trust.access.applications.update(app_id, \*, account_id, zone_id, \*\*params) -> Optional
- client.zero_trust.access.applications.list(\*, account_id, zone_id) -> SyncSinglePage[Application]
-- client.zero_trust.access.applications.delete(app_id, \*, account_id, zone_id) -> ApplicationDeleteResponse
-- client.zero_trust.access.applications.get(app_id, \*, account_id, zone_id) -> Application
+- client.zero_trust.access.applications.delete(app_id, \*, account_id, zone_id) -> Optional
+- client.zero_trust.access.applications.get(app_id, \*, account_id, zone_id) -> Optional
- client.zero_trust.access.applications.revoke_tokens(app_id, \*, account_id, zone_id) -> object
#### CAs
@@ -5089,10 +5089,10 @@ from cloudflare.types.zero_trust.access.applications import (
Methods:
-- client.zero_trust.access.applications.cas.create(uuid, \*, account_id, zone_id) -> CACreateResponse
+- client.zero_trust.access.applications.cas.create(uuid, \*, account_id, zone_id) -> Optional
- client.zero_trust.access.applications.cas.list(\*, account_id, zone_id) -> SyncSinglePage[CA]
-- client.zero_trust.access.applications.cas.delete(uuid, \*, account_id, zone_id) -> CADeleteResponse
-- client.zero_trust.access.applications.cas.get(uuid, \*, account_id, zone_id) -> CAGetResponse
+- client.zero_trust.access.applications.cas.delete(uuid, \*, account_id, zone_id) -> Optional
+- client.zero_trust.access.applications.cas.get(uuid, \*, account_id, zone_id) -> Optional
#### UserPolicyChecks
@@ -5107,7 +5107,7 @@ from cloudflare.types.zero_trust.access.applications import (
Methods:
-- client.zero_trust.access.applications.user_policy_checks.list(app_id, \*, account_id, zone_id) -> UserPolicyCheckListResponse
+- client.zero_trust.access.applications.user_policy_checks.list(app_id, \*, account_id, zone_id) -> Optional
#### Policies
@@ -5123,11 +5123,11 @@ from cloudflare.types.zero_trust.access.applications import (
Methods:
-- client.zero_trust.access.applications.policies.create(uuid, \*, account_id, zone_id, \*\*params) -> Policy
-- client.zero_trust.access.applications.policies.update(uuid, \*, uuid1, account_id, zone_id, \*\*params) -> Policy
+- client.zero_trust.access.applications.policies.create(uuid, \*, account_id, zone_id, \*\*params) -> Optional
+- client.zero_trust.access.applications.policies.update(uuid, \*, uuid1, account_id, zone_id, \*\*params) -> Optional
- client.zero_trust.access.applications.policies.list(uuid, \*, account_id, zone_id) -> SyncSinglePage[Policy]
-- client.zero_trust.access.applications.policies.delete(uuid, \*, uuid1, account_id, zone_id) -> PolicyDeleteResponse
-- client.zero_trust.access.applications.policies.get(uuid, \*, uuid1, account_id, zone_id) -> Policy
+- client.zero_trust.access.applications.policies.delete(uuid, \*, uuid1, account_id, zone_id) -> Optional
+- client.zero_trust.access.applications.policies.get(uuid, \*, uuid1, account_id, zone_id) -> Optional
### Certificates
@@ -5143,11 +5143,11 @@ from cloudflare.types.zero_trust.access import (
Methods:
-- client.zero_trust.access.certificates.create(\*, account_id, zone_id, \*\*params) -> Certificate
-- client.zero_trust.access.certificates.update(uuid, \*, account_id, zone_id, \*\*params) -> Certificate
+- client.zero_trust.access.certificates.create(\*, account_id, zone_id, \*\*params) -> Optional
+- client.zero_trust.access.certificates.update(uuid, \*, account_id, zone_id, \*\*params) -> Optional
- client.zero_trust.access.certificates.list(\*, account_id, zone_id) -> SyncSinglePage[Certificate]
-- client.zero_trust.access.certificates.delete(uuid, \*, account_id, zone_id) -> CertificateDeleteResponse
-- client.zero_trust.access.certificates.get(uuid, \*, account_id, zone_id) -> Certificate
+- client.zero_trust.access.certificates.delete(uuid, \*, account_id, zone_id) -> Optional
+- client.zero_trust.access.certificates.get(uuid, \*, account_id, zone_id) -> Optional
#### Settings
@@ -5176,11 +5176,11 @@ from cloudflare.types.zero_trust.access import ZeroTrustGroup, GroupDeleteRespon
Methods:
-- client.zero_trust.access.groups.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustGroup
-- client.zero_trust.access.groups.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustGroup
+- client.zero_trust.access.groups.create(\*, account_id, zone_id, \*\*params) -> Optional
+- client.zero_trust.access.groups.update(uuid, \*, account_id, zone_id, \*\*params) -> Optional
- client.zero_trust.access.groups.list(\*, account_id, zone_id) -> SyncSinglePage[ZeroTrustGroup]
-- client.zero_trust.access.groups.delete(uuid, \*, account_id, zone_id) -> GroupDeleteResponse
-- client.zero_trust.access.groups.get(uuid, \*, account_id, zone_id) -> ZeroTrustGroup
+- client.zero_trust.access.groups.delete(uuid, \*, account_id, zone_id) -> Optional
+- client.zero_trust.access.groups.get(uuid, \*, account_id, zone_id) -> Optional
### ServiceTokens
@@ -5196,12 +5196,12 @@ from cloudflare.types.zero_trust.access import (
Methods:
-- client.zero_trust.access.service_tokens.create(\*, account_id, zone_id, \*\*params) -> ServiceTokenCreateResponse
-- client.zero_trust.access.service_tokens.update(uuid, \*, account_id, zone_id, \*\*params) -> ServiceToken
+- client.zero_trust.access.service_tokens.create(\*, account_id, zone_id, \*\*params) -> Optional
+- client.zero_trust.access.service_tokens.update(uuid, \*, account_id, zone_id, \*\*params) -> Optional
- client.zero_trust.access.service_tokens.list(\*, account_id, zone_id) -> SyncSinglePage[ServiceToken]
-- client.zero_trust.access.service_tokens.delete(uuid, \*, account_id, zone_id) -> ServiceToken
-- client.zero_trust.access.service_tokens.refresh(uuid, \*, identifier) -> ServiceToken
-- client.zero_trust.access.service_tokens.rotate(uuid, \*, identifier) -> ServiceTokenRotateResponse
+- client.zero_trust.access.service_tokens.delete(uuid, \*, account_id, zone_id) -> Optional
+- client.zero_trust.access.service_tokens.refresh(uuid, \*, identifier) -> Optional
+- client.zero_trust.access.service_tokens.rotate(uuid, \*, identifier) -> Optional
### Bookmarks
@@ -5213,11 +5213,11 @@ from cloudflare.types.zero_trust.access import Bookmark, BookmarkDeleteResponse
Methods:
-- client.zero_trust.access.bookmarks.create(uuid, \*, identifier, \*\*params) -> Bookmark
-- client.zero_trust.access.bookmarks.update(uuid, \*, identifier, \*\*params) -> Bookmark
+- client.zero_trust.access.bookmarks.create(uuid, \*, identifier, \*\*params) -> Optional
+- client.zero_trust.access.bookmarks.update(uuid, \*, identifier, \*\*params) -> Optional
- client.zero_trust.access.bookmarks.list(identifier) -> SyncSinglePage[Bookmark]
-- client.zero_trust.access.bookmarks.delete(uuid, \*, identifier, \*\*params) -> BookmarkDeleteResponse
-- client.zero_trust.access.bookmarks.get(uuid, \*, identifier) -> Bookmark
+- client.zero_trust.access.bookmarks.delete(uuid, \*, identifier, \*\*params) -> Optional
+- client.zero_trust.access.bookmarks.get(uuid, \*, identifier) -> Optional
### Keys
@@ -5229,9 +5229,9 @@ from cloudflare.types.zero_trust.access import KeyUpdateResponse, KeyGetResponse
Methods:
-- client.zero_trust.access.keys.update(identifier, \*\*params) -> KeyUpdateResponse
-- client.zero_trust.access.keys.get(identifier) -> KeyGetResponse
-- client.zero_trust.access.keys.rotate(identifier) -> KeyRotateResponse
+- client.zero_trust.access.keys.update(identifier, \*\*params) -> Optional
+- client.zero_trust.access.keys.get(identifier) -> Optional
+- client.zero_trust.access.keys.rotate(identifier) -> Optional
### Logs
@@ -5273,7 +5273,7 @@ from cloudflare.types.zero_trust.access.users import (
Methods:
- client.zero_trust.access.users.active_sessions.list(id, \*, identifier) -> SyncSinglePage[ActiveSessionListResponse]
-- client.zero_trust.access.users.active_sessions.get(nonce, \*, identifier, id) -> ActiveSessionGetResponse
+- client.zero_trust.access.users.active_sessions.get(nonce, \*, identifier, id) -> Optional
#### LastSeenIdentity
@@ -5285,7 +5285,7 @@ from cloudflare.types.zero_trust.access.users import Identity
Methods:
-- client.zero_trust.access.users.last_seen_identity.get(id, \*, identifier) -> Identity
+- client.zero_trust.access.users.last_seen_identity.get(id, \*, identifier) -> Optional
#### FailedLogins
@@ -5313,11 +5313,11 @@ from cloudflare.types.zero_trust.access import (
Methods:
-- client.zero_trust.access.custom_pages.create(identifier, \*\*params) -> CustomPageWithoutHTML
-- client.zero_trust.access.custom_pages.update(uuid, \*, identifier, \*\*params) -> CustomPageWithoutHTML
+- client.zero_trust.access.custom_pages.create(identifier, \*\*params) -> Optional
+- client.zero_trust.access.custom_pages.update(uuid, \*, identifier, \*\*params) -> Optional
- client.zero_trust.access.custom_pages.list(identifier) -> SyncSinglePage[CustomPageWithoutHTML]
-- client.zero_trust.access.custom_pages.delete(uuid, \*, identifier) -> CustomPageDeleteResponse
-- client.zero_trust.access.custom_pages.get(uuid, \*, identifier) -> CustomPage
+- client.zero_trust.access.custom_pages.delete(uuid, \*, identifier) -> Optional
+- client.zero_trust.access.custom_pages.get(uuid, \*, identifier) -> Optional
### Tags
@@ -5329,11 +5329,11 @@ from cloudflare.types.zero_trust.access import Tag, TagDeleteResponse
Methods:
-- client.zero_trust.access.tags.create(identifier, \*\*params) -> Tag
-- client.zero_trust.access.tags.update(tag_name, \*, identifier, \*\*params) -> Tag
+- client.zero_trust.access.tags.create(identifier, \*\*params) -> Optional
+- client.zero_trust.access.tags.update(tag_name, \*, identifier, \*\*params) -> Optional
- client.zero_trust.access.tags.list(identifier) -> SyncSinglePage[Tag]
-- client.zero_trust.access.tags.delete(name, \*, identifier) -> TagDeleteResponse
-- client.zero_trust.access.tags.get(name, \*, identifier) -> Tag
+- client.zero_trust.access.tags.delete(name, \*, identifier) -> Optional
+- client.zero_trust.access.tags.get(name, \*, identifier) -> Optional
## DEX
diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py
index 0b41414ea3f9..ac06235e1213 100644
--- a/src/cloudflare/resources/zero_trust/access/applications/applications.py
+++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, List, Type, cast, overload
+from typing import Any, List, Type, Optional, cast, overload
from typing_extensions import Literal
import httpx
@@ -107,6 +107,7 @@ def create(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -120,7 +121,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -168,6 +169,9 @@ def create(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -218,7 +222,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -277,6 +281,7 @@ def create(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -290,7 +295,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -338,6 +343,9 @@ def create(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -388,6 +396,7 @@ def create(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -401,7 +410,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -449,6 +458,9 @@ def create(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -494,7 +506,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -541,7 +553,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -588,7 +600,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -637,7 +649,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -691,6 +703,7 @@ def create(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -705,7 +718,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
if account_id and zone_id:
raise ValueError("You cannot provide both account_id and zone_id")
@@ -719,7 +732,7 @@ def create(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- Application,
+ Optional[Application],
self._post(
f"/{account_or_zone}/{account_or_zone_id}/access/apps",
body=maybe_transform(
@@ -739,6 +752,7 @@ def create(
"http_only_cookie_attribute": http_only_cookie_attribute,
"logo_url": logo_url,
"name": name,
+ "options_preflight_bypass": options_preflight_bypass,
"path_cookie_attribute": path_cookie_attribute,
"same_site_cookie_attribute": same_site_cookie_attribute,
"self_hosted_domains": self_hosted_domains,
@@ -785,6 +799,7 @@ def update(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -798,7 +813,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -848,6 +863,9 @@ def update(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -899,7 +917,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -961,6 +979,7 @@ def update(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -974,7 +993,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -1024,6 +1043,9 @@ def update(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -1075,6 +1097,7 @@ def update(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -1088,7 +1111,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -1138,6 +1161,9 @@ def update(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -1184,7 +1210,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -1234,7 +1260,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -1284,7 +1310,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -1336,7 +1362,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -1393,6 +1419,7 @@ def update(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -1407,7 +1434,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
if account_id and zone_id:
raise ValueError("You cannot provide both account_id and zone_id")
@@ -1421,7 +1448,7 @@ def update(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- Application,
+ Optional[Application],
self._put(
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}",
body=maybe_transform(
@@ -1441,6 +1468,7 @@ def update(
"http_only_cookie_attribute": http_only_cookie_attribute,
"logo_url": logo_url,
"name": name,
+ "options_preflight_bypass": options_preflight_bypass,
"path_cookie_attribute": path_cookie_attribute,
"same_site_cookie_attribute": same_site_cookie_attribute,
"self_hosted_domains": self_hosted_domains,
@@ -1526,7 +1554,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ApplicationDeleteResponse:
+ ) -> Optional[ApplicationDeleteResponse]:
"""
Deletes an application from Access.
@@ -1566,7 +1594,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ApplicationDeleteResponse], ResultWrapper[ApplicationDeleteResponse]),
+ cast_to=cast(Type[Optional[ApplicationDeleteResponse]], ResultWrapper[ApplicationDeleteResponse]),
)
def get(
@@ -1581,7 +1609,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Fetches information about an Access application.
@@ -1613,7 +1641,7 @@ def get(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- Application,
+ Optional[Application],
self._get(
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}",
options=make_request_options(
@@ -1727,6 +1755,7 @@ async def create(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -1740,7 +1769,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -1788,6 +1817,9 @@ async def create(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -1838,7 +1870,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -1897,6 +1929,7 @@ async def create(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -1910,7 +1943,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -1958,6 +1991,9 @@ async def create(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -2008,6 +2044,7 @@ async def create(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -2021,7 +2058,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -2069,6 +2106,9 @@ async def create(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -2114,7 +2154,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -2161,7 +2201,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -2208,7 +2248,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -2257,7 +2297,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Adds a new application to Access.
@@ -2311,6 +2351,7 @@ async def create(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -2325,7 +2366,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
if account_id and zone_id:
raise ValueError("You cannot provide both account_id and zone_id")
@@ -2339,7 +2380,7 @@ async def create(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- Application,
+ Optional[Application],
await self._post(
f"/{account_or_zone}/{account_or_zone_id}/access/apps",
body=await async_maybe_transform(
@@ -2359,6 +2400,7 @@ async def create(
"http_only_cookie_attribute": http_only_cookie_attribute,
"logo_url": logo_url,
"name": name,
+ "options_preflight_bypass": options_preflight_bypass,
"path_cookie_attribute": path_cookie_attribute,
"same_site_cookie_attribute": same_site_cookie_attribute,
"self_hosted_domains": self_hosted_domains,
@@ -2405,6 +2447,7 @@ async def update(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -2418,7 +2461,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -2468,6 +2511,9 @@ async def update(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -2519,7 +2565,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -2581,6 +2627,7 @@ async def update(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -2594,7 +2641,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -2644,6 +2691,9 @@ async def update(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -2695,6 +2745,7 @@ async def update(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -2708,7 +2759,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -2758,6 +2809,9 @@ async def update(
name: The name of the application.
+ options_preflight_bypass: Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+
path_cookie_attribute: Enables cookie paths to scope an application's JWT to the application path. If
disabled, the JWT will scope to the hostname by default
@@ -2804,7 +2858,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -2854,7 +2908,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -2904,7 +2958,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -2956,7 +3010,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Updates an Access application.
@@ -3013,6 +3067,7 @@ async def update(
http_only_cookie_attribute: bool | NotGiven = NOT_GIVEN,
logo_url: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
+ options_preflight_bypass: bool | NotGiven = NOT_GIVEN,
path_cookie_attribute: bool | NotGiven = NOT_GIVEN,
same_site_cookie_attribute: str | NotGiven = NOT_GIVEN,
self_hosted_domains: List[SelfHostedDomainsh] | NotGiven = NOT_GIVEN,
@@ -3027,7 +3082,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
if account_id and zone_id:
raise ValueError("You cannot provide both account_id and zone_id")
@@ -3041,7 +3096,7 @@ async def update(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- Application,
+ Optional[Application],
await self._put(
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}",
body=await async_maybe_transform(
@@ -3061,6 +3116,7 @@ async def update(
"http_only_cookie_attribute": http_only_cookie_attribute,
"logo_url": logo_url,
"name": name,
+ "options_preflight_bypass": options_preflight_bypass,
"path_cookie_attribute": path_cookie_attribute,
"same_site_cookie_attribute": same_site_cookie_attribute,
"self_hosted_domains": self_hosted_domains,
@@ -3146,7 +3202,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ApplicationDeleteResponse:
+ ) -> Optional[ApplicationDeleteResponse]:
"""
Deletes an application from Access.
@@ -3186,7 +3242,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ApplicationDeleteResponse], ResultWrapper[ApplicationDeleteResponse]),
+ cast_to=cast(Type[Optional[ApplicationDeleteResponse]], ResultWrapper[ApplicationDeleteResponse]),
)
async def get(
@@ -3201,7 +3257,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Application:
+ ) -> Optional[Application]:
"""
Fetches information about an Access application.
@@ -3233,7 +3289,7 @@ async def get(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- Application,
+ Optional[Application],
await self._get(
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}",
options=make_request_options(
diff --git a/src/cloudflare/resources/zero_trust/access/applications/cas.py b/src/cloudflare/resources/zero_trust/access/applications/cas.py
index 709826f1d4d5..d1f8fc7a336a 100644
--- a/src/cloudflare/resources/zero_trust/access/applications/cas.py
+++ b/src/cloudflare/resources/zero_trust/access/applications/cas.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Type, cast
+from typing import Any, Type, Optional, cast
import httpx
@@ -47,7 +47,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CACreateResponse:
+ ) -> Optional[CACreateResponse]:
"""
Generates a new short-lived certificate CA and public key.
@@ -81,7 +81,7 @@ def create(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- CACreateResponse,
+ Optional[CACreateResponse],
self._post(
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{uuid}/ca",
options=make_request_options(
@@ -158,7 +158,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CADeleteResponse:
+ ) -> Optional[CADeleteResponse]:
"""
Deletes a short-lived certificate CA.
@@ -200,7 +200,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CADeleteResponse], ResultWrapper[CADeleteResponse]),
+ cast_to=cast(Type[Optional[CADeleteResponse]], ResultWrapper[CADeleteResponse]),
)
def get(
@@ -215,7 +215,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CAGetResponse:
+ ) -> Optional[CAGetResponse]:
"""
Fetches a short-lived certificate CA and its public key.
@@ -249,7 +249,7 @@ def get(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- CAGetResponse,
+ Optional[CAGetResponse],
self._get(
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{uuid}/ca",
options=make_request_options(
@@ -287,7 +287,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CACreateResponse:
+ ) -> Optional[CACreateResponse]:
"""
Generates a new short-lived certificate CA and public key.
@@ -321,7 +321,7 @@ async def create(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- CACreateResponse,
+ Optional[CACreateResponse],
await self._post(
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{uuid}/ca",
options=make_request_options(
@@ -398,7 +398,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CADeleteResponse:
+ ) -> Optional[CADeleteResponse]:
"""
Deletes a short-lived certificate CA.
@@ -440,7 +440,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CADeleteResponse], ResultWrapper[CADeleteResponse]),
+ cast_to=cast(Type[Optional[CADeleteResponse]], ResultWrapper[CADeleteResponse]),
)
async def get(
@@ -455,7 +455,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CAGetResponse:
+ ) -> Optional[CAGetResponse]:
"""
Fetches a short-lived certificate CA and its public key.
@@ -489,7 +489,7 @@ async def get(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- CAGetResponse,
+ Optional[CAGetResponse],
await self._get(
f"/{account_or_zone}/{account_or_zone_id}/access/apps/{uuid}/ca",
options=make_request_options(
diff --git a/src/cloudflare/resources/zero_trust/access/applications/policies.py b/src/cloudflare/resources/zero_trust/access/applications/policies.py
index ca932d7fce4f..8d1b7bcabf8c 100644
--- a/src/cloudflare/resources/zero_trust/access/applications/policies.py
+++ b/src/cloudflare/resources/zero_trust/access/applications/policies.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, Iterable, cast
+from typing import Type, Iterable, Optional, cast
from typing_extensions import Literal
import httpx
@@ -71,7 +71,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Policy:
+ ) -> Optional[Policy]:
"""
Create a new Access policy for an application.
@@ -162,7 +162,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Policy], ResultWrapper[Policy]),
+ cast_to=cast(Type[Optional[Policy]], ResultWrapper[Policy]),
)
def update(
@@ -190,7 +190,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Policy:
+ ) -> Optional[Policy]:
"""
Update a configured Access policy.
@@ -285,7 +285,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Policy], ResultWrapper[Policy]),
+ cast_to=cast(Type[Optional[Policy]], ResultWrapper[Policy]),
)
def list(
@@ -355,7 +355,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PolicyDeleteResponse:
+ ) -> Optional[PolicyDeleteResponse]:
"""
Delete an Access policy.
@@ -401,7 +401,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PolicyDeleteResponse], ResultWrapper[PolicyDeleteResponse]),
+ cast_to=cast(Type[Optional[PolicyDeleteResponse]], ResultWrapper[PolicyDeleteResponse]),
)
def get(
@@ -417,7 +417,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Policy:
+ ) -> Optional[Policy]:
"""
Fetches a single Access policy.
@@ -463,7 +463,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Policy], ResultWrapper[Policy]),
+ cast_to=cast(Type[Optional[Policy]], ResultWrapper[Policy]),
)
@@ -500,7 +500,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Policy:
+ ) -> Optional[Policy]:
"""
Create a new Access policy for an application.
@@ -591,7 +591,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Policy], ResultWrapper[Policy]),
+ cast_to=cast(Type[Optional[Policy]], ResultWrapper[Policy]),
)
async def update(
@@ -619,7 +619,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Policy:
+ ) -> Optional[Policy]:
"""
Update a configured Access policy.
@@ -714,7 +714,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Policy], ResultWrapper[Policy]),
+ cast_to=cast(Type[Optional[Policy]], ResultWrapper[Policy]),
)
def list(
@@ -784,7 +784,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PolicyDeleteResponse:
+ ) -> Optional[PolicyDeleteResponse]:
"""
Delete an Access policy.
@@ -830,7 +830,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[PolicyDeleteResponse], ResultWrapper[PolicyDeleteResponse]),
+ cast_to=cast(Type[Optional[PolicyDeleteResponse]], ResultWrapper[PolicyDeleteResponse]),
)
async def get(
@@ -846,7 +846,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Policy:
+ ) -> Optional[Policy]:
"""
Fetches a single Access policy.
@@ -892,7 +892,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Policy], ResultWrapper[Policy]),
+ cast_to=cast(Type[Optional[Policy]], ResultWrapper[Policy]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/applications/user_policy_checks.py b/src/cloudflare/resources/zero_trust/access/applications/user_policy_checks.py
index 21b71964d8d1..46beb29e0527 100644
--- a/src/cloudflare/resources/zero_trust/access/applications/user_policy_checks.py
+++ b/src/cloudflare/resources/zero_trust/access/applications/user_policy_checks.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
import httpx
@@ -46,7 +46,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> UserPolicyCheckListResponse:
+ ) -> Optional[UserPolicyCheckListResponse]:
"""
Tests if a specific user has permission to access an application.
@@ -86,7 +86,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[UserPolicyCheckListResponse], ResultWrapper[UserPolicyCheckListResponse]),
+ cast_to=cast(Type[Optional[UserPolicyCheckListResponse]], ResultWrapper[UserPolicyCheckListResponse]),
)
@@ -111,7 +111,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> UserPolicyCheckListResponse:
+ ) -> Optional[UserPolicyCheckListResponse]:
"""
Tests if a specific user has permission to access an application.
@@ -151,7 +151,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[UserPolicyCheckListResponse], ResultWrapper[UserPolicyCheckListResponse]),
+ cast_to=cast(Type[Optional[UserPolicyCheckListResponse]], ResultWrapper[UserPolicyCheckListResponse]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/bookmarks.py b/src/cloudflare/resources/zero_trust/access/bookmarks.py
index 8ceee6a5db54..1b4f2db7d6d6 100644
--- a/src/cloudflare/resources/zero_trust/access/bookmarks.py
+++ b/src/cloudflare/resources/zero_trust/access/bookmarks.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
import httpx
@@ -57,7 +57,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Bookmark:
+ ) -> Optional[Bookmark]:
"""
Create a new Bookmark application.
@@ -86,7 +86,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
+ cast_to=cast(Type[Optional[Bookmark]], ResultWrapper[Bookmark]),
)
def update(
@@ -101,7 +101,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Bookmark:
+ ) -> Optional[Bookmark]:
"""
Updates a configured Bookmark application.
@@ -130,7 +130,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
+ cast_to=cast(Type[Optional[Bookmark]], ResultWrapper[Bookmark]),
)
def list(
@@ -179,7 +179,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> BookmarkDeleteResponse:
+ ) -> Optional[BookmarkDeleteResponse]:
"""
Deletes a Bookmark application.
@@ -208,7 +208,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[BookmarkDeleteResponse], ResultWrapper[BookmarkDeleteResponse]),
+ cast_to=cast(Type[Optional[BookmarkDeleteResponse]], ResultWrapper[BookmarkDeleteResponse]),
)
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,
- ) -> Bookmark:
+ ) -> Optional[Bookmark]:
"""
Fetches a single Bookmark application.
@@ -250,7 +250,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
+ cast_to=cast(Type[Optional[Bookmark]], ResultWrapper[Bookmark]),
)
@@ -275,7 +275,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Bookmark:
+ ) -> Optional[Bookmark]:
"""
Create a new Bookmark application.
@@ -304,7 +304,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
+ cast_to=cast(Type[Optional[Bookmark]], ResultWrapper[Bookmark]),
)
async def update(
@@ -319,7 +319,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Bookmark:
+ ) -> Optional[Bookmark]:
"""
Updates a configured Bookmark application.
@@ -348,7 +348,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
+ cast_to=cast(Type[Optional[Bookmark]], ResultWrapper[Bookmark]),
)
def list(
@@ -397,7 +397,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> BookmarkDeleteResponse:
+ ) -> Optional[BookmarkDeleteResponse]:
"""
Deletes a Bookmark application.
@@ -426,7 +426,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[BookmarkDeleteResponse], ResultWrapper[BookmarkDeleteResponse]),
+ cast_to=cast(Type[Optional[BookmarkDeleteResponse]], ResultWrapper[BookmarkDeleteResponse]),
)
async def get(
@@ -440,7 +440,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Bookmark:
+ ) -> Optional[Bookmark]:
"""
Fetches a single Bookmark application.
@@ -468,7 +468,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Bookmark], ResultWrapper[Bookmark]),
+ cast_to=cast(Type[Optional[Bookmark]], ResultWrapper[Bookmark]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py
index 6e9e231f471a..7c91b7d3bf30 100644
--- a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py
+++ b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import List, Type, cast
+from typing import List, Type, Optional, cast
import httpx
@@ -71,7 +71,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Certificate:
+ ) -> Optional[Certificate]:
"""
Adds a new mTLS root certificate to Access.
@@ -123,7 +123,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Certificate], ResultWrapper[Certificate]),
+ cast_to=cast(Type[Optional[Certificate]], ResultWrapper[Certificate]),
)
def update(
@@ -140,7 +140,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Certificate:
+ ) -> Optional[Certificate]:
"""
Updates a configured mTLS certificate.
@@ -193,7 +193,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Certificate], ResultWrapper[Certificate]),
+ cast_to=cast(Type[Optional[Certificate]], ResultWrapper[Certificate]),
)
def list(
@@ -257,7 +257,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CertificateDeleteResponse:
+ ) -> Optional[CertificateDeleteResponse]:
"""
Deletes an mTLS certificate.
@@ -299,7 +299,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CertificateDeleteResponse], ResultWrapper[CertificateDeleteResponse]),
+ cast_to=cast(Type[Optional[CertificateDeleteResponse]], ResultWrapper[CertificateDeleteResponse]),
)
def get(
@@ -314,7 +314,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Certificate:
+ ) -> Optional[Certificate]:
"""
Fetches a single mTLS certificate.
@@ -356,7 +356,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Certificate], ResultWrapper[Certificate]),
+ cast_to=cast(Type[Optional[Certificate]], ResultWrapper[Certificate]),
)
@@ -387,7 +387,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Certificate:
+ ) -> Optional[Certificate]:
"""
Adds a new mTLS root certificate to Access.
@@ -439,7 +439,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Certificate], ResultWrapper[Certificate]),
+ cast_to=cast(Type[Optional[Certificate]], ResultWrapper[Certificate]),
)
async def update(
@@ -456,7 +456,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Certificate:
+ ) -> Optional[Certificate]:
"""
Updates a configured mTLS certificate.
@@ -509,7 +509,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Certificate], ResultWrapper[Certificate]),
+ cast_to=cast(Type[Optional[Certificate]], ResultWrapper[Certificate]),
)
def list(
@@ -573,7 +573,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CertificateDeleteResponse:
+ ) -> Optional[CertificateDeleteResponse]:
"""
Deletes an mTLS certificate.
@@ -615,7 +615,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CertificateDeleteResponse], ResultWrapper[CertificateDeleteResponse]),
+ cast_to=cast(Type[Optional[CertificateDeleteResponse]], ResultWrapper[CertificateDeleteResponse]),
)
async def get(
@@ -630,7 +630,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Certificate:
+ ) -> Optional[Certificate]:
"""
Fetches a single mTLS certificate.
@@ -672,7 +672,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Certificate], ResultWrapper[Certificate]),
+ cast_to=cast(Type[Optional[Certificate]], ResultWrapper[Certificate]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/custom_pages.py b/src/cloudflare/resources/zero_trust/access/custom_pages.py
index 24d82f75801c..d56a32bc91d9 100644
--- a/src/cloudflare/resources/zero_trust/access/custom_pages.py
+++ b/src/cloudflare/resources/zero_trust/access/custom_pages.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
from typing_extensions import Literal
import httpx
@@ -60,7 +60,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomPageWithoutHTML:
+ ) -> Optional[CustomPageWithoutHTML]:
"""
Create a custom page
@@ -103,7 +103,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CustomPageWithoutHTML], ResultWrapper[CustomPageWithoutHTML]),
+ cast_to=cast(Type[Optional[CustomPageWithoutHTML]], ResultWrapper[CustomPageWithoutHTML]),
)
def update(
@@ -121,7 +121,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomPageWithoutHTML:
+ ) -> Optional[CustomPageWithoutHTML]:
"""
Update a custom page
@@ -168,7 +168,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CustomPageWithoutHTML], ResultWrapper[CustomPageWithoutHTML]),
+ cast_to=cast(Type[Optional[CustomPageWithoutHTML]], ResultWrapper[CustomPageWithoutHTML]),
)
def list(
@@ -218,7 +218,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomPageDeleteResponse:
+ ) -> Optional[CustomPageDeleteResponse]:
"""
Delete a custom page
@@ -248,7 +248,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CustomPageDeleteResponse], ResultWrapper[CustomPageDeleteResponse]),
+ cast_to=cast(Type[Optional[CustomPageDeleteResponse]], ResultWrapper[CustomPageDeleteResponse]),
)
def get(
@@ -262,7 +262,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomPage:
+ ) -> Optional[CustomPage]:
"""
Fetches a custom page and also returns its HTML.
@@ -292,7 +292,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CustomPage], ResultWrapper[CustomPage]),
+ cast_to=cast(Type[Optional[CustomPage]], ResultWrapper[CustomPage]),
)
@@ -319,7 +319,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomPageWithoutHTML:
+ ) -> Optional[CustomPageWithoutHTML]:
"""
Create a custom page
@@ -362,7 +362,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CustomPageWithoutHTML], ResultWrapper[CustomPageWithoutHTML]),
+ cast_to=cast(Type[Optional[CustomPageWithoutHTML]], ResultWrapper[CustomPageWithoutHTML]),
)
async def update(
@@ -380,7 +380,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomPageWithoutHTML:
+ ) -> Optional[CustomPageWithoutHTML]:
"""
Update a custom page
@@ -427,7 +427,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CustomPageWithoutHTML], ResultWrapper[CustomPageWithoutHTML]),
+ cast_to=cast(Type[Optional[CustomPageWithoutHTML]], ResultWrapper[CustomPageWithoutHTML]),
)
def list(
@@ -477,7 +477,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomPageDeleteResponse:
+ ) -> Optional[CustomPageDeleteResponse]:
"""
Delete a custom page
@@ -507,7 +507,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CustomPageDeleteResponse], ResultWrapper[CustomPageDeleteResponse]),
+ cast_to=cast(Type[Optional[CustomPageDeleteResponse]], ResultWrapper[CustomPageDeleteResponse]),
)
async def get(
@@ -521,7 +521,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> CustomPage:
+ ) -> Optional[CustomPage]:
"""
Fetches a custom page and also returns its HTML.
@@ -551,7 +551,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[CustomPage], ResultWrapper[CustomPage]),
+ cast_to=cast(Type[Optional[CustomPage]], ResultWrapper[CustomPage]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/groups.py b/src/cloudflare/resources/zero_trust/access/groups.py
index 32e631c5505e..82a2e86baba3 100644
--- a/src/cloudflare/resources/zero_trust/access/groups.py
+++ b/src/cloudflare/resources/zero_trust/access/groups.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, Iterable, cast
+from typing import Type, Iterable, Optional, cast
import httpx
@@ -56,7 +56,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ZeroTrustGroup:
+ ) -> Optional[ZeroTrustGroup]:
"""
Creates a new Access group.
@@ -117,7 +117,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ZeroTrustGroup], ResultWrapper[ZeroTrustGroup]),
+ cast_to=cast(Type[Optional[ZeroTrustGroup]], ResultWrapper[ZeroTrustGroup]),
)
def update(
@@ -137,7 +137,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ZeroTrustGroup:
+ ) -> Optional[ZeroTrustGroup]:
"""
Updates a configured Access group.
@@ -202,7 +202,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ZeroTrustGroup], ResultWrapper[ZeroTrustGroup]),
+ cast_to=cast(Type[Optional[ZeroTrustGroup]], ResultWrapper[ZeroTrustGroup]),
)
def list(
@@ -266,7 +266,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> GroupDeleteResponse:
+ ) -> Optional[GroupDeleteResponse]:
"""
Deletes an Access group.
@@ -308,7 +308,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[GroupDeleteResponse], ResultWrapper[GroupDeleteResponse]),
+ cast_to=cast(Type[Optional[GroupDeleteResponse]], ResultWrapper[GroupDeleteResponse]),
)
def get(
@@ -323,7 +323,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ZeroTrustGroup:
+ ) -> Optional[ZeroTrustGroup]:
"""
Fetches a single Access group.
@@ -365,7 +365,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ZeroTrustGroup], ResultWrapper[ZeroTrustGroup]),
+ cast_to=cast(Type[Optional[ZeroTrustGroup]], ResultWrapper[ZeroTrustGroup]),
)
@@ -394,7 +394,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ZeroTrustGroup:
+ ) -> Optional[ZeroTrustGroup]:
"""
Creates a new Access group.
@@ -455,7 +455,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ZeroTrustGroup], ResultWrapper[ZeroTrustGroup]),
+ cast_to=cast(Type[Optional[ZeroTrustGroup]], ResultWrapper[ZeroTrustGroup]),
)
async def update(
@@ -475,7 +475,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ZeroTrustGroup:
+ ) -> Optional[ZeroTrustGroup]:
"""
Updates a configured Access group.
@@ -540,7 +540,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ZeroTrustGroup], ResultWrapper[ZeroTrustGroup]),
+ cast_to=cast(Type[Optional[ZeroTrustGroup]], ResultWrapper[ZeroTrustGroup]),
)
def list(
@@ -604,7 +604,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> GroupDeleteResponse:
+ ) -> Optional[GroupDeleteResponse]:
"""
Deletes an Access group.
@@ -646,7 +646,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[GroupDeleteResponse], ResultWrapper[GroupDeleteResponse]),
+ cast_to=cast(Type[Optional[GroupDeleteResponse]], ResultWrapper[GroupDeleteResponse]),
)
async def get(
@@ -661,7 +661,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ZeroTrustGroup:
+ ) -> Optional[ZeroTrustGroup]:
"""
Fetches a single Access group.
@@ -703,7 +703,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ZeroTrustGroup], ResultWrapper[ZeroTrustGroup]),
+ cast_to=cast(Type[Optional[ZeroTrustGroup]], ResultWrapper[ZeroTrustGroup]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/keys.py b/src/cloudflare/resources/zero_trust/access/keys.py
index ae4837b10ac7..a0a3e3bdf899 100644
--- a/src/cloudflare/resources/zero_trust/access/keys.py
+++ b/src/cloudflare/resources/zero_trust/access/keys.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, cast
+from typing import Any, Optional, cast
import httpx
@@ -48,7 +48,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> KeyUpdateResponse:
+ ) -> Optional[KeyUpdateResponse]:
"""
Updates the Access key rotation settings for an account.
@@ -68,7 +68,7 @@ def update(
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
return cast(
- KeyUpdateResponse,
+ Optional[KeyUpdateResponse],
self._put(
f"/accounts/{identifier}/access/keys",
body=maybe_transform(
@@ -97,7 +97,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> KeyGetResponse:
+ ) -> Optional[KeyGetResponse]:
"""
Gets the Access key rotation settings for an account.
@@ -115,7 +115,7 @@ def get(
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
return cast(
- KeyGetResponse,
+ Optional[KeyGetResponse],
self._get(
f"/accounts/{identifier}/access/keys",
options=make_request_options(
@@ -141,7 +141,7 @@ def rotate(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> KeyRotateResponse:
+ ) -> Optional[KeyRotateResponse]:
"""
Perfoms a key rotation for an account.
@@ -159,7 +159,7 @@ def rotate(
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
return cast(
- KeyRotateResponse,
+ Optional[KeyRotateResponse],
self._post(
f"/accounts/{identifier}/access/keys/rotate",
options=make_request_options(
@@ -196,7 +196,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> KeyUpdateResponse:
+ ) -> Optional[KeyUpdateResponse]:
"""
Updates the Access key rotation settings for an account.
@@ -216,7 +216,7 @@ async def update(
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
return cast(
- KeyUpdateResponse,
+ Optional[KeyUpdateResponse],
await self._put(
f"/accounts/{identifier}/access/keys",
body=await async_maybe_transform(
@@ -245,7 +245,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> KeyGetResponse:
+ ) -> Optional[KeyGetResponse]:
"""
Gets the Access key rotation settings for an account.
@@ -263,7 +263,7 @@ async def get(
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
return cast(
- KeyGetResponse,
+ Optional[KeyGetResponse],
await self._get(
f"/accounts/{identifier}/access/keys",
options=make_request_options(
@@ -289,7 +289,7 @@ async def rotate(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> KeyRotateResponse:
+ ) -> Optional[KeyRotateResponse]:
"""
Perfoms a key rotation for an account.
@@ -307,7 +307,7 @@ async def rotate(
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
return cast(
- KeyRotateResponse,
+ Optional[KeyRotateResponse],
await self._post(
f"/accounts/{identifier}/access/keys/rotate",
options=make_request_options(
diff --git a/src/cloudflare/resources/zero_trust/access/service_tokens.py b/src/cloudflare/resources/zero_trust/access/service_tokens.py
index 31a09535c3ae..72be8675b23e 100644
--- a/src/cloudflare/resources/zero_trust/access/service_tokens.py
+++ b/src/cloudflare/resources/zero_trust/access/service_tokens.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, 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,
- ) -> ServiceTokenCreateResponse:
+ ) -> Optional[ServiceTokenCreateResponse]:
"""Generates a new service token.
**Note:** This is the only time you can get the
@@ -112,7 +112,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceTokenCreateResponse], ResultWrapper[ServiceTokenCreateResponse]),
+ cast_to=cast(Type[Optional[ServiceTokenCreateResponse]], ResultWrapper[ServiceTokenCreateResponse]),
)
def update(
@@ -129,7 +129,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceToken:
+ ) -> Optional[ServiceToken]:
"""
Updates a configured service token.
@@ -184,7 +184,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
+ cast_to=cast(Type[Optional[ServiceToken]], ResultWrapper[ServiceToken]),
)
def list(
@@ -248,7 +248,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceToken:
+ ) -> Optional[ServiceToken]:
"""
Deletes a service token.
@@ -290,7 +290,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
+ cast_to=cast(Type[Optional[ServiceToken]], ResultWrapper[ServiceToken]),
)
def refresh(
@@ -304,7 +304,7 @@ def refresh(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceToken:
+ ) -> Optional[ServiceToken]:
"""
Refreshes the expiration of a service token.
@@ -334,7 +334,7 @@ def refresh(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
+ cast_to=cast(Type[Optional[ServiceToken]], ResultWrapper[ServiceToken]),
)
def rotate(
@@ -348,7 +348,7 @@ def rotate(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceTokenRotateResponse:
+ ) -> Optional[ServiceTokenRotateResponse]:
"""
Generates a new Client Secret for a service token and revokes the old one.
@@ -378,7 +378,7 @@ def rotate(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceTokenRotateResponse], ResultWrapper[ServiceTokenRotateResponse]),
+ cast_to=cast(Type[Optional[ServiceTokenRotateResponse]], ResultWrapper[ServiceTokenRotateResponse]),
)
@@ -404,7 +404,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceTokenCreateResponse:
+ ) -> Optional[ServiceTokenCreateResponse]:
"""Generates a new service token.
**Note:** This is the only time you can get the
@@ -458,7 +458,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceTokenCreateResponse], ResultWrapper[ServiceTokenCreateResponse]),
+ cast_to=cast(Type[Optional[ServiceTokenCreateResponse]], ResultWrapper[ServiceTokenCreateResponse]),
)
async def update(
@@ -475,7 +475,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceToken:
+ ) -> Optional[ServiceToken]:
"""
Updates a configured service token.
@@ -530,7 +530,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
+ cast_to=cast(Type[Optional[ServiceToken]], ResultWrapper[ServiceToken]),
)
def list(
@@ -594,7 +594,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceToken:
+ ) -> Optional[ServiceToken]:
"""
Deletes a service token.
@@ -636,7 +636,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
+ cast_to=cast(Type[Optional[ServiceToken]], ResultWrapper[ServiceToken]),
)
async def refresh(
@@ -650,7 +650,7 @@ async def refresh(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceToken:
+ ) -> Optional[ServiceToken]:
"""
Refreshes the expiration of a service token.
@@ -680,7 +680,7 @@ async def refresh(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceToken], ResultWrapper[ServiceToken]),
+ cast_to=cast(Type[Optional[ServiceToken]], ResultWrapper[ServiceToken]),
)
async def rotate(
@@ -694,7 +694,7 @@ async def rotate(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ServiceTokenRotateResponse:
+ ) -> Optional[ServiceTokenRotateResponse]:
"""
Generates a new Client Secret for a service token and revokes the old one.
@@ -724,7 +724,7 @@ async def rotate(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ServiceTokenRotateResponse], ResultWrapper[ServiceTokenRotateResponse]),
+ cast_to=cast(Type[Optional[ServiceTokenRotateResponse]], ResultWrapper[ServiceTokenRotateResponse]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/tags.py b/src/cloudflare/resources/zero_trust/access/tags.py
index 6add42d46dd6..0abd49dd01c7 100644
--- a/src/cloudflare/resources/zero_trust/access/tags.py
+++ b/src/cloudflare/resources/zero_trust/access/tags.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,
- ) -> Tag:
+ ) -> Optional[Tag]:
"""
Create a tag
@@ -79,7 +79,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Tag], ResultWrapper[Tag]),
+ cast_to=cast(Type[Optional[Tag]], ResultWrapper[Tag]),
)
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,
- ) -> Tag:
+ ) -> Optional[Tag]:
"""
Update a tag
@@ -127,7 +127,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Tag], ResultWrapper[Tag]),
+ cast_to=cast(Type[Optional[Tag]], ResultWrapper[Tag]),
)
def list(
@@ -177,7 +177,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TagDeleteResponse:
+ ) -> Optional[TagDeleteResponse]:
"""
Delete a tag
@@ -207,7 +207,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TagDeleteResponse], ResultWrapper[TagDeleteResponse]),
+ cast_to=cast(Type[Optional[TagDeleteResponse]], ResultWrapper[TagDeleteResponse]),
)
def get(
@@ -221,7 +221,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Tag:
+ ) -> Optional[Tag]:
"""
Get a tag
@@ -251,7 +251,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Tag], ResultWrapper[Tag]),
+ cast_to=cast(Type[Optional[Tag]], ResultWrapper[Tag]),
)
@@ -275,7 +275,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Tag:
+ ) -> Optional[Tag]:
"""
Create a tag
@@ -304,7 +304,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Tag], ResultWrapper[Tag]),
+ cast_to=cast(Type[Optional[Tag]], ResultWrapper[Tag]),
)
async def update(
@@ -319,7 +319,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Tag:
+ ) -> Optional[Tag]:
"""
Update a tag
@@ -352,7 +352,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Tag], ResultWrapper[Tag]),
+ cast_to=cast(Type[Optional[Tag]], ResultWrapper[Tag]),
)
def list(
@@ -402,7 +402,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> TagDeleteResponse:
+ ) -> Optional[TagDeleteResponse]:
"""
Delete a tag
@@ -432,7 +432,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[TagDeleteResponse], ResultWrapper[TagDeleteResponse]),
+ cast_to=cast(Type[Optional[TagDeleteResponse]], ResultWrapper[TagDeleteResponse]),
)
async def get(
@@ -446,7 +446,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Tag:
+ ) -> Optional[Tag]:
"""
Get a tag
@@ -476,7 +476,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Tag], ResultWrapper[Tag]),
+ cast_to=cast(Type[Optional[Tag]], ResultWrapper[Tag]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/users/active_sessions.py b/src/cloudflare/resources/zero_trust/access/users/active_sessions.py
index 92e9fc65093b..5298ba9c5b72 100644
--- a/src/cloudflare/resources/zero_trust/access/users/active_sessions.py
+++ b/src/cloudflare/resources/zero_trust/access/users/active_sessions.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
import httpx
@@ -88,7 +88,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ActiveSessionGetResponse:
+ ) -> Optional[ActiveSessionGetResponse]:
"""
Get an active session for a single user.
@@ -120,7 +120,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ActiveSessionGetResponse], ResultWrapper[ActiveSessionGetResponse]),
+ cast_to=cast(Type[Optional[ActiveSessionGetResponse]], ResultWrapper[ActiveSessionGetResponse]),
)
@@ -186,7 +186,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ActiveSessionGetResponse:
+ ) -> Optional[ActiveSessionGetResponse]:
"""
Get an active session for a single user.
@@ -218,7 +218,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[ActiveSessionGetResponse], ResultWrapper[ActiveSessionGetResponse]),
+ cast_to=cast(Type[Optional[ActiveSessionGetResponse]], ResultWrapper[ActiveSessionGetResponse]),
)
diff --git a/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py b/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py
index b84609d9f63e..8a2dfede92bb 100644
--- a/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py
+++ b/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Type, cast
+from typing import Type, Optional, cast
import httpx
@@ -44,7 +44,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Identity:
+ ) -> Optional[Identity]:
"""
Get last seen identity for a single user.
@@ -74,7 +74,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Identity], ResultWrapper[Identity]),
+ cast_to=cast(Type[Optional[Identity]], ResultWrapper[Identity]),
)
@@ -98,7 +98,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Identity:
+ ) -> Optional[Identity]:
"""
Get last seen identity for a single user.
@@ -128,7 +128,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Identity], ResultWrapper[Identity]),
+ cast_to=cast(Type[Optional[Identity]], ResultWrapper[Identity]),
)
diff --git a/src/cloudflare/resources/zero_trust/identity_providers.py b/src/cloudflare/resources/zero_trust/identity_providers.py
index 43fd0749d75d..fd779e102dda 100644
--- a/src/cloudflare/resources/zero_trust/identity_providers.py
+++ b/src/cloudflare/resources/zero_trust/identity_providers.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Type, cast, overload
+from typing import Any, Type, Optional, cast, overload
import httpx
@@ -65,7 +65,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -113,7 +113,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -161,7 +161,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -209,7 +209,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -257,7 +257,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -305,7 +305,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -353,7 +353,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -401,7 +401,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -449,7 +449,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -497,7 +497,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -545,7 +545,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -593,7 +593,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -641,7 +641,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -689,7 +689,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -762,7 +762,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
if account_id and zone_id:
raise ValueError("You cannot provide both account_id and zone_id")
@@ -776,7 +776,7 @@ def create(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- IdentityProvider,
+ Optional[IdentityProvider],
self._post(
f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers",
body=maybe_transform(
@@ -818,7 +818,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -869,7 +869,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -920,7 +920,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -971,7 +971,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1022,7 +1022,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1073,7 +1073,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1124,7 +1124,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1175,7 +1175,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1226,7 +1226,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1277,7 +1277,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1328,7 +1328,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1379,7 +1379,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1430,7 +1430,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1481,7 +1481,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -1557,7 +1557,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
if not uuid:
raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}")
if account_id and zone_id:
@@ -1573,7 +1573,7 @@ def update(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- IdentityProvider,
+ Optional[IdentityProvider],
self._put(
f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}",
body=maybe_transform(
@@ -1661,7 +1661,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProviderDeleteResponse:
+ ) -> Optional[IdentityProviderDeleteResponse]:
"""
Deletes an identity provider from Access.
@@ -1703,7 +1703,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IdentityProviderDeleteResponse], ResultWrapper[IdentityProviderDeleteResponse]),
+ cast_to=cast(Type[Optional[IdentityProviderDeleteResponse]], ResultWrapper[IdentityProviderDeleteResponse]),
)
def get(
@@ -1718,7 +1718,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Fetches a configured identity provider.
@@ -1752,7 +1752,7 @@ def get(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- IdentityProvider,
+ Optional[IdentityProvider],
self._get(
f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}",
options=make_request_options(
@@ -1794,7 +1794,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -1842,7 +1842,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -1890,7 +1890,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -1938,7 +1938,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -1986,7 +1986,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2034,7 +2034,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2082,7 +2082,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2130,7 +2130,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2178,7 +2178,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2226,7 +2226,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2274,7 +2274,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2322,7 +2322,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2370,7 +2370,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2418,7 +2418,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Adds a new identity provider to Access.
@@ -2491,7 +2491,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
if account_id and zone_id:
raise ValueError("You cannot provide both account_id and zone_id")
@@ -2505,7 +2505,7 @@ async def create(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- IdentityProvider,
+ Optional[IdentityProvider],
await self._post(
f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers",
body=await async_maybe_transform(
@@ -2547,7 +2547,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -2598,7 +2598,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -2649,7 +2649,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -2700,7 +2700,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -2751,7 +2751,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -2802,7 +2802,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -2853,7 +2853,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -2904,7 +2904,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -2955,7 +2955,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -3006,7 +3006,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -3057,7 +3057,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -3108,7 +3108,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -3159,7 +3159,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -3210,7 +3210,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Updates a configured identity provider.
@@ -3286,7 +3286,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
if not uuid:
raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}")
if account_id and zone_id:
@@ -3302,7 +3302,7 @@ async def update(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- IdentityProvider,
+ Optional[IdentityProvider],
await self._put(
f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}",
body=await async_maybe_transform(
@@ -3390,7 +3390,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProviderDeleteResponse:
+ ) -> Optional[IdentityProviderDeleteResponse]:
"""
Deletes an identity provider from Access.
@@ -3432,7 +3432,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[IdentityProviderDeleteResponse], ResultWrapper[IdentityProviderDeleteResponse]),
+ cast_to=cast(Type[Optional[IdentityProviderDeleteResponse]], ResultWrapper[IdentityProviderDeleteResponse]),
)
async def get(
@@ -3447,7 +3447,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> IdentityProvider:
+ ) -> Optional[IdentityProvider]:
"""
Fetches a configured identity provider.
@@ -3481,7 +3481,7 @@ async def get(
account_or_zone = "zones"
account_or_zone_id = zone_id
return cast(
- IdentityProvider,
+ Optional[IdentityProvider],
await self._get(
f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}",
options=make_request_options(
diff --git a/src/cloudflare/resources/zero_trust/organizations.py b/src/cloudflare/resources/zero_trust/organizations.py
index b1bd15fdfd89..1ecdb4abae01 100644
--- a/src/cloudflare/resources/zero_trust/organizations.py
+++ b/src/cloudflare/resources/zero_trust/organizations.py
@@ -65,7 +65,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Organization:
+ ) -> Optional[Organization]:
"""
Sets up a Zero Trust organization for your account or zone.
@@ -145,7 +145,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Organization], ResultWrapper[Organization]),
+ cast_to=cast(Type[Optional[Organization]], ResultWrapper[Organization]),
)
def update(
@@ -170,7 +170,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Organization:
+ ) -> Optional[Organization]:
"""
Updates the configuration for your Zero Trust organization.
@@ -251,7 +251,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Organization], ResultWrapper[Organization]),
+ cast_to=cast(Type[Optional[Organization]], ResultWrapper[Organization]),
)
def list(
@@ -265,7 +265,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Organization:
+ ) -> Optional[Organization]:
"""
Returns the configuration for your Zero Trust organization.
@@ -303,7 +303,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Organization], ResultWrapper[Organization]),
+ cast_to=cast(Type[Optional[Organization]], ResultWrapper[Organization]),
)
def revoke_users(
@@ -395,7 +395,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Organization:
+ ) -> Optional[Organization]:
"""
Sets up a Zero Trust organization for your account or zone.
@@ -475,7 +475,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Organization], ResultWrapper[Organization]),
+ cast_to=cast(Type[Optional[Organization]], ResultWrapper[Organization]),
)
async def update(
@@ -500,7 +500,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Organization:
+ ) -> Optional[Organization]:
"""
Updates the configuration for your Zero Trust organization.
@@ -581,7 +581,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Organization], ResultWrapper[Organization]),
+ cast_to=cast(Type[Optional[Organization]], ResultWrapper[Organization]),
)
async def list(
@@ -595,7 +595,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Organization:
+ ) -> Optional[Organization]:
"""
Returns the configuration for your Zero Trust organization.
@@ -633,7 +633,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Organization], ResultWrapper[Organization]),
+ cast_to=cast(Type[Optional[Organization]], ResultWrapper[Organization]),
)
async def revoke_users(
diff --git a/src/cloudflare/types/zero_trust/access/application.py b/src/cloudflare/types/zero_trust/access/application.py
index 396b04292869..a43c42738c1f 100644
--- a/src/cloudflare/types/zero_trust/access/application.py
+++ b/src/cloudflare/types/zero_trust/access/application.py
@@ -111,6 +111,12 @@ class SelfHostedApplication(BaseModel):
name: Optional[str] = None
"""The name of the application."""
+ options_preflight_bypass: Optional[bool] = None
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: Optional[bool] = None
"""Enables cookie paths to scope an application's JWT to the application path.
@@ -324,6 +330,12 @@ class BrowserSSHApplication(BaseModel):
name: Optional[str] = None
"""The name of the application."""
+ options_preflight_bypass: Optional[bool] = None
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: Optional[bool] = None
"""Enables cookie paths to scope an application's JWT to the application path.
@@ -446,6 +458,12 @@ class BrowserVncApplication(BaseModel):
name: Optional[str] = None
"""The name of the application."""
+ options_preflight_bypass: Optional[bool] = None
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: Optional[bool] = None
"""Enables cookie paths to scope an application's JWT to the application path.
diff --git a/src/cloudflare/types/zero_trust/access/application_create_params.py b/src/cloudflare/types/zero_trust/access/application_create_params.py
index d740be288e7f..57c54693e957 100644
--- a/src/cloudflare/types/zero_trust/access/application_create_params.py
+++ b/src/cloudflare/types/zero_trust/access/application_create_params.py
@@ -109,6 +109,12 @@ class SelfHostedApplication(TypedDict, total=False):
name: str
"""The name of the application."""
+ options_preflight_bypass: bool
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: bool
"""Enables cookie paths to scope an application's JWT to the application path.
@@ -310,6 +316,12 @@ class BrowserSSHApplication(TypedDict, total=False):
name: str
"""The name of the application."""
+ options_preflight_bypass: bool
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: bool
"""Enables cookie paths to scope an application's JWT to the application path.
@@ -428,6 +440,12 @@ class BrowserVncApplication(TypedDict, total=False):
name: str
"""The name of the application."""
+ options_preflight_bypass: bool
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: bool
"""Enables cookie paths to scope an application's JWT to the application path.
diff --git a/src/cloudflare/types/zero_trust/access/application_update_params.py b/src/cloudflare/types/zero_trust/access/application_update_params.py
index d2baaecbcab6..1d39ea89dfdd 100644
--- a/src/cloudflare/types/zero_trust/access/application_update_params.py
+++ b/src/cloudflare/types/zero_trust/access/application_update_params.py
@@ -109,6 +109,12 @@ class SelfHostedApplication(TypedDict, total=False):
name: str
"""The name of the application."""
+ options_preflight_bypass: bool
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: bool
"""Enables cookie paths to scope an application's JWT to the application path.
@@ -310,6 +316,12 @@ class BrowserSSHApplication(TypedDict, total=False):
name: str
"""The name of the application."""
+ options_preflight_bypass: bool
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: bool
"""Enables cookie paths to scope an application's JWT to the application path.
@@ -428,6 +440,12 @@ class BrowserVncApplication(TypedDict, total=False):
name: str
"""The name of the application."""
+ options_preflight_bypass: bool
+ """
+ Allows options preflight requests to bypass Access authentication and go
+ directly to the origin. Cannot turn on if cors_headers is set.
+ """
+
path_cookie_attribute: bool
"""Enables cookie paths to scope an application's JWT to the application path.
diff --git a/tests/api_resources/zero_trust/access/applications/test_cas.py b/tests/api_resources/zero_trust/access/applications/test_cas.py
index 02bfc89264bd..5c53d2c50595 100644
--- a/tests/api_resources/zero_trust/access/applications/test_cas.py
+++ b/tests/api_resources/zero_trust/access/applications/test_cas.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -26,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CACreateResponse, ca, path=["response"])
+ assert_matches_type(Optional[CACreateResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -36,7 +36,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CACreateResponse, ca, path=["response"])
+ assert_matches_type(Optional[CACreateResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -50,7 +50,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"
ca = response.parse()
- assert_matches_type(CACreateResponse, ca, path=["response"])
+ assert_matches_type(Optional[CACreateResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -64,7 +64,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
ca = response.parse()
- assert_matches_type(CACreateResponse, ca, path=["response"])
+ assert_matches_type(Optional[CACreateResponse], ca, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -161,7 +161,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CADeleteResponse, ca, path=["response"])
+ assert_matches_type(Optional[CADeleteResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -171,7 +171,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CADeleteResponse, ca, path=["response"])
+ assert_matches_type(Optional[CADeleteResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -185,7 +185,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"
ca = response.parse()
- assert_matches_type(CADeleteResponse, ca, path=["response"])
+ assert_matches_type(Optional[CADeleteResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -199,7 +199,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
ca = response.parse()
- assert_matches_type(CADeleteResponse, ca, path=["response"])
+ assert_matches_type(Optional[CADeleteResponse], ca, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -235,7 +235,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CAGetResponse, ca, path=["response"])
+ assert_matches_type(Optional[CAGetResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -245,7 +245,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CAGetResponse, ca, path=["response"])
+ assert_matches_type(Optional[CAGetResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -259,7 +259,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"
ca = response.parse()
- assert_matches_type(CAGetResponse, ca, path=["response"])
+ assert_matches_type(Optional[CAGetResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -273,7 +273,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
ca = response.parse()
- assert_matches_type(CAGetResponse, ca, path=["response"])
+ assert_matches_type(Optional[CAGetResponse], ca, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -313,7 +313,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CACreateResponse, ca, path=["response"])
+ assert_matches_type(Optional[CACreateResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -323,7 +323,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(CACreateResponse, ca, path=["response"])
+ assert_matches_type(Optional[CACreateResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -337,7 +337,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"
ca = await response.parse()
- assert_matches_type(CACreateResponse, ca, path=["response"])
+ assert_matches_type(Optional[CACreateResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -351,7 +351,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
ca = await response.parse()
- assert_matches_type(CACreateResponse, ca, path=["response"])
+ assert_matches_type(Optional[CACreateResponse], ca, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -448,7 +448,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CADeleteResponse, ca, path=["response"])
+ assert_matches_type(Optional[CADeleteResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -458,7 +458,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(CADeleteResponse, ca, path=["response"])
+ assert_matches_type(Optional[CADeleteResponse], ca, 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"
ca = await response.parse()
- assert_matches_type(CADeleteResponse, ca, path=["response"])
+ assert_matches_type(Optional[CADeleteResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -486,7 +486,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
ca = await response.parse()
- assert_matches_type(CADeleteResponse, ca, path=["response"])
+ assert_matches_type(Optional[CADeleteResponse], ca, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -522,7 +522,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CAGetResponse, ca, path=["response"])
+ assert_matches_type(Optional[CAGetResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -532,7 +532,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
account_id="string",
zone_id="string",
)
- assert_matches_type(CAGetResponse, ca, path=["response"])
+ assert_matches_type(Optional[CAGetResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -546,7 +546,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"
ca = await response.parse()
- assert_matches_type(CAGetResponse, ca, path=["response"])
+ assert_matches_type(Optional[CAGetResponse], ca, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -560,7 +560,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
ca = await response.parse()
- assert_matches_type(CAGetResponse, ca, path=["response"])
+ assert_matches_type(Optional[CAGetResponse], ca, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py
index 8c74c7f2fad7..5a7734e8d070 100644
--- a/tests/api_resources/zero_trust/access/applications/test_policies.py
+++ b/tests/api_resources/zero_trust/access/applications/test_policies.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -81,7 +81,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
],
session_duration="24h",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -102,7 +102,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"
policy = response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -123,7 +123,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
policy = response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -188,7 +188,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -234,7 +234,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
],
session_duration="24h",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -256,7 +256,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"
policy = response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -278,7 +278,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
policy = response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -428,7 +428,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(PolicyDeleteResponse, policy, path=["response"])
+ assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -439,7 +439,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(PolicyDeleteResponse, policy, path=["response"])
+ assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -454,7 +454,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"
policy = response.parse()
- assert_matches_type(PolicyDeleteResponse, policy, path=["response"])
+ assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -469,7 +469,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
policy = response.parse()
- assert_matches_type(PolicyDeleteResponse, policy, path=["response"])
+ assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -517,7 +517,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -528,7 +528,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -543,7 +543,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"
policy = response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -558,7 +558,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
policy = response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -616,7 +616,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -661,7 +661,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
],
session_duration="24h",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -682,7 +682,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"
policy = await response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -703,7 +703,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
policy = await response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -768,7 +768,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -814,7 +814,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
],
session_duration="24h",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -836,7 +836,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"
policy = await response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -858,7 +858,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
policy = await response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1008,7 +1008,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(PolicyDeleteResponse, policy, path=["response"])
+ assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1019,7 +1019,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(PolicyDeleteResponse, policy, path=["response"])
+ assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1034,7 +1034,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"
policy = await response.parse()
- assert_matches_type(PolicyDeleteResponse, policy, path=["response"])
+ assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1049,7 +1049,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
policy = await response.parse()
- assert_matches_type(PolicyDeleteResponse, policy, path=["response"])
+ assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1097,7 +1097,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1108,7 +1108,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
account_id="string",
zone_id="string",
)
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1123,7 +1123,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"
policy = await response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1138,7 +1138,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
policy = await response.parse()
- assert_matches_type(Policy, policy, path=["response"])
+ assert_matches_type(Optional[Policy], policy, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py
index 4747aba182fe..9072d96c0c27 100644
--- a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py
+++ b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -25,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(UserPolicyCheckListResponse, user_policy_check, path=["response"])
+ assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -35,7 +35,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(UserPolicyCheckListResponse, user_policy_check, path=["response"])
+ assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -49,7 +49,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
user_policy_check = response.parse()
- assert_matches_type(UserPolicyCheckListResponse, user_policy_check, path=["response"])
+ assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -63,7 +63,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
user_policy_check = response.parse()
- assert_matches_type(UserPolicyCheckListResponse, user_policy_check, path=["response"])
+ assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -96,7 +96,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(UserPolicyCheckListResponse, user_policy_check, path=["response"])
+ assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -106,7 +106,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
account_id="string",
zone_id="string",
)
- assert_matches_type(UserPolicyCheckListResponse, user_policy_check, path=["response"])
+ assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -120,7 +120,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
user_policy_check = await response.parse()
- assert_matches_type(UserPolicyCheckListResponse, user_policy_check, path=["response"])
+ assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -134,7 +134,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
user_policy_check = await response.parse()
- assert_matches_type(UserPolicyCheckListResponse, user_policy_check, path=["response"])
+ assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py
index b6ae9f399bc6..9847b97400a0 100644
--- a/tests/api_resources/zero_trust/access/test_applications.py
+++ b/tests/api_resources/zero_trust/access/test_applications.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_overload_1(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -70,6 +70,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -78,7 +79,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -93,7 +94,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -108,7 +109,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -138,7 +139,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -180,7 +181,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N
tags=["engineers", "engineers", "engineers"],
type="saas",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -193,7 +194,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -206,7 +207,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -234,7 +235,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -274,6 +275,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -282,7 +284,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -297,7 +299,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -312,7 +314,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -344,7 +346,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -384,6 +386,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -392,7 +395,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -407,7 +410,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -422,7 +425,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -453,7 +456,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -470,7 +473,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -484,7 +487,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -498,7 +501,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -527,7 +530,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -544,7 +547,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -558,7 +561,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -572,7 +575,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -601,7 +604,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -618,7 +621,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -632,7 +635,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -646,7 +649,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -674,7 +677,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -689,7 +692,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N
tags=["engineers", "engineers", "engineers"],
type="bookmark",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -702,7 +705,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -715,7 +718,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -744,7 +747,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -785,6 +788,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -793,7 +797,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -809,7 +813,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -825,7 +829,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -858,7 +862,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -901,7 +905,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N
tags=["engineers", "engineers", "engineers"],
type="saas",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -915,7 +919,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -929,7 +933,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -960,7 +964,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1001,6 +1005,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -1009,7 +1014,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1025,7 +1030,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1041,7 +1046,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1076,7 +1081,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1117,6 +1122,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -1125,7 +1131,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1141,7 +1147,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1157,7 +1163,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1191,7 +1197,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1209,7 +1215,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1224,7 +1230,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1239,7 +1245,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1271,7 +1277,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1289,7 +1295,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1304,7 +1310,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1319,7 +1325,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1351,7 +1357,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1369,7 +1375,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1384,7 +1390,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1399,7 +1405,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1430,7 +1436,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1446,7 +1452,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N
tags=["engineers", "engineers", "engineers"],
type="bookmark",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1460,7 +1466,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1474,7 +1480,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1564,7 +1570,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ApplicationDeleteResponse, application, path=["response"])
+ assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1574,7 +1580,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ApplicationDeleteResponse, application, path=["response"])
+ assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1588,7 +1594,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"
application = response.parse()
- assert_matches_type(ApplicationDeleteResponse, application, path=["response"])
+ assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1602,7 +1608,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(ApplicationDeleteResponse, application, path=["response"])
+ assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1631,7 +1637,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1641,7 +1647,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1655,7 +1661,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"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1669,7 +1675,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1770,7 +1776,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1810,6 +1816,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -1818,7 +1825,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1833,7 +1840,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1848,7 +1855,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1878,7 +1885,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1920,7 +1927,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
tags=["engineers", "engineers", "engineers"],
type="saas",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1933,7 +1940,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1946,7 +1953,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1974,7 +1981,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2014,6 +2021,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -2022,7 +2030,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2037,7 +2045,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2052,7 +2060,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2084,7 +2092,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2124,6 +2132,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -2132,7 +2141,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2147,7 +2156,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2162,7 +2171,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2193,7 +2202,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2210,7 +2219,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2224,7 +2233,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2238,7 +2247,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2267,7 +2276,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2284,7 +2293,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2298,7 +2307,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2312,7 +2321,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2341,7 +2350,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2358,7 +2367,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2372,7 +2381,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2386,7 +2395,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2414,7 +2423,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2429,7 +2438,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn
tags=["engineers", "engineers", "engineers"],
type="bookmark",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2442,7 +2451,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2455,7 +2464,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2484,7 +2493,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2525,6 +2534,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -2533,7 +2543,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2549,7 +2559,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2565,7 +2575,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2598,7 +2608,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2641,7 +2651,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn
tags=["engineers", "engineers", "engineers"],
type="saas",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2655,7 +2665,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2669,7 +2679,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2700,7 +2710,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2741,6 +2751,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -2749,7 +2760,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2765,7 +2776,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2781,7 +2792,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2816,7 +2827,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2857,6 +2868,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn
http_only_cookie_attribute=True,
logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg",
name="Admin Site",
+ options_preflight_bypass=True,
path_cookie_attribute=True,
same_site_cookie_attribute="strict",
self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"],
@@ -2865,7 +2877,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn
skip_interstitial=True,
tags=["engineers", "engineers", "engineers"],
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2881,7 +2893,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2897,7 +2909,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2931,7 +2943,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2949,7 +2961,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2964,7 +2976,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2979,7 +2991,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3011,7 +3023,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3029,7 +3041,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3044,7 +3056,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3059,7 +3071,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3091,7 +3103,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3109,7 +3121,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn
auto_redirect_to_identity=True,
session_duration="24h",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3124,7 +3136,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3139,7 +3151,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3170,7 +3182,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3186,7 +3198,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn
tags=["engineers", "engineers", "engineers"],
type="bookmark",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3200,7 +3212,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3214,7 +3226,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3304,7 +3316,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ApplicationDeleteResponse, application, path=["response"])
+ assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3314,7 +3326,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(ApplicationDeleteResponse, application, path=["response"])
+ assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3328,7 +3340,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"
application = await response.parse()
- assert_matches_type(ApplicationDeleteResponse, application, path=["response"])
+ assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3342,7 +3354,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(ApplicationDeleteResponse, application, path=["response"])
+ assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3371,7 +3383,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3381,7 +3393,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
account_id="string",
zone_id="string",
)
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3395,7 +3407,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"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3409,7 +3421,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
application = await response.parse()
- assert_matches_type(Application, application, path=["response"])
+ assert_matches_type(Optional[Application], application, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py
index bfb64c681008..957fb0357e38 100644
--- a/tests/api_resources/zero_trust/access/test_bookmarks.py
+++ b/tests/api_resources/zero_trust/access/test_bookmarks.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None:
identifier="699d98642c564d2e855e9661899b7252",
body={},
)
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -43,7 +43,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"
bookmark = response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -57,7 +57,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
bookmark = response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -86,7 +86,7 @@ def test_method_update(self, client: Cloudflare) -> None:
identifier="699d98642c564d2e855e9661899b7252",
body={},
)
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, 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"
bookmark = response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -114,7 +114,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
bookmark = response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -185,7 +185,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
identifier="699d98642c564d2e855e9661899b7252",
body={},
)
- assert_matches_type(BookmarkDeleteResponse, bookmark, path=["response"])
+ assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -199,7 +199,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"
bookmark = response.parse()
- assert_matches_type(BookmarkDeleteResponse, bookmark, path=["response"])
+ assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -213,7 +213,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
bookmark = response.parse()
- assert_matches_type(BookmarkDeleteResponse, bookmark, path=["response"])
+ assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -241,7 +241,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="699d98642c564d2e855e9661899b7252",
)
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -254,7 +254,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"
bookmark = response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -267,7 +267,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
bookmark = response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -298,7 +298,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
identifier="699d98642c564d2e855e9661899b7252",
body={},
)
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -312,7 +312,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"
bookmark = await response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, 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"
bookmark = await response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -355,7 +355,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
identifier="699d98642c564d2e855e9661899b7252",
body={},
)
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -369,7 +369,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"
bookmark = await response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -383,7 +383,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
bookmark = await response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -454,7 +454,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
identifier="699d98642c564d2e855e9661899b7252",
body={},
)
- assert_matches_type(BookmarkDeleteResponse, bookmark, path=["response"])
+ assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -468,7 +468,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"
bookmark = await response.parse()
- assert_matches_type(BookmarkDeleteResponse, bookmark, path=["response"])
+ assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -482,7 +482,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
bookmark = await response.parse()
- assert_matches_type(BookmarkDeleteResponse, bookmark, path=["response"])
+ assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -510,7 +510,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="699d98642c564d2e855e9661899b7252",
)
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -523,7 +523,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"
bookmark = await response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -536,7 +536,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
bookmark = await response.parse()
- assert_matches_type(Bookmark, bookmark, path=["response"])
+ assert_matches_type(Optional[Bookmark], bookmark, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py
index 778aba5a1b40..c91be3d7a8cf 100644
--- a/tests/api_resources/zero_trust/access/test_certificates.py
+++ b/tests/api_resources/zero_trust/access/test_certificates.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:
account_id="string",
zone_id="string",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
zone_id="string",
associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"],
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -57,7 +57,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"
certificate = response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -72,7 +72,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
certificate = response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -104,7 +104,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -116,7 +116,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
zone_id="string",
name="Allow devs",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -131,7 +131,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"
certificate = response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -146,7 +146,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
certificate = response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -246,7 +246,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CertificateDeleteResponse, certificate, path=["response"])
+ assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -256,7 +256,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CertificateDeleteResponse, certificate, path=["response"])
+ assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -270,7 +270,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"
certificate = response.parse()
- assert_matches_type(CertificateDeleteResponse, certificate, path=["response"])
+ assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -284,7 +284,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
certificate = response.parse()
- assert_matches_type(CertificateDeleteResponse, certificate, path=["response"])
+ assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -320,7 +320,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -330,7 +330,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -344,7 +344,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"
certificate = response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -358,7 +358,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
certificate = response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -399,7 +399,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -411,7 +411,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
zone_id="string",
associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"],
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -426,7 +426,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"
certificate = await response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -441,7 +441,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
certificate = await response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -473,7 +473,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -485,7 +485,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
zone_id="string",
name="Allow devs",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -500,7 +500,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"
certificate = await response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -515,7 +515,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
certificate = await response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -615,7 +615,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(CertificateDeleteResponse, certificate, path=["response"])
+ assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -625,7 +625,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(CertificateDeleteResponse, certificate, path=["response"])
+ assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -639,7 +639,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"
certificate = await response.parse()
- assert_matches_type(CertificateDeleteResponse, certificate, path=["response"])
+ assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -653,7 +653,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
certificate = await response.parse()
- assert_matches_type(CertificateDeleteResponse, certificate, path=["response"])
+ assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -689,7 +689,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -699,7 +699,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
account_id="string",
zone_id="string",
)
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -713,7 +713,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"
certificate = await response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -727,7 +727,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
certificate = await response.parse()
- assert_matches_type(Certificate, certificate, path=["response"])
+ assert_matches_type(Optional[Certificate], certificate, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py
index e80430f53d9d..e308329aad03 100644
--- a/tests/api_resources/zero_trust/access/test_custom_pages.py
+++ b/tests/api_resources/zero_trust/access/test_custom_pages.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="string",
type="identity_denied",
)
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -43,7 +43,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
type="identity_denied",
app_count=0,
)
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -58,7 +58,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"
custom_page = response.parse()
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -73,7 +73,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = response.parse()
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -98,7 +98,7 @@ def test_method_update(self, client: Cloudflare) -> None:
name="string",
type="identity_denied",
)
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -111,7 +111,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
type="identity_denied",
app_count=0,
)
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -127,7 +127,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"
custom_page = response.parse()
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -143,7 +143,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = response.parse()
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -217,7 +217,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(CustomPageDeleteResponse, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -230,7 +230,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"
custom_page = response.parse()
- assert_matches_type(CustomPageDeleteResponse, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -243,7 +243,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = response.parse()
- assert_matches_type(CustomPageDeleteResponse, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -269,7 +269,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(CustomPage, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPage], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -282,7 +282,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"
custom_page = response.parse()
- assert_matches_type(CustomPage, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPage], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -295,7 +295,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = response.parse()
- assert_matches_type(CustomPage, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPage], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -327,7 +327,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
name="string",
type="identity_denied",
)
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -339,7 +339,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
type="identity_denied",
app_count=0,
)
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -354,7 +354,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"
custom_page = await response.parse()
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -369,7 +369,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = await response.parse()
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -394,7 +394,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
name="string",
type="identity_denied",
)
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -407,7 +407,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
type="identity_denied",
app_count=0,
)
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -423,7 +423,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"
custom_page = await response.parse()
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -439,7 +439,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = await response.parse()
- assert_matches_type(CustomPageWithoutHTML, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -513,7 +513,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(CustomPageDeleteResponse, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -526,7 +526,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"
custom_page = await response.parse()
- assert_matches_type(CustomPageDeleteResponse, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -539,7 +539,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = await response.parse()
- assert_matches_type(CustomPageDeleteResponse, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -565,7 +565,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(CustomPage, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPage], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -578,7 +578,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"
custom_page = await response.parse()
- assert_matches_type(CustomPage, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPage], custom_page, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -591,7 +591,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
custom_page = await response.parse()
- assert_matches_type(CustomPage, custom_page, path=["response"])
+ assert_matches_type(Optional[CustomPage], custom_page, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py
index bacc5833c91a..4d3955c56ee3 100644
--- a/tests/api_resources/zero_trust/access/test_groups.py
+++ b/tests/api_resources/zero_trust/access/test_groups.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -60,7 +60,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
{"email": {"email": "test@example.com"}},
],
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -79,7 +79,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"
group = response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -98,7 +98,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
group = response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -143,7 +143,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -170,7 +170,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
{"email": {"email": "test@example.com"}},
],
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -190,7 +190,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"
group = response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -210,7 +210,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
group = response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -325,7 +325,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(GroupDeleteResponse, group, path=["response"])
+ assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -335,7 +335,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(GroupDeleteResponse, group, path=["response"])
+ assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -349,7 +349,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"
group = response.parse()
- assert_matches_type(GroupDeleteResponse, group, path=["response"])
+ assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -363,7 +363,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
group = response.parse()
- assert_matches_type(GroupDeleteResponse, group, path=["response"])
+ assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -399,7 +399,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -409,7 +409,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -423,7 +423,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"
group = response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -437,7 +437,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
group = response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -482,7 +482,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -508,7 +508,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
{"email": {"email": "test@example.com"}},
],
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -527,7 +527,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"
group = await response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -546,7 +546,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
group = await response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -591,7 +591,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -618,7 +618,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
{"email": {"email": "test@example.com"}},
],
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -638,7 +638,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"
group = await response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -658,7 +658,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
group = await response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -773,7 +773,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(GroupDeleteResponse, group, path=["response"])
+ assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -783,7 +783,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(GroupDeleteResponse, group, path=["response"])
+ assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -797,7 +797,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"
group = await response.parse()
- assert_matches_type(GroupDeleteResponse, group, path=["response"])
+ assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -811,7 +811,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
group = await response.parse()
- assert_matches_type(GroupDeleteResponse, group, path=["response"])
+ assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -847,7 +847,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -857,7 +857,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
account_id="string",
zone_id="string",
)
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -871,7 +871,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"
group = await response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -885,7 +885,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
group = await response.parse()
- assert_matches_type(ZeroTrustGroup, group, path=["response"])
+ assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_keys.py b/tests/api_resources/zero_trust/access/test_keys.py
index 3485f9113bb2..24d3a0341474 100644
--- a/tests/api_resources/zero_trust/access/test_keys.py
+++ b/tests/api_resources/zero_trust/access/test_keys.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -24,7 +24,7 @@ def test_method_update(self, client: Cloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
key_rotation_interval_days=30,
)
- assert_matches_type(KeyUpdateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -37,7 +37,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"
key = response.parse()
- assert_matches_type(KeyUpdateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -50,7 +50,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
key = response.parse()
- assert_matches_type(KeyUpdateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None:
key = client.zero_trust.access.keys.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(KeyGetResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyGetResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -81,7 +81,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"
key = response.parse()
- assert_matches_type(KeyGetResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyGetResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -93,7 +93,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
key = response.parse()
- assert_matches_type(KeyGetResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyGetResponse], key, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -111,7 +111,7 @@ def test_method_rotate(self, client: Cloudflare) -> None:
key = client.zero_trust.access.keys.rotate(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(KeyRotateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyRotateResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -123,7 +123,7 @@ def test_raw_response_rotate(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
key = response.parse()
- assert_matches_type(KeyRotateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyRotateResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -135,7 +135,7 @@ def test_streaming_response_rotate(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
key = response.parse()
- assert_matches_type(KeyRotateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyRotateResponse], key, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -158,7 +158,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
key_rotation_interval_days=30,
)
- assert_matches_type(KeyUpdateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -171,7 +171,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"
key = await response.parse()
- assert_matches_type(KeyUpdateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -184,7 +184,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
key = await response.parse()
- assert_matches_type(KeyUpdateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyUpdateResponse], key, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -203,7 +203,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
key = await async_client.zero_trust.access.keys.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(KeyGetResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyGetResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -215,7 +215,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"
key = await response.parse()
- assert_matches_type(KeyGetResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyGetResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -227,7 +227,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
key = await response.parse()
- assert_matches_type(KeyGetResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyGetResponse], key, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -245,7 +245,7 @@ async def test_method_rotate(self, async_client: AsyncCloudflare) -> None:
key = await async_client.zero_trust.access.keys.rotate(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(KeyRotateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyRotateResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -257,7 +257,7 @@ async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
key = await response.parse()
- assert_matches_type(KeyRotateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyRotateResponse], key, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -269,7 +269,7 @@ async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
key = await response.parse()
- assert_matches_type(KeyRotateResponse, key, path=["response"])
+ assert_matches_type(Optional[KeyRotateResponse], key, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py
index 28ebab167049..ef3affbf96c1 100644
--- a/tests/api_resources/zero_trust/access/test_service_tokens.py
+++ b/tests/api_resources/zero_trust/access/test_service_tokens.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:
account_id="string",
zone_id="string",
)
- assert_matches_type(ServiceTokenCreateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
zone_id="string",
duration="60m",
)
- assert_matches_type(ServiceTokenCreateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -55,7 +55,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"
service_token = response.parse()
- assert_matches_type(ServiceTokenCreateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -69,7 +69,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = response.parse()
- assert_matches_type(ServiceTokenCreateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -98,7 +98,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -110,7 +110,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
duration="60m",
name="CI/CD token",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -124,7 +124,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"
service_token = response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -138,7 +138,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -235,7 +235,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -245,7 +245,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -259,7 +259,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"
service_token = response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -273,7 +273,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -308,7 +308,7 @@ def test_method_refresh(self, client: Cloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -321,7 +321,7 @@ def test_raw_response_refresh(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -334,7 +334,7 @@ def test_streaming_response_refresh(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -360,7 +360,7 @@ def test_method_rotate(self, client: Cloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ServiceTokenRotateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -373,7 +373,7 @@ def test_raw_response_rotate(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = response.parse()
- assert_matches_type(ServiceTokenRotateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -386,7 +386,7 @@ def test_streaming_response_rotate(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = response.parse()
- assert_matches_type(ServiceTokenRotateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -417,7 +417,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ServiceTokenCreateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -428,7 +428,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
zone_id="string",
duration="60m",
)
- assert_matches_type(ServiceTokenCreateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -442,7 +442,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"
service_token = await response.parse()
- assert_matches_type(ServiceTokenCreateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -456,7 +456,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = await response.parse()
- assert_matches_type(ServiceTokenCreateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -485,7 +485,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -497,7 +497,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
duration="60m",
name="CI/CD token",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -511,7 +511,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"
service_token = await response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -525,7 +525,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = await response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -622,7 +622,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -632,7 +632,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -646,7 +646,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"
service_token = await response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -660,7 +660,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = await response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -695,7 +695,7 @@ async def test_method_refresh(self, async_client: AsyncCloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -708,7 +708,7 @@ async def test_raw_response_refresh(self, async_client: AsyncCloudflare) -> None
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = await response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -721,7 +721,7 @@ async def test_streaming_response_refresh(self, async_client: AsyncCloudflare) -
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = await response.parse()
- assert_matches_type(ServiceToken, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceToken], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -747,7 +747,7 @@ async def test_method_rotate(self, async_client: AsyncCloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ServiceTokenRotateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -760,7 +760,7 @@ async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = await response.parse()
- assert_matches_type(ServiceTokenRotateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -773,7 +773,7 @@ async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
service_token = await response.parse()
- assert_matches_type(ServiceTokenRotateResponse, service_token, path=["response"])
+ assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py
index 0848694db068..f2a936811e94 100644
--- a/tests/api_resources/zero_trust/access/test_tags.py
+++ b/tests/api_resources/zero_trust/access/test_tags.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -25,7 +25,7 @@ def test_method_create(self, client: Cloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
name="engineers",
)
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -38,7 +38,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"
tag = response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -51,7 +51,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tag = response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -72,7 +72,7 @@ def test_method_update(self, client: Cloudflare) -> None:
identifier="023e105f4ecef8ad9ca31a8372d0c353",
name="engineers",
)
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -86,7 +86,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"
tag = response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -100,7 +100,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tag = response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -170,7 +170,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
"engineers",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(TagDeleteResponse, tag, path=["response"])
+ assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -183,7 +183,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"
tag = response.parse()
- assert_matches_type(TagDeleteResponse, tag, path=["response"])
+ assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -196,7 +196,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tag = response.parse()
- assert_matches_type(TagDeleteResponse, tag, path=["response"])
+ assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -222,7 +222,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"engineers",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -235,7 +235,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"
tag = response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -248,7 +248,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tag = response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -278,7 +278,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
name="engineers",
)
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -291,7 +291,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"
tag = await response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -304,7 +304,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tag = await response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -325,7 +325,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
identifier="023e105f4ecef8ad9ca31a8372d0c353",
name="engineers",
)
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -339,7 +339,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"
tag = await response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -353,7 +353,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tag = await response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -423,7 +423,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
"engineers",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(TagDeleteResponse, tag, path=["response"])
+ assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -436,7 +436,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"
tag = await response.parse()
- assert_matches_type(TagDeleteResponse, tag, path=["response"])
+ assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -449,7 +449,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tag = await response.parse()
- assert_matches_type(TagDeleteResponse, tag, path=["response"])
+ assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -475,7 +475,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"engineers",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -488,7 +488,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"
tag = await response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -501,7 +501,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
tag = await response.parse()
- assert_matches_type(Tag, tag, path=["response"])
+ assert_matches_type(Optional[Tag], tag, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/users/test_active_sessions.py b/tests/api_resources/zero_trust/access/users/test_active_sessions.py
index 724da335d7c3..c8013d802748 100644
--- a/tests/api_resources/zero_trust/access/users/test_active_sessions.py
+++ b/tests/api_resources/zero_trust/access/users/test_active_sessions.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -78,7 +78,7 @@ def test_method_get(self, client: Cloudflare) -> None:
identifier="023e105f4ecef8ad9ca31a8372d0c353",
id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
)
- assert_matches_type(ActiveSessionGetResponse, active_session, path=["response"])
+ assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -92,7 +92,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"
active_session = response.parse()
- assert_matches_type(ActiveSessionGetResponse, active_session, path=["response"])
+ assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -106,7 +106,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
active_session = response.parse()
- assert_matches_type(ActiveSessionGetResponse, active_session, path=["response"])
+ assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -198,7 +198,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
identifier="023e105f4ecef8ad9ca31a8372d0c353",
id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
)
- assert_matches_type(ActiveSessionGetResponse, active_session, path=["response"])
+ assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -212,7 +212,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"
active_session = await response.parse()
- assert_matches_type(ActiveSessionGetResponse, active_session, path=["response"])
+ assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -226,7 +226,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
active_session = await response.parse()
- assert_matches_type(ActiveSessionGetResponse, active_session, path=["response"])
+ assert_matches_type(Optional[ActiveSessionGetResponse], active_session, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py
index 5c6f4666b685..9b2f3fa96c4f 100644
--- a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py
+++ b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -24,7 +24,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Identity, last_seen_identity, path=["response"])
+ assert_matches_type(Optional[Identity], last_seen_identity, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -37,7 +37,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"
last_seen_identity = response.parse()
- assert_matches_type(Identity, last_seen_identity, path=["response"])
+ assert_matches_type(Optional[Identity], last_seen_identity, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -50,7 +50,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
last_seen_identity = response.parse()
- assert_matches_type(Identity, last_seen_identity, path=["response"])
+ assert_matches_type(Optional[Identity], last_seen_identity, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Identity, last_seen_identity, path=["response"])
+ assert_matches_type(Optional[Identity], last_seen_identity, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -93,7 +93,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"
last_seen_identity = await response.parse()
- assert_matches_type(Identity, last_seen_identity, path=["response"])
+ assert_matches_type(Optional[Identity], last_seen_identity, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -106,7 +106,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
last_seen_identity = await response.parse()
- assert_matches_type(Identity, last_seen_identity, path=["response"])
+ assert_matches_type(Optional[Identity], last_seen_identity, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py
index a9e58c4d60b5..f9df9404dd25 100644
--- a/tests/api_resources/zero_trust/test_identity_providers.py
+++ b/tests/api_resources/zero_trust/test_identity_providers.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, cast
+from typing import Any, Optional, cast
import pytest
@@ -32,7 +32,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -60,7 +60,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -76,7 +76,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -92,7 +92,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -127,7 +127,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -153,7 +153,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -169,7 +169,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -185,7 +185,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -220,7 +220,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -242,7 +242,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -258,7 +258,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -274,7 +274,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -309,7 +309,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -331,7 +331,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -347,7 +347,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -363,7 +363,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -398,7 +398,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -422,7 +422,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -438,7 +438,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -454,7 +454,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -489,7 +489,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -514,7 +514,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -530,7 +530,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -546,7 +546,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -581,7 +581,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -603,7 +603,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -619,7 +619,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -635,7 +635,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -670,7 +670,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -698,7 +698,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -714,7 +714,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -730,7 +730,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -765,7 +765,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -791,7 +791,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -807,7 +807,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -823,7 +823,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -858,7 +858,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -883,7 +883,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -899,7 +899,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -915,7 +915,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -950,7 +950,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -975,7 +975,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -991,7 +991,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1007,7 +1007,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1042,7 +1042,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1082,7 +1082,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1098,7 +1098,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1114,7 +1114,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1149,7 +1149,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1171,7 +1171,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1187,7 +1187,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1203,7 +1203,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1238,7 +1238,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1257,7 +1257,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1273,7 +1273,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1289,7 +1289,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1325,7 +1325,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1354,7 +1354,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1371,7 +1371,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1388,7 +1388,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1436,7 +1436,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1463,7 +1463,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1480,7 +1480,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1497,7 +1497,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1545,7 +1545,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1568,7 +1568,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1585,7 +1585,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1602,7 +1602,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1650,7 +1650,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1673,7 +1673,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1690,7 +1690,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1707,7 +1707,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1755,7 +1755,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1780,7 +1780,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1797,7 +1797,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1814,7 +1814,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1862,7 +1862,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1888,7 +1888,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1905,7 +1905,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1922,7 +1922,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1970,7 +1970,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -1993,7 +1993,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2010,7 +2010,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2027,7 +2027,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2075,7 +2075,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2104,7 +2104,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2121,7 +2121,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2138,7 +2138,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2186,7 +2186,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2213,7 +2213,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2230,7 +2230,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2247,7 +2247,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2295,7 +2295,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2321,7 +2321,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2338,7 +2338,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2355,7 +2355,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2403,7 +2403,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2429,7 +2429,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2446,7 +2446,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2463,7 +2463,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2511,7 +2511,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2552,7 +2552,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2569,7 +2569,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2586,7 +2586,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2634,7 +2634,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2657,7 +2657,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2674,7 +2674,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2691,7 +2691,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2739,7 +2739,7 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2759,7 +2759,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) ->
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2776,7 +2776,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2793,7 +2793,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2899,7 +2899,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProviderDeleteResponse, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2909,7 +2909,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProviderDeleteResponse, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2923,7 +2923,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"
identity_provider = response.parse()
- assert_matches_type(IdentityProviderDeleteResponse, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2937,7 +2937,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProviderDeleteResponse, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2973,7 +2973,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2983,7 +2983,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -2997,7 +2997,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"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3011,7 +3011,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3053,7 +3053,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3081,7 +3081,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3097,7 +3097,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3113,7 +3113,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3148,7 +3148,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3174,7 +3174,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3190,7 +3190,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3206,7 +3206,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3241,7 +3241,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3263,7 +3263,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3279,7 +3279,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3295,7 +3295,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3330,7 +3330,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3352,7 +3352,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3368,7 +3368,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3384,7 +3384,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3419,7 +3419,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3443,7 +3443,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3459,7 +3459,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3475,7 +3475,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3510,7 +3510,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3535,7 +3535,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3551,7 +3551,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3567,7 +3567,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3602,7 +3602,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3624,7 +3624,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3640,7 +3640,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3656,7 +3656,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3691,7 +3691,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3719,7 +3719,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3735,7 +3735,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3751,7 +3751,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3786,7 +3786,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3812,7 +3812,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3828,7 +3828,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3844,7 +3844,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3879,7 +3879,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3904,7 +3904,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3920,7 +3920,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3936,7 +3936,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3971,7 +3971,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -3996,7 +3996,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4012,7 +4012,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4028,7 +4028,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4063,7 +4063,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4103,7 +4103,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4119,7 +4119,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4135,7 +4135,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4170,7 +4170,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4192,7 +4192,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4208,7 +4208,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4224,7 +4224,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4259,7 +4259,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4278,7 +4278,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4294,7 +4294,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4310,7 +4310,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4346,7 +4346,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4375,7 +4375,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4392,7 +4392,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4409,7 +4409,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4457,7 +4457,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4484,7 +4484,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4501,7 +4501,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4518,7 +4518,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4566,7 +4566,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4589,7 +4589,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4606,7 +4606,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4623,7 +4623,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4671,7 +4671,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4694,7 +4694,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4711,7 +4711,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4728,7 +4728,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4776,7 +4776,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4801,7 +4801,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4818,7 +4818,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4835,7 +4835,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4883,7 +4883,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4909,7 +4909,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4926,7 +4926,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -4943,7 +4943,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -4991,7 +4991,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5014,7 +5014,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5031,7 +5031,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5048,7 +5048,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5096,7 +5096,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5125,7 +5125,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5142,7 +5142,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5159,7 +5159,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5207,7 +5207,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5234,7 +5234,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5251,7 +5251,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5268,7 +5268,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5316,7 +5316,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5342,7 +5342,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5359,7 +5359,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5376,7 +5376,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5424,7 +5424,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5450,7 +5450,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5467,7 +5467,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5484,7 +5484,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5532,7 +5532,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5573,7 +5573,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5590,7 +5590,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5607,7 +5607,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5655,7 +5655,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5678,7 +5678,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5695,7 +5695,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5712,7 +5712,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5760,7 +5760,7 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) ->
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5780,7 +5780,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy
"user_deprovision": True,
},
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5797,7 +5797,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5814,7 +5814,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5920,7 +5920,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProviderDeleteResponse, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5930,7 +5930,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProviderDeleteResponse, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5944,7 +5944,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"
identity_provider = await response.parse()
- assert_matches_type(IdentityProviderDeleteResponse, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -5958,7 +5958,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProviderDeleteResponse, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -5994,7 +5994,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -6004,7 +6004,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
account_id="string",
zone_id="string",
)
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -6018,7 +6018,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"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -6032,7 +6032,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
identity_provider = await response.parse()
- assert_matches_type(IdentityProvider, identity_provider, path=["response"])
+ assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py
index 010456034f48..c8bcc6bb4ebb 100644
--- a/tests/api_resources/zero_trust/test_organizations.py
+++ b/tests/api_resources/zero_trust/test_organizations.py
@@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -54,7 +54,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
user_seat_expiration_inactive_time="720h",
warp_auth_session_duration="24h",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -69,7 +69,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"
organization = response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -84,7 +84,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
organization = response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -114,7 +114,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -143,7 +143,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
user_seat_expiration_inactive_time="720h",
warp_auth_session_duration="24h",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -156,7 +156,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"
organization = response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -169,7 +169,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
organization = response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -195,7 +195,7 @@ def test_method_list(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -204,7 +204,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -217,7 +217,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
organization = response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -230,7 +230,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
organization = response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -329,7 +329,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -354,7 +354,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
user_seat_expiration_inactive_time="720h",
warp_auth_session_duration="24h",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -369,7 +369,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"
organization = await response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -384,7 +384,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
organization = await response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -414,7 +414,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -443,7 +443,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
user_seat_expiration_inactive_time="720h",
warp_auth_session_duration="24h",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -456,7 +456,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"
organization = await response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -469,7 +469,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
organization = await response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -495,7 +495,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
account_id="string",
zone_id="string",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -504,7 +504,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
account_id="string",
zone_id="string",
)
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -517,7 +517,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
organization = await response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -530,7 +530,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
organization = await response.parse()
- assert_matches_type(Organization, organization, path=["response"])
+ assert_matches_type(Optional[Organization], organization, path=["response"])
assert cast(Any, response.is_closed) is True