mirror of
https://github.com/cloudflare/cloudflare-python.git
synced 2026-01-16 23:01:03 +00:00
feat: update via SDK Studio (#111)
This commit is contained in:
parent
100de96c24
commit
4fe83fd139
7 changed files with 209 additions and 209 deletions
16
api.md
16
api.md
|
|
@ -5595,7 +5595,7 @@ Methods:
|
|||
- <code title="get /accounts/{account_id}/dlp/profiles">client.zero_trust.dlp.profiles.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py">list</a>(\*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/profile_list_response.py">Optional</a></code>
|
||||
- <code title="get /accounts/{account_id}/dlp/profiles/{profile_id}">client.zero_trust.dlp.profiles.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py">get</a>(profile_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/profile_get_response.py">ProfileGetResponse</a></code>
|
||||
|
||||
#### Customs
|
||||
#### Custom
|
||||
|
||||
Types:
|
||||
|
||||
|
|
@ -5609,12 +5609,12 @@ from cloudflare.types.zero_trust.dlp.profiles import (
|
|||
|
||||
Methods:
|
||||
|
||||
- <code title="post /accounts/{account_id}/dlp/profiles/custom">client.zero_trust.dlp.profiles.customs.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/customs.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/custom_create_response.py">Optional</a></code>
|
||||
- <code title="put /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zero_trust.dlp.profiles.customs.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/customs.py">update</a>(profile_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py">DLPCustomProfile</a></code>
|
||||
- <code title="delete /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zero_trust.dlp.profiles.customs.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/customs.py">delete</a>(profile_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/custom_delete_response.py">CustomDeleteResponse</a></code>
|
||||
- <code title="get /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zero_trust.dlp.profiles.customs.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/customs.py">get</a>(profile_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py">DLPCustomProfile</a></code>
|
||||
- <code title="post /accounts/{account_id}/dlp/profiles/custom">client.zero_trust.dlp.profiles.custom.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/custom.py">create</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/profiles/custom_create_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/custom_create_response.py">Optional</a></code>
|
||||
- <code title="put /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zero_trust.dlp.profiles.custom.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/custom.py">update</a>(profile_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/profiles/custom_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py">DLPCustomProfile</a></code>
|
||||
- <code title="delete /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zero_trust.dlp.profiles.custom.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/custom.py">delete</a>(profile_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/custom_delete_response.py">CustomDeleteResponse</a></code>
|
||||
- <code title="get /accounts/{account_id}/dlp/profiles/custom/{profile_id}">client.zero_trust.dlp.profiles.custom.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/custom.py">get</a>(profile_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/dlp_custom_profile.py">DLPCustomProfile</a></code>
|
||||
|
||||
#### Predefineds
|
||||
#### Predefined
|
||||
|
||||
Types:
|
||||
|
||||
|
|
@ -5624,8 +5624,8 @@ from cloudflare.types.zero_trust.dlp.profiles import DLPPredefinedProfile
|
|||
|
||||
Methods:
|
||||
|
||||
- <code title="put /accounts/{account_id}/dlp/profiles/predefined/{profile_id}">client.zero_trust.dlp.profiles.predefineds.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/predefineds.py">update</a>(profile_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py">DLPPredefinedProfile</a></code>
|
||||
- <code title="get /accounts/{account_id}/dlp/profiles/predefined/{profile_id}">client.zero_trust.dlp.profiles.predefineds.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/predefineds.py">get</a>(profile_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py">DLPPredefinedProfile</a></code>
|
||||
- <code title="put /accounts/{account_id}/dlp/profiles/predefined/{profile_id}">client.zero_trust.dlp.profiles.predefined.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py">update</a>(profile_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dlp/profiles/predefined_update_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py">DLPPredefinedProfile</a></code>
|
||||
- <code title="get /accounts/{account_id}/dlp/profiles/predefined/{profile_id}">client.zero_trust.dlp.profiles.predefined.<a href="./src/cloudflare/resources/zero_trust/dlp/profiles/predefined.py">get</a>(profile_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dlp/profiles/dlp_predefined_profile.py">DLPPredefinedProfile</a></code>
|
||||
|
||||
## Gateway
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
# File generated from our OpenAPI spec by Stainless.
|
||||
|
||||
from .customs import (
|
||||
Customs,
|
||||
AsyncCustoms,
|
||||
CustomsWithRawResponse,
|
||||
AsyncCustomsWithRawResponse,
|
||||
CustomsWithStreamingResponse,
|
||||
AsyncCustomsWithStreamingResponse,
|
||||
from .custom import (
|
||||
Custom,
|
||||
AsyncCustom,
|
||||
CustomWithRawResponse,
|
||||
AsyncCustomWithRawResponse,
|
||||
CustomWithStreamingResponse,
|
||||
AsyncCustomWithStreamingResponse,
|
||||
)
|
||||
from .profiles import (
|
||||
Profiles,
|
||||
|
|
@ -16,28 +16,28 @@ from .profiles import (
|
|||
ProfilesWithStreamingResponse,
|
||||
AsyncProfilesWithStreamingResponse,
|
||||
)
|
||||
from .predefineds import (
|
||||
Predefineds,
|
||||
AsyncPredefineds,
|
||||
PredefinedsWithRawResponse,
|
||||
AsyncPredefinedsWithRawResponse,
|
||||
PredefinedsWithStreamingResponse,
|
||||
AsyncPredefinedsWithStreamingResponse,
|
||||
from .predefined import (
|
||||
Predefined,
|
||||
AsyncPredefined,
|
||||
PredefinedWithRawResponse,
|
||||
AsyncPredefinedWithRawResponse,
|
||||
PredefinedWithStreamingResponse,
|
||||
AsyncPredefinedWithStreamingResponse,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"Customs",
|
||||
"AsyncCustoms",
|
||||
"CustomsWithRawResponse",
|
||||
"AsyncCustomsWithRawResponse",
|
||||
"CustomsWithStreamingResponse",
|
||||
"AsyncCustomsWithStreamingResponse",
|
||||
"Predefineds",
|
||||
"AsyncPredefineds",
|
||||
"PredefinedsWithRawResponse",
|
||||
"AsyncPredefinedsWithRawResponse",
|
||||
"PredefinedsWithStreamingResponse",
|
||||
"AsyncPredefinedsWithStreamingResponse",
|
||||
"Custom",
|
||||
"AsyncCustom",
|
||||
"CustomWithRawResponse",
|
||||
"AsyncCustomWithRawResponse",
|
||||
"CustomWithStreamingResponse",
|
||||
"AsyncCustomWithStreamingResponse",
|
||||
"Predefined",
|
||||
"AsyncPredefined",
|
||||
"PredefinedWithRawResponse",
|
||||
"AsyncPredefinedWithRawResponse",
|
||||
"PredefinedWithStreamingResponse",
|
||||
"AsyncPredefinedWithStreamingResponse",
|
||||
"Profiles",
|
||||
"AsyncProfiles",
|
||||
"ProfilesWithRawResponse",
|
||||
|
|
|
|||
|
|
@ -31,17 +31,17 @@ from .....types.zero_trust.dlp.profiles import (
|
|||
custom_update_params,
|
||||
)
|
||||
|
||||
__all__ = ["Customs", "AsyncCustoms"]
|
||||
__all__ = ["Custom", "AsyncCustom"]
|
||||
|
||||
|
||||
class Customs(SyncAPIResource):
|
||||
class Custom(SyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> CustomsWithRawResponse:
|
||||
return CustomsWithRawResponse(self)
|
||||
def with_raw_response(self) -> CustomWithRawResponse:
|
||||
return CustomWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> CustomsWithStreamingResponse:
|
||||
return CustomsWithStreamingResponse(self)
|
||||
def with_streaming_response(self) -> CustomWithStreamingResponse:
|
||||
return CustomWithStreamingResponse(self)
|
||||
|
||||
def create(
|
||||
self,
|
||||
|
|
@ -251,14 +251,14 @@ class Customs(SyncAPIResource):
|
|||
)
|
||||
|
||||
|
||||
class AsyncCustoms(AsyncAPIResource):
|
||||
class AsyncCustom(AsyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncCustomsWithRawResponse:
|
||||
return AsyncCustomsWithRawResponse(self)
|
||||
def with_raw_response(self) -> AsyncCustomWithRawResponse:
|
||||
return AsyncCustomWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncCustomsWithStreamingResponse:
|
||||
return AsyncCustomsWithStreamingResponse(self)
|
||||
def with_streaming_response(self) -> AsyncCustomWithStreamingResponse:
|
||||
return AsyncCustomWithStreamingResponse(self)
|
||||
|
||||
async def create(
|
||||
self,
|
||||
|
|
@ -468,73 +468,73 @@ class AsyncCustoms(AsyncAPIResource):
|
|||
)
|
||||
|
||||
|
||||
class CustomsWithRawResponse:
|
||||
def __init__(self, customs: Customs) -> None:
|
||||
self._customs = customs
|
||||
class CustomWithRawResponse:
|
||||
def __init__(self, custom: Custom) -> None:
|
||||
self._custom = custom
|
||||
|
||||
self.create = to_raw_response_wrapper(
|
||||
customs.create,
|
||||
custom.create,
|
||||
)
|
||||
self.update = to_raw_response_wrapper(
|
||||
customs.update,
|
||||
custom.update,
|
||||
)
|
||||
self.delete = to_raw_response_wrapper(
|
||||
customs.delete,
|
||||
custom.delete,
|
||||
)
|
||||
self.get = to_raw_response_wrapper(
|
||||
customs.get,
|
||||
custom.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncCustomsWithRawResponse:
|
||||
def __init__(self, customs: AsyncCustoms) -> None:
|
||||
self._customs = customs
|
||||
class AsyncCustomWithRawResponse:
|
||||
def __init__(self, custom: AsyncCustom) -> None:
|
||||
self._custom = custom
|
||||
|
||||
self.create = async_to_raw_response_wrapper(
|
||||
customs.create,
|
||||
custom.create,
|
||||
)
|
||||
self.update = async_to_raw_response_wrapper(
|
||||
customs.update,
|
||||
custom.update,
|
||||
)
|
||||
self.delete = async_to_raw_response_wrapper(
|
||||
customs.delete,
|
||||
custom.delete,
|
||||
)
|
||||
self.get = async_to_raw_response_wrapper(
|
||||
customs.get,
|
||||
custom.get,
|
||||
)
|
||||
|
||||
|
||||
class CustomsWithStreamingResponse:
|
||||
def __init__(self, customs: Customs) -> None:
|
||||
self._customs = customs
|
||||
class CustomWithStreamingResponse:
|
||||
def __init__(self, custom: Custom) -> None:
|
||||
self._custom = custom
|
||||
|
||||
self.create = to_streamed_response_wrapper(
|
||||
customs.create,
|
||||
custom.create,
|
||||
)
|
||||
self.update = to_streamed_response_wrapper(
|
||||
customs.update,
|
||||
custom.update,
|
||||
)
|
||||
self.delete = to_streamed_response_wrapper(
|
||||
customs.delete,
|
||||
custom.delete,
|
||||
)
|
||||
self.get = to_streamed_response_wrapper(
|
||||
customs.get,
|
||||
custom.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncCustomsWithStreamingResponse:
|
||||
def __init__(self, customs: AsyncCustoms) -> None:
|
||||
self._customs = customs
|
||||
class AsyncCustomWithStreamingResponse:
|
||||
def __init__(self, custom: AsyncCustom) -> None:
|
||||
self._custom = custom
|
||||
|
||||
self.create = async_to_streamed_response_wrapper(
|
||||
customs.create,
|
||||
custom.create,
|
||||
)
|
||||
self.update = async_to_streamed_response_wrapper(
|
||||
customs.update,
|
||||
custom.update,
|
||||
)
|
||||
self.delete = async_to_streamed_response_wrapper(
|
||||
customs.delete,
|
||||
custom.delete,
|
||||
)
|
||||
self.get = async_to_streamed_response_wrapper(
|
||||
customs.get,
|
||||
custom.get,
|
||||
)
|
||||
|
|
@ -25,17 +25,17 @@ from ....._base_client import (
|
|||
)
|
||||
from .....types.zero_trust.dlp.profiles import DLPPredefinedProfile, predefined_update_params
|
||||
|
||||
__all__ = ["Predefineds", "AsyncPredefineds"]
|
||||
__all__ = ["Predefined", "AsyncPredefined"]
|
||||
|
||||
|
||||
class Predefineds(SyncAPIResource):
|
||||
class Predefined(SyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> PredefinedsWithRawResponse:
|
||||
return PredefinedsWithRawResponse(self)
|
||||
def with_raw_response(self) -> PredefinedWithRawResponse:
|
||||
return PredefinedWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> PredefinedsWithStreamingResponse:
|
||||
return PredefinedsWithStreamingResponse(self)
|
||||
def with_streaming_response(self) -> PredefinedWithStreamingResponse:
|
||||
return PredefinedWithStreamingResponse(self)
|
||||
|
||||
def update(
|
||||
self,
|
||||
|
|
@ -141,14 +141,14 @@ class Predefineds(SyncAPIResource):
|
|||
)
|
||||
|
||||
|
||||
class AsyncPredefineds(AsyncAPIResource):
|
||||
class AsyncPredefined(AsyncAPIResource):
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncPredefinedsWithRawResponse:
|
||||
return AsyncPredefinedsWithRawResponse(self)
|
||||
def with_raw_response(self) -> AsyncPredefinedWithRawResponse:
|
||||
return AsyncPredefinedWithRawResponse(self)
|
||||
|
||||
@cached_property
|
||||
def with_streaming_response(self) -> AsyncPredefinedsWithStreamingResponse:
|
||||
return AsyncPredefinedsWithStreamingResponse(self)
|
||||
def with_streaming_response(self) -> AsyncPredefinedWithStreamingResponse:
|
||||
return AsyncPredefinedWithStreamingResponse(self)
|
||||
|
||||
async def update(
|
||||
self,
|
||||
|
|
@ -254,49 +254,49 @@ class AsyncPredefineds(AsyncAPIResource):
|
|||
)
|
||||
|
||||
|
||||
class PredefinedsWithRawResponse:
|
||||
def __init__(self, predefineds: Predefineds) -> None:
|
||||
self._predefineds = predefineds
|
||||
class PredefinedWithRawResponse:
|
||||
def __init__(self, predefined: Predefined) -> None:
|
||||
self._predefined = predefined
|
||||
|
||||
self.update = to_raw_response_wrapper(
|
||||
predefineds.update,
|
||||
predefined.update,
|
||||
)
|
||||
self.get = to_raw_response_wrapper(
|
||||
predefineds.get,
|
||||
predefined.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncPredefinedsWithRawResponse:
|
||||
def __init__(self, predefineds: AsyncPredefineds) -> None:
|
||||
self._predefineds = predefineds
|
||||
class AsyncPredefinedWithRawResponse:
|
||||
def __init__(self, predefined: AsyncPredefined) -> None:
|
||||
self._predefined = predefined
|
||||
|
||||
self.update = async_to_raw_response_wrapper(
|
||||
predefineds.update,
|
||||
predefined.update,
|
||||
)
|
||||
self.get = async_to_raw_response_wrapper(
|
||||
predefineds.get,
|
||||
predefined.get,
|
||||
)
|
||||
|
||||
|
||||
class PredefinedsWithStreamingResponse:
|
||||
def __init__(self, predefineds: Predefineds) -> None:
|
||||
self._predefineds = predefineds
|
||||
class PredefinedWithStreamingResponse:
|
||||
def __init__(self, predefined: Predefined) -> None:
|
||||
self._predefined = predefined
|
||||
|
||||
self.update = to_streamed_response_wrapper(
|
||||
predefineds.update,
|
||||
predefined.update,
|
||||
)
|
||||
self.get = to_streamed_response_wrapper(
|
||||
predefineds.get,
|
||||
predefined.get,
|
||||
)
|
||||
|
||||
|
||||
class AsyncPredefinedsWithStreamingResponse:
|
||||
def __init__(self, predefineds: AsyncPredefineds) -> None:
|
||||
self._predefineds = predefineds
|
||||
class AsyncPredefinedWithStreamingResponse:
|
||||
def __init__(self, predefined: AsyncPredefined) -> None:
|
||||
self._predefined = predefined
|
||||
|
||||
self.update = async_to_streamed_response_wrapper(
|
||||
predefineds.update,
|
||||
predefined.update,
|
||||
)
|
||||
self.get = async_to_streamed_response_wrapper(
|
||||
predefineds.get,
|
||||
predefined.get,
|
||||
)
|
||||
|
|
@ -6,24 +6,24 @@ from typing import Any, Type, Optional, cast
|
|||
|
||||
import httpx
|
||||
|
||||
from .customs import (
|
||||
Customs,
|
||||
AsyncCustoms,
|
||||
CustomsWithRawResponse,
|
||||
AsyncCustomsWithRawResponse,
|
||||
CustomsWithStreamingResponse,
|
||||
AsyncCustomsWithStreamingResponse,
|
||||
from .custom import (
|
||||
Custom,
|
||||
AsyncCustom,
|
||||
CustomWithRawResponse,
|
||||
AsyncCustomWithRawResponse,
|
||||
CustomWithStreamingResponse,
|
||||
AsyncCustomWithStreamingResponse,
|
||||
)
|
||||
from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
||||
from ....._compat import cached_property
|
||||
from .predefineds import (
|
||||
Predefineds,
|
||||
AsyncPredefineds,
|
||||
PredefinedsWithRawResponse,
|
||||
AsyncPredefinedsWithRawResponse,
|
||||
PredefinedsWithStreamingResponse,
|
||||
AsyncPredefinedsWithStreamingResponse,
|
||||
from .predefined import (
|
||||
Predefined,
|
||||
AsyncPredefined,
|
||||
PredefinedWithRawResponse,
|
||||
AsyncPredefinedWithRawResponse,
|
||||
PredefinedWithStreamingResponse,
|
||||
AsyncPredefinedWithStreamingResponse,
|
||||
)
|
||||
from ....._compat import cached_property
|
||||
from ....._resource import SyncAPIResource, AsyncAPIResource
|
||||
from ....._response import (
|
||||
to_raw_response_wrapper,
|
||||
|
|
@ -42,12 +42,12 @@ __all__ = ["Profiles", "AsyncProfiles"]
|
|||
|
||||
class Profiles(SyncAPIResource):
|
||||
@cached_property
|
||||
def customs(self) -> Customs:
|
||||
return Customs(self._client)
|
||||
def custom(self) -> Custom:
|
||||
return Custom(self._client)
|
||||
|
||||
@cached_property
|
||||
def predefineds(self) -> Predefineds:
|
||||
return Predefineds(self._client)
|
||||
def predefined(self) -> Predefined:
|
||||
return Predefined(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> ProfilesWithRawResponse:
|
||||
|
|
@ -149,12 +149,12 @@ class Profiles(SyncAPIResource):
|
|||
|
||||
class AsyncProfiles(AsyncAPIResource):
|
||||
@cached_property
|
||||
def customs(self) -> AsyncCustoms:
|
||||
return AsyncCustoms(self._client)
|
||||
def custom(self) -> AsyncCustom:
|
||||
return AsyncCustom(self._client)
|
||||
|
||||
@cached_property
|
||||
def predefineds(self) -> AsyncPredefineds:
|
||||
return AsyncPredefineds(self._client)
|
||||
def predefined(self) -> AsyncPredefined:
|
||||
return AsyncPredefined(self._client)
|
||||
|
||||
@cached_property
|
||||
def with_raw_response(self) -> AsyncProfilesWithRawResponse:
|
||||
|
|
@ -266,12 +266,12 @@ class ProfilesWithRawResponse:
|
|||
)
|
||||
|
||||
@cached_property
|
||||
def customs(self) -> CustomsWithRawResponse:
|
||||
return CustomsWithRawResponse(self._profiles.customs)
|
||||
def custom(self) -> CustomWithRawResponse:
|
||||
return CustomWithRawResponse(self._profiles.custom)
|
||||
|
||||
@cached_property
|
||||
def predefineds(self) -> PredefinedsWithRawResponse:
|
||||
return PredefinedsWithRawResponse(self._profiles.predefineds)
|
||||
def predefined(self) -> PredefinedWithRawResponse:
|
||||
return PredefinedWithRawResponse(self._profiles.predefined)
|
||||
|
||||
|
||||
class AsyncProfilesWithRawResponse:
|
||||
|
|
@ -286,12 +286,12 @@ class AsyncProfilesWithRawResponse:
|
|||
)
|
||||
|
||||
@cached_property
|
||||
def customs(self) -> AsyncCustomsWithRawResponse:
|
||||
return AsyncCustomsWithRawResponse(self._profiles.customs)
|
||||
def custom(self) -> AsyncCustomWithRawResponse:
|
||||
return AsyncCustomWithRawResponse(self._profiles.custom)
|
||||
|
||||
@cached_property
|
||||
def predefineds(self) -> AsyncPredefinedsWithRawResponse:
|
||||
return AsyncPredefinedsWithRawResponse(self._profiles.predefineds)
|
||||
def predefined(self) -> AsyncPredefinedWithRawResponse:
|
||||
return AsyncPredefinedWithRawResponse(self._profiles.predefined)
|
||||
|
||||
|
||||
class ProfilesWithStreamingResponse:
|
||||
|
|
@ -306,12 +306,12 @@ class ProfilesWithStreamingResponse:
|
|||
)
|
||||
|
||||
@cached_property
|
||||
def customs(self) -> CustomsWithStreamingResponse:
|
||||
return CustomsWithStreamingResponse(self._profiles.customs)
|
||||
def custom(self) -> CustomWithStreamingResponse:
|
||||
return CustomWithStreamingResponse(self._profiles.custom)
|
||||
|
||||
@cached_property
|
||||
def predefineds(self) -> PredefinedsWithStreamingResponse:
|
||||
return PredefinedsWithStreamingResponse(self._profiles.predefineds)
|
||||
def predefined(self) -> PredefinedWithStreamingResponse:
|
||||
return PredefinedWithStreamingResponse(self._profiles.predefined)
|
||||
|
||||
|
||||
class AsyncProfilesWithStreamingResponse:
|
||||
|
|
@ -326,9 +326,9 @@ class AsyncProfilesWithStreamingResponse:
|
|||
)
|
||||
|
||||
@cached_property
|
||||
def customs(self) -> AsyncCustomsWithStreamingResponse:
|
||||
return AsyncCustomsWithStreamingResponse(self._profiles.customs)
|
||||
def custom(self) -> AsyncCustomWithStreamingResponse:
|
||||
return AsyncCustomWithStreamingResponse(self._profiles.custom)
|
||||
|
||||
@cached_property
|
||||
def predefineds(self) -> AsyncPredefinedsWithStreamingResponse:
|
||||
return AsyncPredefinedsWithStreamingResponse(self._profiles.predefineds)
|
||||
def predefined(self) -> AsyncPredefinedWithStreamingResponse:
|
||||
return AsyncPredefinedWithStreamingResponse(self._profiles.predefined)
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ from cloudflare.types.zero_trust.dlp.profiles import (
|
|||
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
||||
|
||||
|
||||
class TestCustoms:
|
||||
class TestCustom:
|
||||
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
|
||||
|
||||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_method_create(self, client: Cloudflare) -> None:
|
||||
custom = client.zero_trust.dlp.profiles.customs.create(
|
||||
custom = client.zero_trust.dlp.profiles.custom.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
profiles=[{}, {}, {}],
|
||||
)
|
||||
|
|
@ -33,7 +33,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_raw_response_create(self, client: Cloudflare) -> None:
|
||||
response = client.zero_trust.dlp.profiles.customs.with_raw_response.create(
|
||||
response = client.zero_trust.dlp.profiles.custom.with_raw_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
profiles=[{}, {}, {}],
|
||||
)
|
||||
|
|
@ -46,7 +46,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_streaming_response_create(self, client: Cloudflare) -> None:
|
||||
with client.zero_trust.dlp.profiles.customs.with_streaming_response.create(
|
||||
with client.zero_trust.dlp.profiles.custom.with_streaming_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
profiles=[{}, {}, {}],
|
||||
) as response:
|
||||
|
|
@ -62,7 +62,7 @@ class TestCustoms:
|
|||
@parametrize
|
||||
def test_path_params_create(self, client: Cloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.customs.with_raw_response.create(
|
||||
client.zero_trust.dlp.profiles.custom.with_raw_response.create(
|
||||
account_id="",
|
||||
profiles=[{}, {}, {}],
|
||||
)
|
||||
|
|
@ -70,7 +70,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_method_update(self, client: Cloudflare) -> None:
|
||||
custom = client.zero_trust.dlp.profiles.customs.update(
|
||||
custom = client.zero_trust.dlp.profiles.custom.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -79,7 +79,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
|
||||
custom = client.zero_trust.dlp.profiles.customs.update(
|
||||
custom = client.zero_trust.dlp.profiles.custom.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
allowed_match_count=5,
|
||||
|
|
@ -125,7 +125,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_raw_response_update(self, client: Cloudflare) -> None:
|
||||
response = client.zero_trust.dlp.profiles.customs.with_raw_response.update(
|
||||
response = client.zero_trust.dlp.profiles.custom.with_raw_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -138,7 +138,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_streaming_response_update(self, client: Cloudflare) -> None:
|
||||
with client.zero_trust.dlp.profiles.customs.with_streaming_response.update(
|
||||
with client.zero_trust.dlp.profiles.custom.with_streaming_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -154,13 +154,13 @@ class TestCustoms:
|
|||
@parametrize
|
||||
def test_path_params_update(self, client: Cloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.customs.with_raw_response.update(
|
||||
client.zero_trust.dlp.profiles.custom.with_raw_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.customs.with_raw_response.update(
|
||||
client.zero_trust.dlp.profiles.custom.with_raw_response.update(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -168,7 +168,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_method_delete(self, client: Cloudflare) -> None:
|
||||
custom = client.zero_trust.dlp.profiles.customs.delete(
|
||||
custom = client.zero_trust.dlp.profiles.custom.delete(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -177,7 +177,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_raw_response_delete(self, client: Cloudflare) -> None:
|
||||
response = client.zero_trust.dlp.profiles.customs.with_raw_response.delete(
|
||||
response = client.zero_trust.dlp.profiles.custom.with_raw_response.delete(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -190,7 +190,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_streaming_response_delete(self, client: Cloudflare) -> None:
|
||||
with client.zero_trust.dlp.profiles.customs.with_streaming_response.delete(
|
||||
with client.zero_trust.dlp.profiles.custom.with_streaming_response.delete(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -206,13 +206,13 @@ class TestCustoms:
|
|||
@parametrize
|
||||
def test_path_params_delete(self, client: Cloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.customs.with_raw_response.delete(
|
||||
client.zero_trust.dlp.profiles.custom.with_raw_response.delete(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.customs.with_raw_response.delete(
|
||||
client.zero_trust.dlp.profiles.custom.with_raw_response.delete(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -220,7 +220,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_method_get(self, client: Cloudflare) -> None:
|
||||
custom = client.zero_trust.dlp.profiles.customs.get(
|
||||
custom = client.zero_trust.dlp.profiles.custom.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -229,7 +229,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_raw_response_get(self, client: Cloudflare) -> None:
|
||||
response = client.zero_trust.dlp.profiles.customs.with_raw_response.get(
|
||||
response = client.zero_trust.dlp.profiles.custom.with_raw_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -242,7 +242,7 @@ class TestCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_streaming_response_get(self, client: Cloudflare) -> None:
|
||||
with client.zero_trust.dlp.profiles.customs.with_streaming_response.get(
|
||||
with client.zero_trust.dlp.profiles.custom.with_streaming_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -258,25 +258,25 @@ class TestCustoms:
|
|||
@parametrize
|
||||
def test_path_params_get(self, client: Cloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.customs.with_raw_response.get(
|
||||
client.zero_trust.dlp.profiles.custom.with_raw_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.customs.with_raw_response.get(
|
||||
client.zero_trust.dlp.profiles.custom.with_raw_response.get(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
||||
|
||||
class TestAsyncCustoms:
|
||||
class TestAsyncCustom:
|
||||
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
|
||||
|
||||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
|
||||
custom = await async_client.zero_trust.dlp.profiles.customs.create(
|
||||
custom = await async_client.zero_trust.dlp.profiles.custom.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
profiles=[{}, {}, {}],
|
||||
)
|
||||
|
|
@ -285,7 +285,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.zero_trust.dlp.profiles.customs.with_raw_response.create(
|
||||
response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
profiles=[{}, {}, {}],
|
||||
)
|
||||
|
|
@ -298,7 +298,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.zero_trust.dlp.profiles.customs.with_streaming_response.create(
|
||||
async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.create(
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
profiles=[{}, {}, {}],
|
||||
) as response:
|
||||
|
|
@ -314,7 +314,7 @@ class TestAsyncCustoms:
|
|||
@parametrize
|
||||
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.customs.with_raw_response.create(
|
||||
await async_client.zero_trust.dlp.profiles.custom.with_raw_response.create(
|
||||
account_id="",
|
||||
profiles=[{}, {}, {}],
|
||||
)
|
||||
|
|
@ -322,7 +322,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
|
||||
custom = await async_client.zero_trust.dlp.profiles.customs.update(
|
||||
custom = await async_client.zero_trust.dlp.profiles.custom.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -331,7 +331,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
custom = await async_client.zero_trust.dlp.profiles.customs.update(
|
||||
custom = await async_client.zero_trust.dlp.profiles.custom.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
allowed_match_count=5,
|
||||
|
|
@ -377,7 +377,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.zero_trust.dlp.profiles.customs.with_raw_response.update(
|
||||
response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -390,7 +390,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.zero_trust.dlp.profiles.customs.with_streaming_response.update(
|
||||
async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -406,13 +406,13 @@ class TestAsyncCustoms:
|
|||
@parametrize
|
||||
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.customs.with_raw_response.update(
|
||||
await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.customs.with_raw_response.update(
|
||||
await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -420,7 +420,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
|
||||
custom = await async_client.zero_trust.dlp.profiles.customs.delete(
|
||||
custom = await async_client.zero_trust.dlp.profiles.custom.delete(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -429,7 +429,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.zero_trust.dlp.profiles.customs.with_raw_response.delete(
|
||||
response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -442,7 +442,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.zero_trust.dlp.profiles.customs.with_streaming_response.delete(
|
||||
async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.delete(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -458,13 +458,13 @@ class TestAsyncCustoms:
|
|||
@parametrize
|
||||
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.customs.with_raw_response.delete(
|
||||
await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.customs.with_raw_response.delete(
|
||||
await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -472,7 +472,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
|
||||
custom = await async_client.zero_trust.dlp.profiles.customs.get(
|
||||
custom = await async_client.zero_trust.dlp.profiles.custom.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -481,7 +481,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.zero_trust.dlp.profiles.customs.with_raw_response.get(
|
||||
response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -494,7 +494,7 @@ class TestAsyncCustoms:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.zero_trust.dlp.profiles.customs.with_streaming_response.get(
|
||||
async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -510,13 +510,13 @@ class TestAsyncCustoms:
|
|||
@parametrize
|
||||
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.customs.with_raw_response.get(
|
||||
await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.customs.with_raw_response.get(
|
||||
await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -14,13 +14,13 @@ from cloudflare.types.zero_trust.dlp.profiles import DLPPredefinedProfile
|
|||
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
||||
|
||||
|
||||
class TestPredefineds:
|
||||
class TestPredefined:
|
||||
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
|
||||
|
||||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_method_update(self, client: Cloudflare) -> None:
|
||||
predefined = client.zero_trust.dlp.profiles.predefineds.update(
|
||||
predefined = client.zero_trust.dlp.profiles.predefined.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -29,7 +29,7 @@ class TestPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
|
||||
predefined = client.zero_trust.dlp.profiles.predefineds.update(
|
||||
predefined = client.zero_trust.dlp.profiles.predefined.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
allowed_match_count=5,
|
||||
|
|
@ -44,7 +44,7 @@ class TestPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_raw_response_update(self, client: Cloudflare) -> None:
|
||||
response = client.zero_trust.dlp.profiles.predefineds.with_raw_response.update(
|
||||
response = client.zero_trust.dlp.profiles.predefined.with_raw_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -57,7 +57,7 @@ class TestPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_streaming_response_update(self, client: Cloudflare) -> None:
|
||||
with client.zero_trust.dlp.profiles.predefineds.with_streaming_response.update(
|
||||
with client.zero_trust.dlp.profiles.predefined.with_streaming_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -73,13 +73,13 @@ class TestPredefineds:
|
|||
@parametrize
|
||||
def test_path_params_update(self, client: Cloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.predefineds.with_raw_response.update(
|
||||
client.zero_trust.dlp.profiles.predefined.with_raw_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.predefineds.with_raw_response.update(
|
||||
client.zero_trust.dlp.profiles.predefined.with_raw_response.update(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -87,7 +87,7 @@ class TestPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_method_get(self, client: Cloudflare) -> None:
|
||||
predefined = client.zero_trust.dlp.profiles.predefineds.get(
|
||||
predefined = client.zero_trust.dlp.profiles.predefined.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -96,7 +96,7 @@ class TestPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_raw_response_get(self, client: Cloudflare) -> None:
|
||||
response = client.zero_trust.dlp.profiles.predefineds.with_raw_response.get(
|
||||
response = client.zero_trust.dlp.profiles.predefined.with_raw_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -109,7 +109,7 @@ class TestPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
def test_streaming_response_get(self, client: Cloudflare) -> None:
|
||||
with client.zero_trust.dlp.profiles.predefineds.with_streaming_response.get(
|
||||
with client.zero_trust.dlp.profiles.predefined.with_streaming_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -125,25 +125,25 @@ class TestPredefineds:
|
|||
@parametrize
|
||||
def test_path_params_get(self, client: Cloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.predefineds.with_raw_response.get(
|
||||
client.zero_trust.dlp.profiles.predefined.with_raw_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
client.zero_trust.dlp.profiles.predefineds.with_raw_response.get(
|
||||
client.zero_trust.dlp.profiles.predefined.with_raw_response.get(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
||||
|
||||
class TestAsyncPredefineds:
|
||||
class TestAsyncPredefined:
|
||||
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
|
||||
|
||||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
|
||||
predefined = await async_client.zero_trust.dlp.profiles.predefineds.update(
|
||||
predefined = await async_client.zero_trust.dlp.profiles.predefined.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -152,7 +152,7 @@ class TestAsyncPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
|
||||
predefined = await async_client.zero_trust.dlp.profiles.predefineds.update(
|
||||
predefined = await async_client.zero_trust.dlp.profiles.predefined.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
allowed_match_count=5,
|
||||
|
|
@ -167,7 +167,7 @@ class TestAsyncPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.zero_trust.dlp.profiles.predefineds.with_raw_response.update(
|
||||
response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -180,7 +180,7 @@ class TestAsyncPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.zero_trust.dlp.profiles.predefineds.with_streaming_response.update(
|
||||
async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -196,13 +196,13 @@ class TestAsyncPredefineds:
|
|||
@parametrize
|
||||
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.predefineds.with_raw_response.update(
|
||||
await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.predefineds.with_raw_response.update(
|
||||
await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -210,7 +210,7 @@ class TestAsyncPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
|
||||
predefined = await async_client.zero_trust.dlp.profiles.predefineds.get(
|
||||
predefined = await async_client.zero_trust.dlp.profiles.predefined.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -219,7 +219,7 @@ class TestAsyncPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
|
||||
response = await async_client.zero_trust.dlp.profiles.predefineds.with_raw_response.get(
|
||||
response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
|
|
@ -232,7 +232,7 @@ class TestAsyncPredefineds:
|
|||
@pytest.mark.skip()
|
||||
@parametrize
|
||||
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
|
||||
async with async_client.zero_trust.dlp.profiles.predefineds.with_streaming_response.get(
|
||||
async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
) as response:
|
||||
|
|
@ -248,13 +248,13 @@ class TestAsyncPredefineds:
|
|||
@parametrize
|
||||
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.predefineds.with_raw_response.get(
|
||||
await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get(
|
||||
"384e129d-25bd-403c-8019-bc19eb7a8a5f",
|
||||
account_id="",
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"):
|
||||
await async_client.zero_trust.dlp.profiles.predefineds.with_raw_response.get(
|
||||
await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get(
|
||||
"",
|
||||
account_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
)
|
||||
Loading…
Add table
Reference in a new issue