From 6044979e83070b4e5393f824212e7c5989bd482a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 03:22:36 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#291) --- .../intel/attack_surface_report/issues.py | 136 +++++++++--------- .../resources/rulesets/phases/phases.py | 6 +- src/cloudflare/resources/rulesets/rulesets.py | 10 +- src/cloudflare/types/configuration.py | 19 ++- src/cloudflare/types/configuration_param.py | 19 ++- src/cloudflare/types/hyperdrive/hyperdrive.py | 28 +++- .../intel/attack_surface_report/__init__.py | 8 +- .../attack_surface_report/issue_class.py | 6 - .../issue_class_param.py | 11 ++ .../issue_class_params.py | 24 ++-- .../issue_list_params.py | 24 ++-- .../issue_severity_params.py | 24 ++-- .../intel/attack_surface_report/issue_type.py | 9 -- .../attack_surface_report/issue_type_param.py | 22 +++ .../issue_type_params.py | 24 ++-- .../intel/attack_surface_report/product.py | 6 - .../attack_surface_report/product_param.py | 11 ++ .../intel/attack_surface_report/subject.py | 6 - .../attack_surface_report/subject_param.py | 11 ++ .../types/magic_transit/__init__.py | 2 + .../types/magic_transit/colo_name.py | 3 +- .../types/magic_transit/colo_name_param.py | 11 ++ .../types/magic_transit/colo_region.py | 3 +- .../types/magic_transit/colo_region_param.py | 11 ++ src/cloudflare/types/magic_transit/scope.py | 6 +- .../types/magic_transit/scope_param.py | 9 +- src/cloudflare/types/request_rule_param.py | 8 +- src/cloudflare/types/respone_rule.py | 8 +- src/cloudflare/types/ruleset_create_params.py | 3 +- .../types/ruleset_create_response.py | 4 +- src/cloudflare/types/ruleset_get_response.py | 4 +- src/cloudflare/types/ruleset_update_params.py | 3 +- .../types/ruleset_update_response.py | 4 +- .../types/rulesets/phase_get_response.py | 4 +- .../types/rulesets/phase_update_params.py | 3 +- .../types/rulesets/phase_update_response.py | 4 +- .../rulesets/phases/version_get_response.py | 4 +- .../types/rulesets/rule_create_response.py | 4 +- .../types/rulesets/rule_delete_response.py | 4 +- .../types/rulesets/rule_edit_response.py | 4 +- .../types/rulesets/version_get_response.py | 4 +- .../rulesets/versions/by_tag_get_response.py | 4 +- .../types/warp_connector_create_response.py | 6 +- .../types/warp_connector_delete_response.py | 6 +- .../types/warp_connector_edit_response.py | 6 +- .../types/warp_connector_get_response.py | 6 +- .../types/warp_connector_list_response.py | 6 +- src/cloudflare/types/zero_trust/connection.py | 9 +- .../types/zero_trust/tunnel_edit_response.py | 6 +- .../types/zero_trust/tunnel_list_response.py | 6 +- .../types/zero_trust/tunnels/client.py | 2 +- 51 files changed, 335 insertions(+), 236 deletions(-) delete mode 100644 src/cloudflare/types/intel/attack_surface_report/issue_class.py create mode 100644 src/cloudflare/types/intel/attack_surface_report/issue_class_param.py delete mode 100644 src/cloudflare/types/intel/attack_surface_report/issue_type.py create mode 100644 src/cloudflare/types/intel/attack_surface_report/issue_type_param.py delete mode 100644 src/cloudflare/types/intel/attack_surface_report/product.py create mode 100644 src/cloudflare/types/intel/attack_surface_report/product_param.py delete mode 100644 src/cloudflare/types/intel/attack_surface_report/subject.py create mode 100644 src/cloudflare/types/intel/attack_surface_report/subject_param.py create mode 100644 src/cloudflare/types/magic_transit/colo_name_param.py create mode 100644 src/cloudflare/types/magic_transit/colo_region_param.py diff --git a/src/cloudflare/resources/intel/attack_surface_report/issues.py b/src/cloudflare/resources/intel/attack_surface_report/issues.py index fb4b60d7f664..1dec14af6e36 100644 --- a/src/cloudflare/resources/intel/attack_surface_report/issues.py +++ b/src/cloudflare/resources/intel/attack_surface_report/issues.py @@ -26,10 +26,10 @@ make_request_options, ) from ....types.intel.attack_surface_report import ( - Product, - Subject, - IssueType, - IssueClass, + ProductParam, + SubjectParam, + IssueTypeParam, + IssueClassParam, IssueListResponse, IssueTypeResponse, IssueClassResponse, @@ -60,18 +60,18 @@ def list( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_class_neq: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_type: List[IssueType] | NotGiven = NOT_GIVEN, - issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, + issue_class: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_type: IssueTypeParam | NotGiven = NOT_GIVEN, + issue_type_neq: IssueTypeParam | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, - product: List[Product] | NotGiven = NOT_GIVEN, - product_neq: List[Product] | NotGiven = NOT_GIVEN, + product: ProductParam | NotGiven = NOT_GIVEN, + product_neq: ProductParam | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: List[Subject] | NotGiven = NOT_GIVEN, - subject_neq: List[Subject] | NotGiven = NOT_GIVEN, + subject: SubjectParam | NotGiven = NOT_GIVEN, + subject_neq: SubjectParam | NotGiven = NOT_GIVEN, # 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, @@ -134,16 +134,16 @@ def class_( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_class_neq: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_type: List[IssueType] | NotGiven = NOT_GIVEN, - issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: List[Product] | NotGiven = NOT_GIVEN, - product_neq: List[Product] | NotGiven = NOT_GIVEN, + issue_class: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_type: IssueTypeParam | NotGiven = NOT_GIVEN, + issue_type_neq: IssueTypeParam | NotGiven = NOT_GIVEN, + product: ProductParam | NotGiven = NOT_GIVEN, + product_neq: ProductParam | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: List[Subject] | NotGiven = NOT_GIVEN, - subject_neq: List[Subject] | NotGiven = NOT_GIVEN, + subject: SubjectParam | NotGiven = NOT_GIVEN, + subject_neq: SubjectParam | NotGiven = NOT_GIVEN, # 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, @@ -249,16 +249,16 @@ def severity( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_class_neq: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_type: List[IssueType] | NotGiven = NOT_GIVEN, - issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: List[Product] | NotGiven = NOT_GIVEN, - product_neq: List[Product] | NotGiven = NOT_GIVEN, + issue_class: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_type: IssueTypeParam | NotGiven = NOT_GIVEN, + issue_type_neq: IssueTypeParam | NotGiven = NOT_GIVEN, + product: ProductParam | NotGiven = NOT_GIVEN, + product_neq: ProductParam | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: List[Subject] | NotGiven = NOT_GIVEN, - subject_neq: List[Subject] | NotGiven = NOT_GIVEN, + subject: SubjectParam | NotGiven = NOT_GIVEN, + subject_neq: SubjectParam | NotGiven = NOT_GIVEN, # 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, @@ -315,16 +315,16 @@ def type( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_class_neq: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_type: List[IssueType] | NotGiven = NOT_GIVEN, - issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: List[Product] | NotGiven = NOT_GIVEN, - product_neq: List[Product] | NotGiven = NOT_GIVEN, + issue_class: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_type: IssueTypeParam | NotGiven = NOT_GIVEN, + issue_type_neq: IssueTypeParam | NotGiven = NOT_GIVEN, + product: ProductParam | NotGiven = NOT_GIVEN, + product_neq: ProductParam | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: List[Subject] | NotGiven = NOT_GIVEN, - subject_neq: List[Subject] | NotGiven = NOT_GIVEN, + subject: SubjectParam | NotGiven = NOT_GIVEN, + subject_neq: SubjectParam | NotGiven = NOT_GIVEN, # 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, @@ -391,18 +391,18 @@ def list( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_class_neq: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_type: List[IssueType] | NotGiven = NOT_GIVEN, - issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, + issue_class: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_type: IssueTypeParam | NotGiven = NOT_GIVEN, + issue_type_neq: IssueTypeParam | NotGiven = NOT_GIVEN, page: int | NotGiven = NOT_GIVEN, per_page: int | NotGiven = NOT_GIVEN, - product: List[Product] | NotGiven = NOT_GIVEN, - product_neq: List[Product] | NotGiven = NOT_GIVEN, + product: ProductParam | NotGiven = NOT_GIVEN, + product_neq: ProductParam | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: List[Subject] | NotGiven = NOT_GIVEN, - subject_neq: List[Subject] | NotGiven = NOT_GIVEN, + subject: SubjectParam | NotGiven = NOT_GIVEN, + subject_neq: SubjectParam | NotGiven = NOT_GIVEN, # 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, @@ -465,16 +465,16 @@ async def class_( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_class_neq: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_type: List[IssueType] | NotGiven = NOT_GIVEN, - issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: List[Product] | NotGiven = NOT_GIVEN, - product_neq: List[Product] | NotGiven = NOT_GIVEN, + issue_class: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_type: IssueTypeParam | NotGiven = NOT_GIVEN, + issue_type_neq: IssueTypeParam | NotGiven = NOT_GIVEN, + product: ProductParam | NotGiven = NOT_GIVEN, + product_neq: ProductParam | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: List[Subject] | NotGiven = NOT_GIVEN, - subject_neq: List[Subject] | NotGiven = NOT_GIVEN, + subject: SubjectParam | NotGiven = NOT_GIVEN, + subject_neq: SubjectParam | NotGiven = NOT_GIVEN, # 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, @@ -580,16 +580,16 @@ async def severity( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_class_neq: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_type: List[IssueType] | NotGiven = NOT_GIVEN, - issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: List[Product] | NotGiven = NOT_GIVEN, - product_neq: List[Product] | NotGiven = NOT_GIVEN, + issue_class: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_type: IssueTypeParam | NotGiven = NOT_GIVEN, + issue_type_neq: IssueTypeParam | NotGiven = NOT_GIVEN, + product: ProductParam | NotGiven = NOT_GIVEN, + product_neq: ProductParam | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: List[Subject] | NotGiven = NOT_GIVEN, - subject_neq: List[Subject] | NotGiven = NOT_GIVEN, + subject: SubjectParam | NotGiven = NOT_GIVEN, + subject_neq: SubjectParam | NotGiven = NOT_GIVEN, # 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, @@ -646,16 +646,16 @@ async def type( *, account_id: str, dismissed: bool | NotGiven = NOT_GIVEN, - issue_class: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_class_neq: List[IssueClass] | NotGiven = NOT_GIVEN, - issue_type: List[IssueType] | NotGiven = NOT_GIVEN, - issue_type_neq: List[IssueType] | NotGiven = NOT_GIVEN, - product: List[Product] | NotGiven = NOT_GIVEN, - product_neq: List[Product] | NotGiven = NOT_GIVEN, + issue_class: IssueClassParam | NotGiven = NOT_GIVEN, + issue_class_neq: IssueClassParam | NotGiven = NOT_GIVEN, + issue_type: IssueTypeParam | NotGiven = NOT_GIVEN, + issue_type_neq: IssueTypeParam | NotGiven = NOT_GIVEN, + product: ProductParam | NotGiven = NOT_GIVEN, + product_neq: ProductParam | NotGiven = NOT_GIVEN, severity: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, severity_neq: List[SeverityQueryParam] | NotGiven = NOT_GIVEN, - subject: List[Subject] | NotGiven = NOT_GIVEN, - subject_neq: List[Subject] | NotGiven = NOT_GIVEN, + subject: SubjectParam | NotGiven = NOT_GIVEN, + subject_neq: SubjectParam | NotGiven = NOT_GIVEN, # 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, diff --git a/src/cloudflare/resources/rulesets/phases/phases.py b/src/cloudflare/resources/rulesets/phases/phases.py index 0900e5236716..ec198b9ee4de 100644 --- a/src/cloudflare/resources/rulesets/phases/phases.py +++ b/src/cloudflare/resources/rulesets/phases/phases.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, cast +from typing import Type, cast from typing_extensions import Literal import httpx @@ -79,7 +79,7 @@ def update( "magic_transit_managed", ], *, - rules: Iterable[RequestRuleParam], + rules: RequestRuleParam, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, @@ -312,7 +312,7 @@ async def update( "magic_transit_managed", ], *, - rules: Iterable[RequestRuleParam], + rules: RequestRuleParam, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/resources/rulesets/rulesets.py b/src/cloudflare/resources/rulesets/rulesets.py index 3fcb3c271fde..6e1b9f646fb3 100644 --- a/src/cloudflare/resources/rulesets/rulesets.py +++ b/src/cloudflare/resources/rulesets/rulesets.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, cast +from typing import Type, cast from typing_extensions import Literal import httpx @@ -116,7 +116,7 @@ def create( "magic_transit_ids_managed", "magic_transit_managed", ], - rules: Iterable[RequestRuleParam], + rules: RequestRuleParam, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, @@ -194,7 +194,7 @@ def update( self, ruleset_id: str, *, - rules: Iterable[RequestRuleParam], + rules: RequestRuleParam, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, @@ -521,7 +521,7 @@ async def create( "magic_transit_ids_managed", "magic_transit_managed", ], - rules: Iterable[RequestRuleParam], + rules: RequestRuleParam, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, @@ -599,7 +599,7 @@ async def update( self, ruleset_id: str, *, - rules: Iterable[RequestRuleParam], + rules: RequestRuleParam, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/configuration.py b/src/cloudflare/types/configuration.py index 918055bd6cb8..7495c84594fc 100644 --- a/src/cloudflare/types/configuration.py +++ b/src/cloudflare/types/configuration.py @@ -1,13 +1,24 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing_extensions import Literal + from .._models import BaseModel __all__ = ["Configuration"] class Configuration(BaseModel): - password: str - """The password required to access your origin database. + 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", "mysql"] + """Specifies the URL scheme used to connect to your origin database.""" - This value is write-only and never returned by the API. - """ + user: str + """The user of your origin database.""" diff --git a/src/cloudflare/types/configuration_param.py b/src/cloudflare/types/configuration_param.py index 03636c6abd81..02bca1d65270 100644 --- a/src/cloudflare/types/configuration_param.py +++ b/src/cloudflare/types/configuration_param.py @@ -2,14 +2,23 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["ConfigurationParam"] class ConfigurationParam(TypedDict, total=False): - password: Required[str] - """The password required to access your origin database. + database: Required[str] + """The name of your origin database.""" - This value is write-only and never returned by the API. - """ + host: Required[str] + """The host (hostname or IP) of your origin database.""" + + port: Required[int] + """The port (default: 5432 for Postgres) of your origin database.""" + + scheme: Required[Literal["postgres", "postgresql", "mysql"]] + """Specifies the URL scheme used to connect to your origin database.""" + + user: Required[str] + """The user of your origin database.""" diff --git a/src/cloudflare/types/hyperdrive/hyperdrive.py b/src/cloudflare/types/hyperdrive/hyperdrive.py index 320e9948ce3d..242e98b9e780 100644 --- a/src/cloudflare/types/hyperdrive/hyperdrive.py +++ b/src/cloudflare/types/hyperdrive/hyperdrive.py @@ -3,10 +3,32 @@ from typing import Optional from ..._models import BaseModel +from ..configuration import Configuration -__all__ = ["Hyperdrive"] +__all__ = ["Hyperdrive", "Caching"] + + +class Caching(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. + + (Default: 60) + """ + + stale_while_revalidate: Optional[int] = None + """ + When present, indicates the number of seconds cache may serve the response after + it becomes stale. (Default: 15) + """ class Hyperdrive(BaseModel): - id: Optional[str] = None - """Identifier""" + caching: Optional[Caching] = None + + name: Optional[str] = None + + origin: Optional[Configuration] = None diff --git a/src/cloudflare/types/intel/attack_surface_report/__init__.py b/src/cloudflare/types/intel/attack_surface_report/__init__.py index a8b106967e2d..3e22ed22dae8 100644 --- a/src/cloudflare/types/intel/attack_surface_report/__init__.py +++ b/src/cloudflare/types/intel/attack_surface_report/__init__.py @@ -2,10 +2,10 @@ from __future__ import annotations -from .product import Product as Product -from .subject import Subject as Subject -from .issue_type import IssueType as IssueType -from .issue_class import IssueClass as IssueClass +from .product_param import ProductParam as ProductParam +from .subject_param import SubjectParam as SubjectParam +from .issue_type_param import IssueTypeParam as IssueTypeParam +from .issue_class_param import IssueClassParam as IssueClassParam from .issue_list_params import IssueListParams as IssueListParams from .issue_type_params import IssueTypeParams as IssueTypeParams from .issue_class_params import IssueClassParams as IssueClassParams diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_class.py b/src/cloudflare/types/intel/attack_surface_report/issue_class.py deleted file mode 100644 index e8d11cc62983..000000000000 --- a/src/cloudflare/types/intel/attack_surface_report/issue_class.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - -__all__ = ["IssueClass"] - -IssueClass = str diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_class_param.py b/src/cloudflare/types/intel/attack_surface_report/issue_class_param.py new file mode 100644 index 000000000000..2f14613c8618 --- /dev/null +++ b/src/cloudflare/types/intel/attack_surface_report/issue_class_param.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List + +__all__ = ["IssueClassParamItem"] + +IssueClassParamItem = str + +IssueClassParam = List[str] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_class_params.py b/src/cloudflare/types/intel/attack_surface_report/issue_class_params.py index 254ce8f9fc80..2f4282e8e10a 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_class_params.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_class_params.py @@ -5,11 +5,11 @@ from typing import List from typing_extensions import Required, Annotated, TypedDict -from .product import Product -from .subject import Subject from ...._utils import PropertyInfo -from .issue_type import IssueType -from .issue_class import IssueClass +from .product_param import ProductParam +from .subject_param import SubjectParam +from .issue_type_param import IssueTypeParam +from .issue_class_param import IssueClassParam from .severity_query_param import SeverityQueryParam __all__ = ["IssueClassParams"] @@ -21,22 +21,22 @@ class IssueClassParams(TypedDict, total=False): dismissed: bool - issue_class: List[IssueClass] + issue_class: IssueClassParam - issue_class_neq: Annotated[List[IssueClass], PropertyInfo(alias="issue_class~neq")] + issue_class_neq: Annotated[IssueClassParam, PropertyInfo(alias="issue_class~neq")] - issue_type: List[IssueType] + issue_type: IssueTypeParam - issue_type_neq: Annotated[List[IssueType], PropertyInfo(alias="issue_type~neq")] + issue_type_neq: Annotated[IssueTypeParam, PropertyInfo(alias="issue_type~neq")] - product: List[Product] + product: ProductParam - product_neq: Annotated[List[Product], PropertyInfo(alias="product~neq")] + product_neq: Annotated[ProductParam, PropertyInfo(alias="product~neq")] severity: List[SeverityQueryParam] severity_neq: Annotated[List[SeverityQueryParam], PropertyInfo(alias="severity~neq")] - subject: List[Subject] + subject: SubjectParam - subject_neq: Annotated[List[Subject], PropertyInfo(alias="subject~neq")] + subject_neq: Annotated[SubjectParam, PropertyInfo(alias="subject~neq")] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_list_params.py b/src/cloudflare/types/intel/attack_surface_report/issue_list_params.py index 930d59703174..020d806c5f94 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_list_params.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_list_params.py @@ -5,11 +5,11 @@ from typing import List from typing_extensions import Required, Annotated, TypedDict -from .product import Product -from .subject import Subject from ...._utils import PropertyInfo -from .issue_type import IssueType -from .issue_class import IssueClass +from .product_param import ProductParam +from .subject_param import SubjectParam +from .issue_type_param import IssueTypeParam +from .issue_class_param import IssueClassParam from .severity_query_param import SeverityQueryParam __all__ = ["IssueListParams"] @@ -21,13 +21,13 @@ class IssueListParams(TypedDict, total=False): dismissed: bool - issue_class: List[IssueClass] + issue_class: IssueClassParam - issue_class_neq: Annotated[List[IssueClass], PropertyInfo(alias="issue_class~neq")] + issue_class_neq: Annotated[IssueClassParam, PropertyInfo(alias="issue_class~neq")] - issue_type: List[IssueType] + issue_type: IssueTypeParam - issue_type_neq: Annotated[List[IssueType], PropertyInfo(alias="issue_type~neq")] + issue_type_neq: Annotated[IssueTypeParam, PropertyInfo(alias="issue_type~neq")] page: int """Current page within paginated list of results""" @@ -35,14 +35,14 @@ class IssueListParams(TypedDict, total=False): per_page: int """Number of results per page of results""" - product: List[Product] + product: ProductParam - product_neq: Annotated[List[Product], PropertyInfo(alias="product~neq")] + product_neq: Annotated[ProductParam, PropertyInfo(alias="product~neq")] severity: List[SeverityQueryParam] severity_neq: Annotated[List[SeverityQueryParam], PropertyInfo(alias="severity~neq")] - subject: List[Subject] + subject: SubjectParam - subject_neq: Annotated[List[Subject], PropertyInfo(alias="subject~neq")] + subject_neq: Annotated[SubjectParam, PropertyInfo(alias="subject~neq")] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_severity_params.py b/src/cloudflare/types/intel/attack_surface_report/issue_severity_params.py index 3d007ae85485..bc1e135dee44 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_severity_params.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_severity_params.py @@ -5,11 +5,11 @@ from typing import List from typing_extensions import Required, Annotated, TypedDict -from .product import Product -from .subject import Subject from ...._utils import PropertyInfo -from .issue_type import IssueType -from .issue_class import IssueClass +from .product_param import ProductParam +from .subject_param import SubjectParam +from .issue_type_param import IssueTypeParam +from .issue_class_param import IssueClassParam from .severity_query_param import SeverityQueryParam __all__ = ["IssueSeverityParams"] @@ -21,22 +21,22 @@ class IssueSeverityParams(TypedDict, total=False): dismissed: bool - issue_class: List[IssueClass] + issue_class: IssueClassParam - issue_class_neq: Annotated[List[IssueClass], PropertyInfo(alias="issue_class~neq")] + issue_class_neq: Annotated[IssueClassParam, PropertyInfo(alias="issue_class~neq")] - issue_type: List[IssueType] + issue_type: IssueTypeParam - issue_type_neq: Annotated[List[IssueType], PropertyInfo(alias="issue_type~neq")] + issue_type_neq: Annotated[IssueTypeParam, PropertyInfo(alias="issue_type~neq")] - product: List[Product] + product: ProductParam - product_neq: Annotated[List[Product], PropertyInfo(alias="product~neq")] + product_neq: Annotated[ProductParam, PropertyInfo(alias="product~neq")] severity: List[SeverityQueryParam] severity_neq: Annotated[List[SeverityQueryParam], PropertyInfo(alias="severity~neq")] - subject: List[Subject] + subject: SubjectParam - subject_neq: Annotated[List[Subject], PropertyInfo(alias="subject~neq")] + subject_neq: Annotated[SubjectParam, PropertyInfo(alias="subject~neq")] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_type.py b/src/cloudflare/types/intel/attack_surface_report/issue_type.py deleted file mode 100644 index 72d551046243..000000000000 --- a/src/cloudflare/types/intel/attack_surface_report/issue_type.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal - -__all__ = ["IssueType"] - -IssueType = Literal[ - "compliance_violation", "email_security", "exposed_infrastructure", "insecure_configuration", "weak_authentication" -] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_type_param.py b/src/cloudflare/types/intel/attack_surface_report/issue_type_param.py new file mode 100644 index 000000000000..a2af5d54f51d --- /dev/null +++ b/src/cloudflare/types/intel/attack_surface_report/issue_type_param.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import Literal + +__all__ = ["IssueTypeParamItem"] + +IssueTypeParamItem = Literal[ + "compliance_violation", "email_security", "exposed_infrastructure", "insecure_configuration", "weak_authentication" +] + +IssueTypeParam = List[ + Literal[ + "compliance_violation", + "email_security", + "exposed_infrastructure", + "insecure_configuration", + "weak_authentication", + ] +] diff --git a/src/cloudflare/types/intel/attack_surface_report/issue_type_params.py b/src/cloudflare/types/intel/attack_surface_report/issue_type_params.py index eba61869bb00..d16117a98085 100644 --- a/src/cloudflare/types/intel/attack_surface_report/issue_type_params.py +++ b/src/cloudflare/types/intel/attack_surface_report/issue_type_params.py @@ -5,11 +5,11 @@ from typing import List from typing_extensions import Required, Annotated, TypedDict -from .product import Product -from .subject import Subject from ...._utils import PropertyInfo -from .issue_type import IssueType -from .issue_class import IssueClass +from .product_param import ProductParam +from .subject_param import SubjectParam +from .issue_type_param import IssueTypeParam +from .issue_class_param import IssueClassParam from .severity_query_param import SeverityQueryParam __all__ = ["IssueTypeParams"] @@ -21,22 +21,22 @@ class IssueTypeParams(TypedDict, total=False): dismissed: bool - issue_class: List[IssueClass] + issue_class: IssueClassParam - issue_class_neq: Annotated[List[IssueClass], PropertyInfo(alias="issue_class~neq")] + issue_class_neq: Annotated[IssueClassParam, PropertyInfo(alias="issue_class~neq")] - issue_type: List[IssueType] + issue_type: IssueTypeParam - issue_type_neq: Annotated[List[IssueType], PropertyInfo(alias="issue_type~neq")] + issue_type_neq: Annotated[IssueTypeParam, PropertyInfo(alias="issue_type~neq")] - product: List[Product] + product: ProductParam - product_neq: Annotated[List[Product], PropertyInfo(alias="product~neq")] + product_neq: Annotated[ProductParam, PropertyInfo(alias="product~neq")] severity: List[SeverityQueryParam] severity_neq: Annotated[List[SeverityQueryParam], PropertyInfo(alias="severity~neq")] - subject: List[Subject] + subject: SubjectParam - subject_neq: Annotated[List[Subject], PropertyInfo(alias="subject~neq")] + subject_neq: Annotated[SubjectParam, PropertyInfo(alias="subject~neq")] diff --git a/src/cloudflare/types/intel/attack_surface_report/product.py b/src/cloudflare/types/intel/attack_surface_report/product.py deleted file mode 100644 index ba20d5592941..000000000000 --- a/src/cloudflare/types/intel/attack_surface_report/product.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - -__all__ = ["Product"] - -Product = str diff --git a/src/cloudflare/types/intel/attack_surface_report/product_param.py b/src/cloudflare/types/intel/attack_surface_report/product_param.py new file mode 100644 index 000000000000..430d17c2f52d --- /dev/null +++ b/src/cloudflare/types/intel/attack_surface_report/product_param.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List + +__all__ = ["ProductParamItem"] + +ProductParamItem = str + +ProductParam = List[str] diff --git a/src/cloudflare/types/intel/attack_surface_report/subject.py b/src/cloudflare/types/intel/attack_surface_report/subject.py deleted file mode 100644 index c19ba96927ec..000000000000 --- a/src/cloudflare/types/intel/attack_surface_report/subject.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - -__all__ = ["Subject"] - -Subject = str diff --git a/src/cloudflare/types/intel/attack_surface_report/subject_param.py b/src/cloudflare/types/intel/attack_surface_report/subject_param.py new file mode 100644 index 000000000000..f360f7d73b0e --- /dev/null +++ b/src/cloudflare/types/intel/attack_surface_report/subject_param.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List + +__all__ = ["SubjectParamItem"] + +SubjectParamItem = str + +SubjectParam = List[str] diff --git a/src/cloudflare/types/magic_transit/__init__.py b/src/cloudflare/types/magic_transit/__init__.py index 85cd01616788..cd6cd6aaf02f 100644 --- a/src/cloudflare/types/magic_transit/__init__.py +++ b/src/cloudflare/types/magic_transit/__init__.py @@ -9,7 +9,9 @@ from .scope_param import ScopeParam as ScopeParam from .psk_metadata import PSKMetadata as PSKMetadata from .site_location import SiteLocation as SiteLocation +from .colo_name_param import ColoNameParam as ColoNameParam from .site_list_params import SiteListParams as SiteListParams +from .colo_region_param import ColoRegionParam as ColoRegionParam from .site_get_response import SiteGetResponse as SiteGetResponse from .route_empty_params import RouteEmptyParams as RouteEmptyParams from .route_get_response import RouteGetResponse as RouteGetResponse diff --git a/src/cloudflare/types/magic_transit/colo_name.py b/src/cloudflare/types/magic_transit/colo_name.py index b4bd707a7aaa..00c58aa33405 100644 --- a/src/cloudflare/types/magic_transit/colo_name.py +++ b/src/cloudflare/types/magic_transit/colo_name.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import List __all__ = ["ColoName"] -ColoName = str +ColoName = List[str] diff --git a/src/cloudflare/types/magic_transit/colo_name_param.py b/src/cloudflare/types/magic_transit/colo_name_param.py new file mode 100644 index 000000000000..bb4fd54d9bbc --- /dev/null +++ b/src/cloudflare/types/magic_transit/colo_name_param.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List + +__all__ = ["ColoNameParamItem"] + +ColoNameParamItem = str + +ColoNameParam = List[str] diff --git a/src/cloudflare/types/magic_transit/colo_region.py b/src/cloudflare/types/magic_transit/colo_region.py index fdc27731a226..579dfbf78842 100644 --- a/src/cloudflare/types/magic_transit/colo_region.py +++ b/src/cloudflare/types/magic_transit/colo_region.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import List __all__ = ["ColoRegion"] -ColoRegion = str +ColoRegion = List[str] diff --git a/src/cloudflare/types/magic_transit/colo_region_param.py b/src/cloudflare/types/magic_transit/colo_region_param.py new file mode 100644 index 000000000000..f5ea451dcbd5 --- /dev/null +++ b/src/cloudflare/types/magic_transit/colo_region_param.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List + +__all__ = ["ColoRegionParamItem"] + +ColoRegionParamItem = str + +ColoRegionParam = List[str] diff --git a/src/cloudflare/types/magic_transit/scope.py b/src/cloudflare/types/magic_transit/scope.py index 13359e19bddd..a5077ec70e50 100644 --- a/src/cloudflare/types/magic_transit/scope.py +++ b/src/cloudflare/types/magic_transit/scope.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from ..._models import BaseModel from .colo_name import ColoName @@ -10,8 +10,8 @@ class Scope(BaseModel): - colo_names: Optional[List[ColoName]] = None + colo_names: Optional[ColoName] = None """List of colo names for the ECMP scope.""" - colo_regions: Optional[List[ColoRegion]] = None + colo_regions: Optional[ColoRegion] = None """List of colo regions for the ECMP scope.""" diff --git a/src/cloudflare/types/magic_transit/scope_param.py b/src/cloudflare/types/magic_transit/scope_param.py index 16d4eef753cd..f65fb559de43 100644 --- a/src/cloudflare/types/magic_transit/scope_param.py +++ b/src/cloudflare/types/magic_transit/scope_param.py @@ -2,18 +2,17 @@ from __future__ import annotations -from typing import List from typing_extensions import TypedDict -from .colo_name import ColoName -from .colo_region import ColoRegion +from .colo_name_param import ColoNameParam +from .colo_region_param import ColoRegionParam __all__ = ["ScopeParam"] class ScopeParam(TypedDict, total=False): - colo_names: List[ColoName] + colo_names: ColoNameParam """List of colo names for the ECMP scope.""" - colo_regions: List[ColoRegion] + colo_regions: ColoRegionParam """List of colo regions for the ECMP scope.""" diff --git a/src/cloudflare/types/request_rule_param.py b/src/cloudflare/types/request_rule_param.py index e94893764bc6..13e2bf749084 100644 --- a/src/cloudflare/types/request_rule_param.py +++ b/src/cloudflare/types/request_rule_param.py @@ -2,10 +2,12 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from .rulesets import LogRuleParam, SkipRuleParam, BlockRuleParam, ExecuteRuleParam -__all__ = ["RequestRuleParam"] +__all__ = ["RequestRuleParamItem"] -RequestRuleParam = Union[BlockRuleParam, ExecuteRuleParam, LogRuleParam, SkipRuleParam] +RequestRuleParamItem = Union[BlockRuleParam, ExecuteRuleParam, LogRuleParam, SkipRuleParam] + +RequestRuleParam = List[RequestRuleParamItem] diff --git a/src/cloudflare/types/respone_rule.py b/src/cloudflare/types/respone_rule.py index 85565ed81d52..ecb5262e3293 100644 --- a/src/cloudflare/types/respone_rule.py +++ b/src/cloudflare/types/respone_rule.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Union +from typing import List, Union from .rulesets import LogRule, SkipRule, BlockRule, ExecuteRule -__all__ = ["ResponeRule"] +__all__ = ["ResponeRule", "ResponeRuleItem"] -ResponeRule = Union[BlockRule, ExecuteRule, LogRule, SkipRule] +ResponeRuleItem = Union[BlockRule, ExecuteRule, LogRule, SkipRule] + +ResponeRule = List[ResponeRuleItem] diff --git a/src/cloudflare/types/ruleset_create_params.py b/src/cloudflare/types/ruleset_create_params.py index 27128c076da1..0539d15af080 100644 --- a/src/cloudflare/types/ruleset_create_params.py +++ b/src/cloudflare/types/ruleset_create_params.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import Iterable from typing_extensions import Literal, Required, TypedDict from .request_rule_param import RequestRuleParam @@ -46,7 +45,7 @@ class RulesetCreateParams(TypedDict, total=False): ] """The phase of the ruleset.""" - rules: Required[Iterable[RequestRuleParam]] + rules: Required[RequestRuleParam] """The list of rules in the ruleset.""" account_id: str diff --git a/src/cloudflare/types/ruleset_create_response.py b/src/cloudflare/types/ruleset_create_response.py index ead1e8accf6f..9dac24aeebaa 100644 --- a/src/cloudflare/types/ruleset_create_response.py +++ b/src/cloudflare/types/ruleset_create_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class RulesetCreateResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/ruleset_get_response.py b/src/cloudflare/types/ruleset_get_response.py index c6a1fc3cf5fb..fcaa789c2b54 100644 --- a/src/cloudflare/types/ruleset_get_response.py +++ b/src/cloudflare/types/ruleset_get_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class RulesetGetResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/ruleset_update_params.py b/src/cloudflare/types/ruleset_update_params.py index 1c0d34cd3e27..972c66552827 100644 --- a/src/cloudflare/types/ruleset_update_params.py +++ b/src/cloudflare/types/ruleset_update_params.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import Iterable from typing_extensions import Literal, Required, TypedDict from .request_rule_param import RequestRuleParam @@ -11,7 +10,7 @@ class RulesetUpdateParams(TypedDict, total=False): - rules: Required[Iterable[RequestRuleParam]] + rules: Required[RequestRuleParam] """The list of rules in the ruleset.""" account_id: str diff --git a/src/cloudflare/types/ruleset_update_response.py b/src/cloudflare/types/ruleset_update_response.py index 0d024ee0f376..f7acb59985e3 100644 --- a/src/cloudflare/types/ruleset_update_response.py +++ b/src/cloudflare/types/ruleset_update_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class RulesetUpdateResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/rulesets/phase_get_response.py b/src/cloudflare/types/rulesets/phase_get_response.py index 2abbbf5424f9..356b2ff1004a 100644 --- a/src/cloudflare/types/rulesets/phase_get_response.py +++ b/src/cloudflare/types/rulesets/phase_get_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class PhaseGetResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/rulesets/phase_update_params.py b/src/cloudflare/types/rulesets/phase_update_params.py index 6358187dc13a..6659dc431a65 100644 --- a/src/cloudflare/types/rulesets/phase_update_params.py +++ b/src/cloudflare/types/rulesets/phase_update_params.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import Iterable from typing_extensions import Literal, Required, TypedDict from ..request_rule_param import RequestRuleParam @@ -11,7 +10,7 @@ class PhaseUpdateParams(TypedDict, total=False): - rules: Required[Iterable[RequestRuleParam]] + rules: Required[RequestRuleParam] """The list of rules in the ruleset.""" account_id: str diff --git a/src/cloudflare/types/rulesets/phase_update_response.py b/src/cloudflare/types/rulesets/phase_update_response.py index fb4e15ea6c66..34518b0649dd 100644 --- a/src/cloudflare/types/rulesets/phase_update_response.py +++ b/src/cloudflare/types/rulesets/phase_update_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class PhaseUpdateResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/rulesets/phases/version_get_response.py b/src/cloudflare/types/rulesets/phases/version_get_response.py index 46ca9cd68cbc..16d269ae90db 100644 --- a/src/cloudflare/types/rulesets/phases/version_get_response.py +++ b/src/cloudflare/types/rulesets/phases/version_get_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class VersionGetResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/rulesets/rule_create_response.py b/src/cloudflare/types/rulesets/rule_create_response.py index 7fc7f8e16d53..09a3fa721d2f 100644 --- a/src/cloudflare/types/rulesets/rule_create_response.py +++ b/src/cloudflare/types/rulesets/rule_create_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class RuleCreateResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/rulesets/rule_delete_response.py b/src/cloudflare/types/rulesets/rule_delete_response.py index 47eec7625c1a..38687e3ca257 100644 --- a/src/cloudflare/types/rulesets/rule_delete_response.py +++ b/src/cloudflare/types/rulesets/rule_delete_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class RuleDeleteResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/rulesets/rule_edit_response.py b/src/cloudflare/types/rulesets/rule_edit_response.py index 87c1d04511c7..bccb6f3750a5 100644 --- a/src/cloudflare/types/rulesets/rule_edit_response.py +++ b/src/cloudflare/types/rulesets/rule_edit_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class RuleEditResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/rulesets/version_get_response.py b/src/cloudflare/types/rulesets/version_get_response.py index ef8ea2b80ac8..2e95e51a6295 100644 --- a/src/cloudflare/types/rulesets/version_get_response.py +++ b/src/cloudflare/types/rulesets/version_get_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class VersionGetResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/rulesets/versions/by_tag_get_response.py b/src/cloudflare/types/rulesets/versions/by_tag_get_response.py index b5ae633293fa..dd7980626f59 100644 --- a/src/cloudflare/types/rulesets/versions/by_tag_get_response.py +++ b/src/cloudflare/types/rulesets/versions/by_tag_get_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -50,7 +50,7 @@ class ByTagGetResponse(BaseModel): ] """The phase of the ruleset.""" - rules: List[ResponeRule] + rules: ResponeRule """The list of rules in the ruleset.""" version: str diff --git a/src/cloudflare/types/warp_connector_create_response.py b/src/cloudflare/types/warp_connector_create_response.py index d97351292826..41358493acbe 100644 --- a/src/cloudflare/types/warp_connector_create_response.py +++ b/src/cloudflare/types/warp_connector_create_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -17,7 +17,7 @@ class TunnelCfdTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None @@ -73,7 +73,7 @@ class TunnelWARPConnectorTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None diff --git a/src/cloudflare/types/warp_connector_delete_response.py b/src/cloudflare/types/warp_connector_delete_response.py index c70fba6a894e..586aa9cd45b6 100644 --- a/src/cloudflare/types/warp_connector_delete_response.py +++ b/src/cloudflare/types/warp_connector_delete_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -17,7 +17,7 @@ class TunnelCfdTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None @@ -73,7 +73,7 @@ class TunnelWARPConnectorTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None diff --git a/src/cloudflare/types/warp_connector_edit_response.py b/src/cloudflare/types/warp_connector_edit_response.py index 8896d8212438..73539b4b0935 100644 --- a/src/cloudflare/types/warp_connector_edit_response.py +++ b/src/cloudflare/types/warp_connector_edit_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -17,7 +17,7 @@ class TunnelCfdTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None @@ -73,7 +73,7 @@ class TunnelWARPConnectorTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None diff --git a/src/cloudflare/types/warp_connector_get_response.py b/src/cloudflare/types/warp_connector_get_response.py index dab92ef6fa73..2bd57b79a447 100644 --- a/src/cloudflare/types/warp_connector_get_response.py +++ b/src/cloudflare/types/warp_connector_get_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -17,7 +17,7 @@ class TunnelCfdTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None @@ -73,7 +73,7 @@ class TunnelWARPConnectorTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None diff --git a/src/cloudflare/types/warp_connector_list_response.py b/src/cloudflare/types/warp_connector_list_response.py index e127bf2e5a5a..5b8753eb03c4 100644 --- a/src/cloudflare/types/warp_connector_list_response.py +++ b/src/cloudflare/types/warp_connector_list_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -17,7 +17,7 @@ class TunnelCfdTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None @@ -73,7 +73,7 @@ class TunnelWARPConnectorTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/connection.py b/src/cloudflare/types/zero_trust/connection.py index 2232f4d460bb..6be1acae57ec 100644 --- a/src/cloudflare/types/zero_trust/connection.py +++ b/src/cloudflare/types/zero_trust/connection.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional from datetime import datetime from ..._models import BaseModel -__all__ = ["Connection"] +__all__ = ["Connection", "ConnectionItem"] -class Connection(BaseModel): +class ConnectionItem(BaseModel): id: Optional[str] = None """UUID of the Cloudflare Tunnel connection.""" @@ -37,3 +37,6 @@ class Connection(BaseModel): uuid: Optional[str] = None """UUID of the Cloudflare Tunnel connection.""" + + +Connection = List[ConnectionItem] diff --git a/src/cloudflare/types/zero_trust/tunnel_edit_response.py b/src/cloudflare/types/zero_trust/tunnel_edit_response.py index edac0e4990a2..025abb9aeac5 100644 --- a/src/cloudflare/types/zero_trust/tunnel_edit_response.py +++ b/src/cloudflare/types/zero_trust/tunnel_edit_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -17,7 +17,7 @@ class TunnelCfdTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None @@ -73,7 +73,7 @@ class TunnelWARPConnectorTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/tunnel_list_response.py b/src/cloudflare/types/zero_trust/tunnel_list_response.py index ee53910b58aa..a1f0a11c707c 100644 --- a/src/cloudflare/types/zero_trust/tunnel_list_response.py +++ b/src/cloudflare/types/zero_trust/tunnel_list_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from datetime import datetime from typing_extensions import Literal @@ -17,7 +17,7 @@ class TunnelCfdTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None @@ -73,7 +73,7 @@ class TunnelWARPConnectorTunnel(BaseModel): account_tag: Optional[str] = None """Cloudflare account ID""" - connections: Optional[List[Connection]] = None + connections: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" conns_active_at: Optional[datetime] = None diff --git a/src/cloudflare/types/zero_trust/tunnels/client.py b/src/cloudflare/types/zero_trust/tunnels/client.py index cbeedebf1170..fce0f7da0a0c 100644 --- a/src/cloudflare/types/zero_trust/tunnels/client.py +++ b/src/cloudflare/types/zero_trust/tunnels/client.py @@ -22,7 +22,7 @@ class Client(BaseModel): Used internally to sync cloudflared with the Zero Trust dashboard. """ - conns: Optional[List[Connection]] = None + conns: Optional[Connection] = None """The Cloudflare Tunnel connections between your origin and Cloudflare's edge.""" features: Optional[List[str]] = None