diff --git a/api.md b/api.md
index 56b3b3898c0..634519b98ce 100644
--- a/api.md
+++ b/api.md
@@ -1945,24 +1945,21 @@ Types:
```python
from cloudflare.types.pagerules import (
+ PageRule,
Target,
- PageruleCreateResponse,
- PageruleUpdateResponse,
PageruleListResponse,
PageruleDeleteResponse,
- PageruleEditResponse,
- PageruleGetResponse,
)
```
Methods:
-- client.pagerules.create(\*, zone_id, \*\*params) -> Optional
-- client.pagerules.update(pagerule_id, \*, zone_id, \*\*params) -> Optional
+- client.pagerules.create(\*, zone_id, \*\*params) -> Optional
+- client.pagerules.update(pagerule_id, \*, zone_id, \*\*params) -> Optional
- client.pagerules.list(\*, zone_id, \*\*params) -> Optional
- client.pagerules.delete(pagerule_id, \*, zone_id) -> Optional
-- client.pagerules.edit(pagerule_id, \*, zone_id, \*\*params) -> Optional
-- client.pagerules.get(pagerule_id, \*, zone_id) -> Optional
+- client.pagerules.edit(pagerule_id, \*, zone_id, \*\*params) -> Optional
+- client.pagerules.get(pagerule_id, \*, zone_id) -> Optional
## Settings
@@ -6375,7 +6372,7 @@ Methods:
Types:
```python
-from cloudflare.types.hyperdrive import Configuration
+from cloudflare.types.hyperdrive import Configuration, Hyperdrive
```
## Configs
@@ -6383,24 +6380,17 @@ from cloudflare.types.hyperdrive import Configuration
Types:
```python
-from cloudflare.types.hyperdrive import (
- ConfigCreateResponse,
- ConfigUpdateResponse,
- ConfigListResponse,
- ConfigDeleteResponse,
- ConfigEditResponse,
- ConfigGetResponse,
-)
+from cloudflare.types.hyperdrive import ConfigDeleteResponse
```
Methods:
-- client.hyperdrive.configs.create(\*, account_id, \*\*params) -> ConfigCreateResponse
-- client.hyperdrive.configs.update(hyperdrive_id, \*, account_id, \*\*params) -> ConfigUpdateResponse
-- client.hyperdrive.configs.list(\*, account_id) -> SyncSinglePage[ConfigListResponse]
+- client.hyperdrive.configs.create(\*, account_id, \*\*params) -> Hyperdrive
+- client.hyperdrive.configs.update(hyperdrive_id, \*, account_id, \*\*params) -> Hyperdrive
+- client.hyperdrive.configs.list(\*, account_id) -> SyncSinglePage[Hyperdrive]
- client.hyperdrive.configs.delete(hyperdrive_id, \*, account_id) -> object
-- client.hyperdrive.configs.edit(hyperdrive_id, \*, account_id, \*\*params) -> ConfigEditResponse
-- client.hyperdrive.configs.get(hyperdrive_id, \*, account_id) -> ConfigGetResponse
+- client.hyperdrive.configs.edit(hyperdrive_id, \*, account_id, \*\*params) -> Hyperdrive
+- client.hyperdrive.configs.get(hyperdrive_id, \*, account_id) -> Hyperdrive
# RUM
diff --git a/src/cloudflare/resources/hyperdrive/configs.py b/src/cloudflare/resources/hyperdrive/configs.py
index b82e2139e3f..65d373db9f4 100644
--- a/src/cloudflare/resources/hyperdrive/configs.py
+++ b/src/cloudflare/resources/hyperdrive/configs.py
@@ -23,11 +23,7 @@
from ...pagination import SyncSinglePage, AsyncSinglePage
from ..._base_client import AsyncPaginator, make_request_options
from ...types.hyperdrive import config_edit_params, config_create_params, config_update_params
-from ...types.hyperdrive.config_get_response import ConfigGetResponse
-from ...types.hyperdrive.config_edit_response import ConfigEditResponse
-from ...types.hyperdrive.config_list_response import ConfigListResponse
-from ...types.hyperdrive.config_create_response import ConfigCreateResponse
-from ...types.hyperdrive.config_update_response import ConfigUpdateResponse
+from ...types.hyperdrive.hyperdrive import Hyperdrive
__all__ = ["ConfigsResource", "AsyncConfigsResource"]
@@ -65,7 +61,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ConfigCreateResponse:
+ ) -> Hyperdrive:
"""
Creates and returns a new Hyperdrive configuration.
@@ -97,9 +93,9 @@ def create(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[ConfigCreateResponse]._unwrapper,
+ post_parser=ResultWrapper[Hyperdrive]._unwrapper,
),
- cast_to=cast(Type[ConfigCreateResponse], ResultWrapper[ConfigCreateResponse]),
+ cast_to=cast(Type[Hyperdrive], ResultWrapper[Hyperdrive]),
)
def update(
@@ -116,7 +112,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ConfigUpdateResponse:
+ ) -> Hyperdrive:
"""
Updates and returns the specified Hyperdrive configuration.
@@ -152,9 +148,9 @@ def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[ConfigUpdateResponse]._unwrapper,
+ post_parser=ResultWrapper[Hyperdrive]._unwrapper,
),
- cast_to=cast(Type[ConfigUpdateResponse], ResultWrapper[ConfigUpdateResponse]),
+ cast_to=cast(Type[Hyperdrive], ResultWrapper[Hyperdrive]),
)
def list(
@@ -167,7 +163,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[ConfigListResponse]:
+ ) -> SyncSinglePage[Hyperdrive]:
"""
Returns a list of Hyperdrives
@@ -186,11 +182,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/hyperdrive/configs",
- page=SyncSinglePage[ConfigListResponse],
+ page=SyncSinglePage[Hyperdrive],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=ConfigListResponse,
+ model=Hyperdrive,
)
def delete(
@@ -251,7 +247,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ConfigEditResponse:
+ ) -> Hyperdrive:
"""Patches and returns the specified Hyperdrive configuration.
Custom caching
@@ -289,9 +285,9 @@ def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[ConfigEditResponse]._unwrapper,
+ post_parser=ResultWrapper[Hyperdrive]._unwrapper,
),
- cast_to=cast(Type[ConfigEditResponse], ResultWrapper[ConfigEditResponse]),
+ cast_to=cast(Type[Hyperdrive], ResultWrapper[Hyperdrive]),
)
def get(
@@ -305,7 +301,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ConfigGetResponse:
+ ) -> Hyperdrive:
"""
Returns the specified Hyperdrive configuration.
@@ -333,9 +329,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[ConfigGetResponse]._unwrapper,
+ post_parser=ResultWrapper[Hyperdrive]._unwrapper,
),
- cast_to=cast(Type[ConfigGetResponse], ResultWrapper[ConfigGetResponse]),
+ cast_to=cast(Type[Hyperdrive], ResultWrapper[Hyperdrive]),
)
@@ -372,7 +368,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ConfigCreateResponse:
+ ) -> Hyperdrive:
"""
Creates and returns a new Hyperdrive configuration.
@@ -404,9 +400,9 @@ async def create(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[ConfigCreateResponse]._unwrapper,
+ post_parser=ResultWrapper[Hyperdrive]._unwrapper,
),
- cast_to=cast(Type[ConfigCreateResponse], ResultWrapper[ConfigCreateResponse]),
+ cast_to=cast(Type[Hyperdrive], ResultWrapper[Hyperdrive]),
)
async def update(
@@ -423,7 +419,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ConfigUpdateResponse:
+ ) -> Hyperdrive:
"""
Updates and returns the specified Hyperdrive configuration.
@@ -459,9 +455,9 @@ async def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[ConfigUpdateResponse]._unwrapper,
+ post_parser=ResultWrapper[Hyperdrive]._unwrapper,
),
- cast_to=cast(Type[ConfigUpdateResponse], ResultWrapper[ConfigUpdateResponse]),
+ cast_to=cast(Type[Hyperdrive], ResultWrapper[Hyperdrive]),
)
def list(
@@ -474,7 +470,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[ConfigListResponse, AsyncSinglePage[ConfigListResponse]]:
+ ) -> AsyncPaginator[Hyperdrive, AsyncSinglePage[Hyperdrive]]:
"""
Returns a list of Hyperdrives
@@ -493,11 +489,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/hyperdrive/configs",
- page=AsyncSinglePage[ConfigListResponse],
+ page=AsyncSinglePage[Hyperdrive],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=ConfigListResponse,
+ model=Hyperdrive,
)
async def delete(
@@ -558,7 +554,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ConfigEditResponse:
+ ) -> Hyperdrive:
"""Patches and returns the specified Hyperdrive configuration.
Custom caching
@@ -596,9 +592,9 @@ async def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[ConfigEditResponse]._unwrapper,
+ post_parser=ResultWrapper[Hyperdrive]._unwrapper,
),
- cast_to=cast(Type[ConfigEditResponse], ResultWrapper[ConfigEditResponse]),
+ cast_to=cast(Type[Hyperdrive], ResultWrapper[Hyperdrive]),
)
async def get(
@@ -612,7 +608,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> ConfigGetResponse:
+ ) -> Hyperdrive:
"""
Returns the specified Hyperdrive configuration.
@@ -640,9 +636,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[ConfigGetResponse]._unwrapper,
+ post_parser=ResultWrapper[Hyperdrive]._unwrapper,
),
- cast_to=cast(Type[ConfigGetResponse], ResultWrapper[ConfigGetResponse]),
+ cast_to=cast(Type[Hyperdrive], ResultWrapper[Hyperdrive]),
)
diff --git a/src/cloudflare/resources/pagerules/pagerules.py b/src/cloudflare/resources/pagerules/pagerules.py
index 6a296dff1b9..7bfa3204cfe 100644
--- a/src/cloudflare/resources/pagerules/pagerules.py
+++ b/src/cloudflare/resources/pagerules/pagerules.py
@@ -37,13 +37,10 @@
pagerule_create_params,
pagerule_update_params,
)
+from ...types.pagerules.page_rule import PageRule
from ...types.pagerules.target_param import TargetParam
-from ...types.pagerules.pagerule_get_response import PageruleGetResponse
-from ...types.pagerules.pagerule_edit_response import PageruleEditResponse
from ...types.pagerules.pagerule_list_response import PageruleListResponse
-from ...types.pagerules.pagerule_create_response import PageruleCreateResponse
from ...types.pagerules.pagerule_delete_response import PageruleDeleteResponse
-from ...types.pagerules.pagerule_update_response import PageruleUpdateResponse
__all__ = ["PagerulesResource", "AsyncPagerulesResource"]
@@ -89,7 +86,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PageruleCreateResponse]:
+ ) -> Optional[PageRule]:
"""
Creates a new Page Rule.
@@ -135,9 +132,9 @@ def create(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[PageruleCreateResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[PageRule]]._unwrapper,
),
- cast_to=cast(Type[Optional[PageruleCreateResponse]], ResultWrapper[PageruleCreateResponse]),
+ cast_to=cast(Type[Optional[PageRule]], ResultWrapper[PageRule]),
)
@typing_extensions.deprecated(
@@ -158,7 +155,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PageruleUpdateResponse]:
+ ) -> Optional[PageRule]:
"""Replaces the configuration of an existing Page Rule.
The configuration of the
@@ -210,9 +207,9 @@ def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[PageruleUpdateResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[PageRule]]._unwrapper,
),
- cast_to=cast(Type[Optional[PageruleUpdateResponse]], ResultWrapper[PageruleUpdateResponse]),
+ cast_to=cast(Type[Optional[PageRule]], ResultWrapper[PageRule]),
)
@typing_extensions.deprecated(
@@ -344,7 +341,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PageruleEditResponse]:
+ ) -> Optional[PageRule]:
"""
Updates one or more fields of an existing Page Rule.
@@ -394,9 +391,9 @@ def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[PageruleEditResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[PageRule]]._unwrapper,
),
- cast_to=cast(Type[Optional[PageruleEditResponse]], ResultWrapper[PageruleEditResponse]),
+ cast_to=cast(Type[Optional[PageRule]], ResultWrapper[PageRule]),
)
@typing_extensions.deprecated(
@@ -413,7 +410,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PageruleGetResponse]:
+ ) -> Optional[PageRule]:
"""
Fetches the details of a Page Rule.
@@ -441,9 +438,9 @@ def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[PageruleGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[PageRule]]._unwrapper,
),
- cast_to=cast(Type[Optional[PageruleGetResponse]], ResultWrapper[PageruleGetResponse]),
+ cast_to=cast(Type[Optional[PageRule]], ResultWrapper[PageRule]),
)
@@ -488,7 +485,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PageruleCreateResponse]:
+ ) -> Optional[PageRule]:
"""
Creates a new Page Rule.
@@ -534,9 +531,9 @@ async def create(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[PageruleCreateResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[PageRule]]._unwrapper,
),
- cast_to=cast(Type[Optional[PageruleCreateResponse]], ResultWrapper[PageruleCreateResponse]),
+ cast_to=cast(Type[Optional[PageRule]], ResultWrapper[PageRule]),
)
@typing_extensions.deprecated(
@@ -557,7 +554,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PageruleUpdateResponse]:
+ ) -> Optional[PageRule]:
"""Replaces the configuration of an existing Page Rule.
The configuration of the
@@ -609,9 +606,9 @@ async def update(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[PageruleUpdateResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[PageRule]]._unwrapper,
),
- cast_to=cast(Type[Optional[PageruleUpdateResponse]], ResultWrapper[PageruleUpdateResponse]),
+ cast_to=cast(Type[Optional[PageRule]], ResultWrapper[PageRule]),
)
@typing_extensions.deprecated(
@@ -743,7 +740,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PageruleEditResponse]:
+ ) -> Optional[PageRule]:
"""
Updates one or more fields of an existing Page Rule.
@@ -793,9 +790,9 @@ async def edit(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[PageruleEditResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[PageRule]]._unwrapper,
),
- cast_to=cast(Type[Optional[PageruleEditResponse]], ResultWrapper[PageruleEditResponse]),
+ cast_to=cast(Type[Optional[PageRule]], ResultWrapper[PageRule]),
)
@typing_extensions.deprecated(
@@ -812,7 +809,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[PageruleGetResponse]:
+ ) -> Optional[PageRule]:
"""
Fetches the details of a Page Rule.
@@ -840,9 +837,9 @@ async def get(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- post_parser=ResultWrapper[Optional[PageruleGetResponse]]._unwrapper,
+ post_parser=ResultWrapper[Optional[PageRule]]._unwrapper,
),
- cast_to=cast(Type[Optional[PageruleGetResponse]], ResultWrapper[PageruleGetResponse]),
+ cast_to=cast(Type[Optional[PageRule]], ResultWrapper[PageRule]),
)
diff --git a/src/cloudflare/types/hyperdrive/__init__.py b/src/cloudflare/types/hyperdrive/__init__.py
index cd9a5fbcadf..dea31023f50 100644
--- a/src/cloudflare/types/hyperdrive/__init__.py
+++ b/src/cloudflare/types/hyperdrive/__init__.py
@@ -2,11 +2,7 @@
from __future__ import annotations
+from .hyperdrive import Hyperdrive as Hyperdrive
from .config_edit_params import ConfigEditParams as ConfigEditParams
-from .config_get_response import ConfigGetResponse as ConfigGetResponse
from .config_create_params import ConfigCreateParams as ConfigCreateParams
-from .config_edit_response import ConfigEditResponse as ConfigEditResponse
-from .config_list_response import ConfigListResponse as ConfigListResponse
from .config_update_params import ConfigUpdateParams as ConfigUpdateParams
-from .config_create_response import ConfigCreateResponse as ConfigCreateResponse
-from .config_update_response import ConfigUpdateResponse as ConfigUpdateResponse
diff --git a/src/cloudflare/types/hyperdrive/config_create_response.py b/src/cloudflare/types/hyperdrive/config_create_response.py
deleted file mode 100644
index e97769ba973..00000000000
--- a/src/cloudflare/types/hyperdrive/config_create_response.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import Literal, TypeAlias
-
-from ..._models import BaseModel
-
-__all__ = [
- "ConfigCreateResponse",
- "Caching",
- "CachingHyperdriveHyperdriveCachingCommon",
- "CachingHyperdriveHyperdriveCachingEnabled",
- "Origin",
- "OriginPublicDatabase",
- "OriginAccessProtectedDatabaseBehindCloudflareTunnel",
-]
-
-
-class CachingHyperdriveHyperdriveCachingCommon(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
-
-class CachingHyperdriveHyperdriveCachingEnabled(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
- max_age: Optional[int] = None
- """When present, specifies max duration for which items should persist in the
- cache.
-
- Not returned if set to default. (Default: 60)
- """
-
- stale_while_revalidate: Optional[int] = None
- """
- When present, indicates the number of seconds cache may serve the response after
- it becomes stale. Not returned if set to default. (Default: 15)
- """
-
-
-Caching: TypeAlias = Union[CachingHyperdriveHyperdriveCachingCommon, CachingHyperdriveHyperdriveCachingEnabled]
-
-
-class OriginPublicDatabase(BaseModel):
- database: str
- """The name of your origin database."""
-
- host: str
- """The host (hostname or IP) of your origin database."""
-
- port: int
- """The port (default: 5432 for Postgres) of your origin database."""
-
- scheme: Literal["postgres", "postgresql"]
- """Specifies the URL scheme used to connect to your origin database."""
-
- user: str
- """The user of your origin database."""
-
-
-class OriginAccessProtectedDatabaseBehindCloudflareTunnel(BaseModel):
- access_client_id: str
- """The Client ID of the Access token to use when connecting to the origin database"""
-
- database: str
- """The name of your origin database."""
-
- host: str
- """The host (hostname or IP) of your origin database."""
-
- scheme: Literal["postgres", "postgresql"]
- """Specifies the URL scheme used to connect to your origin database."""
-
- user: str
- """The user of your origin database."""
-
-
-Origin: TypeAlias = Union[OriginPublicDatabase, OriginAccessProtectedDatabaseBehindCloudflareTunnel]
-
-
-class ConfigCreateResponse(BaseModel):
- caching: Caching
-
- id: Optional[str] = None
- """Identifier"""
-
- name: Optional[str] = None
-
- origin: Optional[Origin] = None
diff --git a/src/cloudflare/types/hyperdrive/config_edit_response.py b/src/cloudflare/types/hyperdrive/config_edit_response.py
deleted file mode 100644
index 06aa08ac84c..00000000000
--- a/src/cloudflare/types/hyperdrive/config_edit_response.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import Literal, TypeAlias
-
-from ..._models import BaseModel
-
-__all__ = [
- "ConfigEditResponse",
- "Caching",
- "CachingHyperdriveHyperdriveCachingCommon",
- "CachingHyperdriveHyperdriveCachingEnabled",
- "Origin",
- "OriginPublicDatabase",
- "OriginAccessProtectedDatabaseBehindCloudflareTunnel",
-]
-
-
-class CachingHyperdriveHyperdriveCachingCommon(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
-
-class CachingHyperdriveHyperdriveCachingEnabled(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
- max_age: Optional[int] = None
- """When present, specifies max duration for which items should persist in the
- cache.
-
- Not returned if set to default. (Default: 60)
- """
-
- stale_while_revalidate: Optional[int] = None
- """
- When present, indicates the number of seconds cache may serve the response after
- it becomes stale. Not returned if set to default. (Default: 15)
- """
-
-
-Caching: TypeAlias = Union[CachingHyperdriveHyperdriveCachingCommon, CachingHyperdriveHyperdriveCachingEnabled]
-
-
-class OriginPublicDatabase(BaseModel):
- database: str
- """The name of your origin database."""
-
- host: str
- """The host (hostname or IP) of your origin database."""
-
- port: int
- """The port (default: 5432 for Postgres) of your origin database."""
-
- scheme: Literal["postgres", "postgresql"]
- """Specifies the URL scheme used to connect to your origin database."""
-
- user: str
- """The user of your origin database."""
-
-
-class OriginAccessProtectedDatabaseBehindCloudflareTunnel(BaseModel):
- access_client_id: str
- """The Client ID of the Access token to use when connecting to the origin database"""
-
- database: str
- """The name of your origin database."""
-
- host: str
- """The host (hostname or IP) of your origin database."""
-
- scheme: Literal["postgres", "postgresql"]
- """Specifies the URL scheme used to connect to your origin database."""
-
- user: str
- """The user of your origin database."""
-
-
-Origin: TypeAlias = Union[OriginPublicDatabase, OriginAccessProtectedDatabaseBehindCloudflareTunnel]
-
-
-class ConfigEditResponse(BaseModel):
- caching: Caching
-
- id: Optional[str] = None
- """Identifier"""
-
- name: Optional[str] = None
-
- origin: Optional[Origin] = None
diff --git a/src/cloudflare/types/hyperdrive/config_list_response.py b/src/cloudflare/types/hyperdrive/config_list_response.py
deleted file mode 100644
index 1afa90ef0fd..00000000000
--- a/src/cloudflare/types/hyperdrive/config_list_response.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import Literal, TypeAlias
-
-from ..._models import BaseModel
-
-__all__ = [
- "ConfigListResponse",
- "Caching",
- "CachingHyperdriveHyperdriveCachingCommon",
- "CachingHyperdriveHyperdriveCachingEnabled",
- "Origin",
- "OriginPublicDatabase",
- "OriginAccessProtectedDatabaseBehindCloudflareTunnel",
-]
-
-
-class CachingHyperdriveHyperdriveCachingCommon(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
-
-class CachingHyperdriveHyperdriveCachingEnabled(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
- max_age: Optional[int] = None
- """When present, specifies max duration for which items should persist in the
- cache.
-
- Not returned if set to default. (Default: 60)
- """
-
- stale_while_revalidate: Optional[int] = None
- """
- When present, indicates the number of seconds cache may serve the response after
- it becomes stale. Not returned if set to default. (Default: 15)
- """
-
-
-Caching: TypeAlias = Union[CachingHyperdriveHyperdriveCachingCommon, CachingHyperdriveHyperdriveCachingEnabled]
-
-
-class OriginPublicDatabase(BaseModel):
- database: str
- """The name of your origin database."""
-
- host: str
- """The host (hostname or IP) of your origin database."""
-
- port: int
- """The port (default: 5432 for Postgres) of your origin database."""
-
- scheme: Literal["postgres", "postgresql"]
- """Specifies the URL scheme used to connect to your origin database."""
-
- user: str
- """The user of your origin database."""
-
-
-class OriginAccessProtectedDatabaseBehindCloudflareTunnel(BaseModel):
- access_client_id: str
- """The Client ID of the Access token to use when connecting to the origin database"""
-
- database: str
- """The name of your origin database."""
-
- host: str
- """The host (hostname or IP) of your origin database."""
-
- scheme: Literal["postgres", "postgresql"]
- """Specifies the URL scheme used to connect to your origin database."""
-
- user: str
- """The user of your origin database."""
-
-
-Origin: TypeAlias = Union[OriginPublicDatabase, OriginAccessProtectedDatabaseBehindCloudflareTunnel]
-
-
-class ConfigListResponse(BaseModel):
- caching: Caching
-
- id: Optional[str] = None
- """Identifier"""
-
- name: Optional[str] = None
-
- origin: Optional[Origin] = None
diff --git a/src/cloudflare/types/hyperdrive/config_update_response.py b/src/cloudflare/types/hyperdrive/config_update_response.py
deleted file mode 100644
index df63e8bb5e8..00000000000
--- a/src/cloudflare/types/hyperdrive/config_update_response.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import Literal, TypeAlias
-
-from ..._models import BaseModel
-
-__all__ = [
- "ConfigUpdateResponse",
- "Caching",
- "CachingHyperdriveHyperdriveCachingCommon",
- "CachingHyperdriveHyperdriveCachingEnabled",
- "Origin",
- "OriginPublicDatabase",
- "OriginAccessProtectedDatabaseBehindCloudflareTunnel",
-]
-
-
-class CachingHyperdriveHyperdriveCachingCommon(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
-
-class CachingHyperdriveHyperdriveCachingEnabled(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
- max_age: Optional[int] = None
- """When present, specifies max duration for which items should persist in the
- cache.
-
- Not returned if set to default. (Default: 60)
- """
-
- stale_while_revalidate: Optional[int] = None
- """
- When present, indicates the number of seconds cache may serve the response after
- it becomes stale. Not returned if set to default. (Default: 15)
- """
-
-
-Caching: TypeAlias = Union[CachingHyperdriveHyperdriveCachingCommon, CachingHyperdriveHyperdriveCachingEnabled]
-
-
-class OriginPublicDatabase(BaseModel):
- database: str
- """The name of your origin database."""
-
- host: str
- """The host (hostname or IP) of your origin database."""
-
- port: int
- """The port (default: 5432 for Postgres) of your origin database."""
-
- scheme: Literal["postgres", "postgresql"]
- """Specifies the URL scheme used to connect to your origin database."""
-
- user: str
- """The user of your origin database."""
-
-
-class OriginAccessProtectedDatabaseBehindCloudflareTunnel(BaseModel):
- access_client_id: str
- """The Client ID of the Access token to use when connecting to the origin database"""
-
- database: str
- """The name of your origin database."""
-
- host: str
- """The host (hostname or IP) of your origin database."""
-
- scheme: Literal["postgres", "postgresql"]
- """Specifies the URL scheme used to connect to your origin database."""
-
- user: str
- """The user of your origin database."""
-
-
-Origin: TypeAlias = Union[OriginPublicDatabase, OriginAccessProtectedDatabaseBehindCloudflareTunnel]
-
-
-class ConfigUpdateResponse(BaseModel):
- caching: Caching
-
- id: Optional[str] = None
- """Identifier"""
-
- name: Optional[str] = None
-
- origin: Optional[Origin] = None
diff --git a/src/cloudflare/types/hyperdrive/config_get_response.py b/src/cloudflare/types/hyperdrive/hyperdrive.py
similarity index 93%
rename from src/cloudflare/types/hyperdrive/config_get_response.py
rename to src/cloudflare/types/hyperdrive/hyperdrive.py
index 5153898a395..e04be08fbcb 100644
--- a/src/cloudflare/types/hyperdrive/config_get_response.py
+++ b/src/cloudflare/types/hyperdrive/hyperdrive.py
@@ -6,42 +6,16 @@
from ..._models import BaseModel
__all__ = [
- "ConfigGetResponse",
- "Caching",
- "CachingHyperdriveHyperdriveCachingCommon",
- "CachingHyperdriveHyperdriveCachingEnabled",
+ "Hyperdrive",
"Origin",
"OriginPublicDatabase",
"OriginAccessProtectedDatabaseBehindCloudflareTunnel",
+ "Caching",
+ "CachingHyperdriveHyperdriveCachingCommon",
+ "CachingHyperdriveHyperdriveCachingEnabled",
]
-class CachingHyperdriveHyperdriveCachingCommon(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
-
-class CachingHyperdriveHyperdriveCachingEnabled(BaseModel):
- disabled: Optional[bool] = None
- """When set to true, disables the caching of SQL responses. (Default: false)"""
-
- max_age: Optional[int] = None
- """When present, specifies max duration for which items should persist in the
- cache.
-
- Not returned if set to default. (Default: 60)
- """
-
- stale_while_revalidate: Optional[int] = None
- """
- When present, indicates the number of seconds cache may serve the response after
- it becomes stale. Not returned if set to default. (Default: 15)
- """
-
-
-Caching: TypeAlias = Union[CachingHyperdriveHyperdriveCachingCommon, CachingHyperdriveHyperdriveCachingEnabled]
-
-
class OriginPublicDatabase(BaseModel):
database: str
"""The name of your origin database."""
@@ -79,12 +53,38 @@ class OriginAccessProtectedDatabaseBehindCloudflareTunnel(BaseModel):
Origin: TypeAlias = Union[OriginPublicDatabase, OriginAccessProtectedDatabaseBehindCloudflareTunnel]
-class ConfigGetResponse(BaseModel):
- caching: Caching
+class CachingHyperdriveHyperdriveCachingCommon(BaseModel):
+ disabled: Optional[bool] = None
+ """When set to true, disables the caching of SQL responses. (Default: false)"""
+
+
+class CachingHyperdriveHyperdriveCachingEnabled(BaseModel):
+ disabled: Optional[bool] = None
+ """When set to true, disables the caching of SQL responses. (Default: false)"""
+
+ max_age: Optional[int] = None
+ """When present, specifies max duration for which items should persist in the
+ cache.
- id: Optional[str] = None
+ Not returned if set to default. (Default: 60)
+ """
+
+ stale_while_revalidate: Optional[int] = None
+ """
+ When present, indicates the number of seconds cache may serve the response after
+ it becomes stale. Not returned if set to default. (Default: 15)
+ """
+
+
+Caching: TypeAlias = Union[CachingHyperdriveHyperdriveCachingCommon, CachingHyperdriveHyperdriveCachingEnabled]
+
+
+class Hyperdrive(BaseModel):
+ id: str
"""Identifier"""
- name: Optional[str] = None
+ name: str
+
+ origin: Origin
- origin: Optional[Origin] = None
+ caching: Optional[Caching] = None
diff --git a/src/cloudflare/types/pagerules/__init__.py b/src/cloudflare/types/pagerules/__init__.py
index 7856ec5f384..067b2828771 100644
--- a/src/cloudflare/types/pagerules/__init__.py
+++ b/src/cloudflare/types/pagerules/__init__.py
@@ -3,15 +3,12 @@
from __future__ import annotations
from .target import Target as Target
+from .page_rule import PageRule as PageRule
from .target_param import TargetParam as TargetParam
from .pagerule_edit_params import PageruleEditParams as PageruleEditParams
from .pagerule_list_params import PageruleListParams as PageruleListParams
-from .pagerule_get_response import PageruleGetResponse as PageruleGetResponse
from .setting_list_response import SettingListResponse as SettingListResponse
from .pagerule_create_params import PageruleCreateParams as PageruleCreateParams
-from .pagerule_edit_response import PageruleEditResponse as PageruleEditResponse
from .pagerule_list_response import PageruleListResponse as PageruleListResponse
from .pagerule_update_params import PageruleUpdateParams as PageruleUpdateParams
-from .pagerule_create_response import PageruleCreateResponse as PageruleCreateResponse
from .pagerule_delete_response import PageruleDeleteResponse as PageruleDeleteResponse
-from .pagerule_update_response import PageruleUpdateResponse as PageruleUpdateResponse
diff --git a/src/cloudflare/types/pagerules/pagerule_get_response.py b/src/cloudflare/types/pagerules/page_rule.py
similarity index 95%
rename from src/cloudflare/types/pagerules/pagerule_get_response.py
rename to src/cloudflare/types/pagerules/page_rule.py
index 824d0a67a53..198378298e6 100644
--- a/src/cloudflare/types/pagerules/pagerule_get_response.py
+++ b/src/cloudflare/types/pagerules/page_rule.py
@@ -7,7 +7,7 @@
from .target import Target
from ..._models import BaseModel
-__all__ = ["PageruleGetResponse", "Action", "ActionValue"]
+__all__ = ["PageRule", "Action", "ActionValue"]
class ActionValue(BaseModel):
@@ -35,7 +35,7 @@ class Action(BaseModel):
value: Optional[ActionValue] = None
-class PageruleGetResponse(BaseModel):
+class PageRule(BaseModel):
id: str
"""Identifier"""
diff --git a/src/cloudflare/types/pagerules/pagerule_create_response.py b/src/cloudflare/types/pagerules/pagerule_create_response.py
deleted file mode 100644
index e7b0113723e..00000000000
--- a/src/cloudflare/types/pagerules/pagerule_create_response.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from .target import Target
-from ..._models import BaseModel
-
-__all__ = ["PageruleCreateResponse", "Action", "ActionValue"]
-
-
-class ActionValue(BaseModel):
- status_code: Optional[Literal[301, 302]] = None
- """The status code to use for the URL redirect.
-
- 301 is a permanent redirect. 302 is a temporary redirect.
- """
-
- url: Optional[str] = None
- """
- The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
- in the constraint value.
- """
-
-
-class Action(BaseModel):
- id: Optional[Literal["forwarding_url"]] = None
- """Redirects one URL to another using an `HTTP 301/302` redirect.
-
- Refer to
- [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
- """
-
- value: Optional[ActionValue] = None
-
-
-class PageruleCreateResponse(BaseModel):
- id: str
- """Identifier"""
-
- actions: List[Action]
- """The set of actions to perform if the targets of this rule match the request.
-
- Actions can redirect to another URL or override settings, but not both.
- """
-
- created_on: datetime
- """The timestamp of when the Page Rule was created."""
-
- modified_on: datetime
- """The timestamp of when the Page Rule was last modified."""
-
- priority: int
- """
- The priority of the rule, used to define which Page Rule is processed over
- another. A higher number indicates a higher priority. For example, if you have a
- catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
- take precedence (rule B: `/images/special/*`), specify a higher priority for
- rule B so it overrides rule A.
- """
-
- status: Literal["active", "disabled"]
- """The status of the Page Rule."""
-
- targets: List[Target]
- """The rule targets to evaluate on each request."""
diff --git a/src/cloudflare/types/pagerules/pagerule_edit_response.py b/src/cloudflare/types/pagerules/pagerule_edit_response.py
deleted file mode 100644
index dec016eb431..00000000000
--- a/src/cloudflare/types/pagerules/pagerule_edit_response.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from .target import Target
-from ..._models import BaseModel
-
-__all__ = ["PageruleEditResponse", "Action", "ActionValue"]
-
-
-class ActionValue(BaseModel):
- status_code: Optional[Literal[301, 302]] = None
- """The status code to use for the URL redirect.
-
- 301 is a permanent redirect. 302 is a temporary redirect.
- """
-
- url: Optional[str] = None
- """
- The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
- in the constraint value.
- """
-
-
-class Action(BaseModel):
- id: Optional[Literal["forwarding_url"]] = None
- """Redirects one URL to another using an `HTTP 301/302` redirect.
-
- Refer to
- [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
- """
-
- value: Optional[ActionValue] = None
-
-
-class PageruleEditResponse(BaseModel):
- id: str
- """Identifier"""
-
- actions: List[Action]
- """The set of actions to perform if the targets of this rule match the request.
-
- Actions can redirect to another URL or override settings, but not both.
- """
-
- created_on: datetime
- """The timestamp of when the Page Rule was created."""
-
- modified_on: datetime
- """The timestamp of when the Page Rule was last modified."""
-
- priority: int
- """
- The priority of the rule, used to define which Page Rule is processed over
- another. A higher number indicates a higher priority. For example, if you have a
- catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
- take precedence (rule B: `/images/special/*`), specify a higher priority for
- rule B so it overrides rule A.
- """
-
- status: Literal["active", "disabled"]
- """The status of the Page Rule."""
-
- targets: List[Target]
- """The rule targets to evaluate on each request."""
diff --git a/src/cloudflare/types/pagerules/pagerule_list_response.py b/src/cloudflare/types/pagerules/pagerule_list_response.py
index 10d4b3c6022..b2992e28bbd 100644
--- a/src/cloudflare/types/pagerules/pagerule_list_response.py
+++ b/src/cloudflare/types/pagerules/pagerule_list_response.py
@@ -1,75 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
-from datetime import datetime
-from typing_extensions import Literal, TypeAlias
+from typing import List
+from typing_extensions import TypeAlias
-from .target import Target
-from ..._models import BaseModel
+from .page_rule import PageRule
-__all__ = [
- "PageruleListResponse",
- "PageruleListResponseItem",
- "PageruleListResponseItemAction",
- "PageruleListResponseItemActionValue",
-]
+__all__ = ["PageruleListResponse"]
-
-class PageruleListResponseItemActionValue(BaseModel):
- status_code: Optional[Literal[301, 302]] = None
- """The status code to use for the URL redirect.
-
- 301 is a permanent redirect. 302 is a temporary redirect.
- """
-
- url: Optional[str] = None
- """
- The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
- in the constraint value.
- """
-
-
-class PageruleListResponseItemAction(BaseModel):
- id: Optional[Literal["forwarding_url"]] = None
- """Redirects one URL to another using an `HTTP 301/302` redirect.
-
- Refer to
- [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
- """
-
- value: Optional[PageruleListResponseItemActionValue] = None
-
-
-class PageruleListResponseItem(BaseModel):
- id: str
- """Identifier"""
-
- actions: List[PageruleListResponseItemAction]
- """The set of actions to perform if the targets of this rule match the request.
-
- Actions can redirect to another URL or override settings, but not both.
- """
-
- created_on: datetime
- """The timestamp of when the Page Rule was created."""
-
- modified_on: datetime
- """The timestamp of when the Page Rule was last modified."""
-
- priority: int
- """
- The priority of the rule, used to define which Page Rule is processed over
- another. A higher number indicates a higher priority. For example, if you have a
- catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
- take precedence (rule B: `/images/special/*`), specify a higher priority for
- rule B so it overrides rule A.
- """
-
- status: Literal["active", "disabled"]
- """The status of the Page Rule."""
-
- targets: List[Target]
- """The rule targets to evaluate on each request."""
-
-
-PageruleListResponse: TypeAlias = List[PageruleListResponseItem]
+PageruleListResponse: TypeAlias = List[PageRule]
diff --git a/src/cloudflare/types/pagerules/pagerule_update_response.py b/src/cloudflare/types/pagerules/pagerule_update_response.py
deleted file mode 100644
index 722f9819346..00000000000
--- a/src/cloudflare/types/pagerules/pagerule_update_response.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from datetime import datetime
-from typing_extensions import Literal
-
-from .target import Target
-from ..._models import BaseModel
-
-__all__ = ["PageruleUpdateResponse", "Action", "ActionValue"]
-
-
-class ActionValue(BaseModel):
- status_code: Optional[Literal[301, 302]] = None
- """The status code to use for the URL redirect.
-
- 301 is a permanent redirect. 302 is a temporary redirect.
- """
-
- url: Optional[str] = None
- """
- The URL to redirect the request to. Notes: ${num} refers to the position of '\\**'
- in the constraint value.
- """
-
-
-class Action(BaseModel):
- id: Optional[Literal["forwarding_url"]] = None
- """Redirects one URL to another using an `HTTP 301/302` redirect.
-
- Refer to
- [Wildcard matching and referencing](https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/).
- """
-
- value: Optional[ActionValue] = None
-
-
-class PageruleUpdateResponse(BaseModel):
- id: str
- """Identifier"""
-
- actions: List[Action]
- """The set of actions to perform if the targets of this rule match the request.
-
- Actions can redirect to another URL or override settings, but not both.
- """
-
- created_on: datetime
- """The timestamp of when the Page Rule was created."""
-
- modified_on: datetime
- """The timestamp of when the Page Rule was last modified."""
-
- priority: int
- """
- The priority of the rule, used to define which Page Rule is processed over
- another. A higher number indicates a higher priority. For example, if you have a
- catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
- take precedence (rule B: `/images/special/*`), specify a higher priority for
- rule B so it overrides rule A.
- """
-
- status: Literal["active", "disabled"]
- """The status of the Page Rule."""
-
- targets: List[Target]
- """The rule targets to evaluate on each request."""
diff --git a/src/cloudflare/types/pagerules/target.py b/src/cloudflare/types/pagerules/target.py
index 497c176cb88..f15c3acef68 100644
--- a/src/cloudflare/types/pagerules/target.py
+++ b/src/cloudflare/types/pagerules/target.py
@@ -1,6 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Optional
from typing_extensions import Literal
from ..._models import BaseModel
@@ -22,8 +21,8 @@ class Constraint(BaseModel):
class Target(BaseModel):
- constraint: Optional[Constraint] = None
+ constraint: Constraint
"""String constraint."""
- target: Optional[Literal["url"]] = None
+ target: Literal["url"]
"""A target based on the URL of the request."""
diff --git a/src/cloudflare/types/pagerules/target_param.py b/src/cloudflare/types/pagerules/target_param.py
index 9d6e179693e..2977b64466f 100644
--- a/src/cloudflare/types/pagerules/target_param.py
+++ b/src/cloudflare/types/pagerules/target_param.py
@@ -21,8 +21,8 @@ class Constraint(TypedDict, total=False):
class TargetParam(TypedDict, total=False):
- constraint: Constraint
+ constraint: Required[Constraint]
"""String constraint."""
- target: Literal["url"]
+ target: Required[Literal["url"]]
"""A target based on the URL of the request."""
diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py
index ff8cebe0702..78c494c37c2 100644
--- a/tests/api_resources/hyperdrive/test_configs.py
+++ b/tests/api_resources/hyperdrive/test_configs.py
@@ -10,13 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.hyperdrive import (
- ConfigGetResponse,
- ConfigEditResponse,
- ConfigListResponse,
- ConfigCreateResponse,
- ConfigUpdateResponse,
-)
+from cloudflare.types.hyperdrive import Hyperdrive
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -39,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None:
"user": "postgres",
},
)
- assert_matches_type(ConfigCreateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -57,7 +51,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
},
caching={"disabled": True},
)
- assert_matches_type(ConfigCreateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -78,7 +72,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"
config = response.parse()
- assert_matches_type(ConfigCreateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -99,7 +93,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = response.parse()
- assert_matches_type(ConfigCreateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -136,7 +130,7 @@ def test_method_update(self, client: Cloudflare) -> None:
"user": "postgres",
},
)
- assert_matches_type(ConfigUpdateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -155,7 +149,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
},
caching={"disabled": True},
)
- assert_matches_type(ConfigUpdateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -177,7 +171,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"
config = response.parse()
- assert_matches_type(ConfigUpdateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -199,7 +193,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = response.parse()
- assert_matches_type(ConfigUpdateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -241,7 +235,7 @@ def test_method_list(self, client: Cloudflare) -> None:
config = client.hyperdrive.configs.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncSinglePage[ConfigListResponse], config, path=["response"])
+ assert_matches_type(SyncSinglePage[Hyperdrive], config, path=["response"])
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
@@ -252,7 +246,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"
config = response.parse()
- assert_matches_type(SyncSinglePage[ConfigListResponse], config, path=["response"])
+ assert_matches_type(SyncSinglePage[Hyperdrive], config, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
@@ -263,7 +257,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = response.parse()
- assert_matches_type(SyncSinglePage[ConfigListResponse], config, path=["response"])
+ assert_matches_type(SyncSinglePage[Hyperdrive], config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -329,7 +323,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ConfigEditResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -346,7 +340,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
"user": "postgres",
},
)
- assert_matches_type(ConfigEditResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -359,7 +353,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = response.parse()
- assert_matches_type(ConfigEditResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -372,7 +366,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = response.parse()
- assert_matches_type(ConfigEditResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -397,7 +391,7 @@ def test_method_get(self, client: Cloudflare) -> None:
hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ConfigGetResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -409,7 +403,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"
config = response.parse()
- assert_matches_type(ConfigGetResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
@@ -421,7 +415,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = response.parse()
- assert_matches_type(ConfigGetResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -458,7 +452,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
"user": "postgres",
},
)
- assert_matches_type(ConfigCreateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -476,7 +470,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
},
caching={"disabled": True},
)
- assert_matches_type(ConfigCreateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -497,7 +491,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"
config = await response.parse()
- assert_matches_type(ConfigCreateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -518,7 +512,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = await response.parse()
- assert_matches_type(ConfigCreateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -555,7 +549,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
"user": "postgres",
},
)
- assert_matches_type(ConfigUpdateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -574,7 +568,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
},
caching={"disabled": True},
)
- assert_matches_type(ConfigUpdateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -596,7 +590,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"
config = await response.parse()
- assert_matches_type(ConfigUpdateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -618,7 +612,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = await response.parse()
- assert_matches_type(ConfigUpdateResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -660,7 +654,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
config = await async_client.hyperdrive.configs.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncSinglePage[ConfigListResponse], config, path=["response"])
+ assert_matches_type(AsyncSinglePage[Hyperdrive], config, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -671,7 +665,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"
config = await response.parse()
- assert_matches_type(AsyncSinglePage[ConfigListResponse], config, path=["response"])
+ assert_matches_type(AsyncSinglePage[Hyperdrive], config, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
@@ -682,7 +676,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = await response.parse()
- assert_matches_type(AsyncSinglePage[ConfigListResponse], config, path=["response"])
+ assert_matches_type(AsyncSinglePage[Hyperdrive], config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -748,7 +742,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ConfigEditResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -765,7 +759,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
"user": "postgres",
},
)
- assert_matches_type(ConfigEditResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -778,7 +772,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = await response.parse()
- assert_matches_type(ConfigEditResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@pytest.mark.skip(reason="TODO: investigate broken test")
@parametrize
@@ -791,7 +785,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = await response.parse()
- assert_matches_type(ConfigEditResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -816,7 +810,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(ConfigGetResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -828,7 +822,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"
config = await response.parse()
- assert_matches_type(ConfigGetResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -840,7 +834,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
config = await response.parse()
- assert_matches_type(ConfigGetResponse, config, path=["response"])
+ assert_matches_type(Hyperdrive, config, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_pagerules.py b/tests/api_resources/test_pagerules.py
index ebe84e62cde..7759cea316d 100644
--- a/tests/api_resources/test_pagerules.py
+++ b/tests/api_resources/test_pagerules.py
@@ -10,12 +10,9 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.types.pagerules import (
- PageruleGetResponse,
- PageruleEditResponse,
+ PageRule,
PageruleListResponse,
- PageruleCreateResponse,
PageruleDeleteResponse,
- PageruleUpdateResponse,
)
# pyright: reportDeprecated=false
@@ -43,7 +40,7 @@ def test_method_create(self, client: Cloudflare) -> None:
],
)
- assert_matches_type(Optional[PageruleCreateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@@ -72,7 +69,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
status="active",
)
- assert_matches_type(Optional[PageruleCreateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
@@ -94,7 +91,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"
pagerule = response.parse()
- assert_matches_type(Optional[PageruleCreateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
@@ -116,7 +113,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = response.parse()
- assert_matches_type(Optional[PageruleCreateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -156,7 +153,7 @@ def test_method_update(self, client: Cloudflare) -> None:
],
)
- assert_matches_type(Optional[PageruleUpdateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
@@ -186,7 +183,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
status="active",
)
- assert_matches_type(Optional[PageruleUpdateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
@@ -209,7 +206,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"
pagerule = response.parse()
- assert_matches_type(Optional[PageruleUpdateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
@@ -232,7 +229,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = response.parse()
- assert_matches_type(Optional[PageruleUpdateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -388,7 +385,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[PageruleEditResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
@@ -418,7 +415,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
],
)
- assert_matches_type(Optional[PageruleEditResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
@@ -431,7 +428,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = response.parse()
- assert_matches_type(Optional[PageruleEditResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
@@ -444,7 +441,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = response.parse()
- assert_matches_type(Optional[PageruleEditResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -471,7 +468,7 @@ def test_method_get(self, client: Cloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[PageruleGetResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
@@ -484,7 +481,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"
pagerule = response.parse()
- assert_matches_type(Optional[PageruleGetResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
@@ -497,7 +494,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = response.parse()
- assert_matches_type(Optional[PageruleGetResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -537,7 +534,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
],
)
- assert_matches_type(Optional[PageruleCreateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -566,7 +563,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
status="active",
)
- assert_matches_type(Optional[PageruleCreateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@@ -588,7 +585,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"
pagerule = await response.parse()
- assert_matches_type(Optional[PageruleCreateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
@@ -610,7 +607,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = await response.parse()
- assert_matches_type(Optional[PageruleCreateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -650,7 +647,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
],
)
- assert_matches_type(Optional[PageruleUpdateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -680,7 +677,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
status="active",
)
- assert_matches_type(Optional[PageruleUpdateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@@ -703,7 +700,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"
pagerule = await response.parse()
- assert_matches_type(Optional[PageruleUpdateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
@@ -726,7 +723,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = await response.parse()
- assert_matches_type(Optional[PageruleUpdateResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -882,7 +879,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[PageruleEditResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
@@ -912,7 +909,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
],
)
- assert_matches_type(Optional[PageruleEditResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
@@ -925,7 +922,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = await response.parse()
- assert_matches_type(Optional[PageruleEditResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
@@ -938,7 +935,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = await response.parse()
- assert_matches_type(Optional[PageruleEditResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -965,7 +962,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[PageruleGetResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -978,7 +975,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"
pagerule = await response.parse()
- assert_matches_type(Optional[PageruleGetResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
@@ -991,7 +988,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
pagerule = await response.parse()
- assert_matches_type(Optional[PageruleGetResponse], pagerule, path=["response"])
+ assert_matches_type(Optional[PageRule], pagerule, path=["response"])
assert cast(Any, response.is_closed) is True