diff --git a/api.md b/api.md index 6a87d7e1546..464b9ea8469 100644 --- a/api.md +++ b/api.md @@ -2684,7 +2684,7 @@ Types: ```python from cloudflare.types.api_gateway import ( - APIShieldOperation, + APIShieldOperationModel, OperationCreateResponse, OperationListResponse, OperationDeleteResponse, diff --git a/src/cloudflare/resources/api_gateway/operations/operations.py b/src/cloudflare/resources/api_gateway/operations/operations.py index 5ac50872179..0d9e5937f2c 100644 --- a/src/cloudflare/resources/api_gateway/operations/operations.py +++ b/src/cloudflare/resources/api_gateway/operations/operations.py @@ -36,8 +36,8 @@ from ....types.api_gateway.operation_list_response import OperationListResponse from ....types.api_gateway.operation_create_response import OperationCreateResponse from ....types.api_gateway.operation_delete_response import OperationDeleteResponse -from ....types.api_gateway.api_shield_operation_param import APIShieldOperationParam from ....types.api_gateway.operation_bulk_delete_response import OperationBulkDeleteResponse +from ....types.api_gateway.api_shield_operation_model_param import APIShieldOperationModelParam __all__ = ["OperationsResource", "AsyncOperationsResource"] @@ -70,7 +70,7 @@ def create( self, *, zone_id: str, - body: Iterable[APIShieldOperationParam], + body: Iterable[APIShieldOperationModelParam], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -101,7 +101,7 @@ def create( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._post( f"/zones/{zone_id}/api_gateway/operations", - body=maybe_transform(body, Iterable[APIShieldOperationParam]), + body=maybe_transform(body, Iterable[APIShieldOperationModelParam]), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -345,7 +345,7 @@ async def create( self, *, zone_id: str, - body: Iterable[APIShieldOperationParam], + body: Iterable[APIShieldOperationModelParam], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -376,7 +376,7 @@ async def create( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return await self._post( f"/zones/{zone_id}/api_gateway/operations", - body=await async_maybe_transform(body, Iterable[APIShieldOperationParam]), + body=await async_maybe_transform(body, Iterable[APIShieldOperationModelParam]), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/cloudflare/types/api_gateway/__init__.py b/src/cloudflare/types/api_gateway/__init__.py index a4f7ec8c544..985abf7c325 100644 --- a/src/cloudflare/types/api_gateway/__init__.py +++ b/src/cloudflare/types/api_gateway/__init__.py @@ -8,7 +8,6 @@ from .public_schema import PublicSchema as PublicSchema from .schema_upload import SchemaUpload as SchemaUpload from .schema_list_params import SchemaListParams as SchemaListParams -from .api_shield_operation import APIShieldOperation as APIShieldOperation from .operation_get_params import OperationGetParams as OperationGetParams from .schema_list_response import SchemaListResponse as SchemaListResponse from .operation_list_params import OperationListParams as OperationListParams @@ -23,8 +22,9 @@ from .operation_create_response import OperationCreateResponse as OperationCreateResponse from .operation_delete_response import OperationDeleteResponse as OperationDeleteResponse from .user_schema_create_params import UserSchemaCreateParams as UserSchemaCreateParams -from .api_shield_operation_param import APIShieldOperationParam as APIShieldOperationParam +from .api_shield_operation_model import APIShieldOperationModel as APIShieldOperationModel from .configuration_update_params import ConfigurationUpdateParams as ConfigurationUpdateParams from .user_schema_delete_response import UserSchemaDeleteResponse as UserSchemaDeleteResponse from .configuration_update_response import ConfigurationUpdateResponse as ConfigurationUpdateResponse from .operation_bulk_delete_response import OperationBulkDeleteResponse as OperationBulkDeleteResponse +from .api_shield_operation_model_param import APIShieldOperationModelParam as APIShieldOperationModelParam diff --git a/src/cloudflare/types/api_gateway/api_shield_operation.py b/src/cloudflare/types/api_gateway/api_shield_operation_model.py similarity index 89% rename from src/cloudflare/types/api_gateway/api_shield_operation.py rename to src/cloudflare/types/api_gateway/api_shield_operation_model.py index a7c1e2c4011..3377aab9349 100644 --- a/src/cloudflare/types/api_gateway/api_shield_operation.py +++ b/src/cloudflare/types/api_gateway/api_shield_operation_model.py @@ -4,10 +4,10 @@ from ..._models import BaseModel -__all__ = ["APIShieldOperation"] +__all__ = ["APIShieldOperationModel"] -class APIShieldOperation(BaseModel): +class APIShieldOperationModel(BaseModel): endpoint: str """ The endpoint which can contain path parameter templates in curly braces, each diff --git a/src/cloudflare/types/api_gateway/api_shield_operation_param.py b/src/cloudflare/types/api_gateway/api_shield_operation_model_param.py similarity index 88% rename from src/cloudflare/types/api_gateway/api_shield_operation_param.py rename to src/cloudflare/types/api_gateway/api_shield_operation_model_param.py index 5124aa6963f..39e8a0870b2 100644 --- a/src/cloudflare/types/api_gateway/api_shield_operation_param.py +++ b/src/cloudflare/types/api_gateway/api_shield_operation_model_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["APIShieldOperationParam"] +__all__ = ["APIShieldOperationModelParam"] -class APIShieldOperationParam(TypedDict, total=False): +class APIShieldOperationModelParam(TypedDict, total=False): endpoint: Required[str] """ The endpoint which can contain path parameter templates in curly braces, each diff --git a/src/cloudflare/types/api_gateway/operation_create_params.py b/src/cloudflare/types/api_gateway/operation_create_params.py index 6a76b839b6f..6b6f8446491 100644 --- a/src/cloudflare/types/api_gateway/operation_create_params.py +++ b/src/cloudflare/types/api_gateway/operation_create_params.py @@ -5,7 +5,7 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .api_shield_operation_param import APIShieldOperationParam +from .api_shield_operation_model_param import APIShieldOperationModelParam __all__ = ["OperationCreateParams"] @@ -14,4 +14,4 @@ class OperationCreateParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - body: Required[Iterable[APIShieldOperationParam]] + body: Required[Iterable[APIShieldOperationModelParam]] diff --git a/src/cloudflare/types/api_gateway/user_schemas/operation_list_response.py b/src/cloudflare/types/api_gateway/user_schemas/operation_list_response.py index fa984a5b255..da75807ea53 100644 --- a/src/cloudflare/types/api_gateway/user_schemas/operation_list_response.py +++ b/src/cloudflare/types/api_gateway/user_schemas/operation_list_response.py @@ -4,8 +4,8 @@ from datetime import datetime from typing_extensions import Literal, TypeAlias -from .. import api_shield_operation from ...._models import BaseModel +from ..api_shield_operation_model import APIShieldOperationModel __all__ = [ "OperationListResponse", @@ -233,4 +233,4 @@ class APIShieldOperation(BaseModel): features: Optional[APIShieldOperationFeatures] = None -OperationListResponse: TypeAlias = Union[APIShieldOperation, api_shield_operation.APIShieldOperation] +OperationListResponse: TypeAlias = Union[APIShieldOperation, APIShieldOperationModel]