# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from .limits import (
    LimitsResource,
    AsyncLimitsResource,
    LimitsResourceWithRawResponse,
    AsyncLimitsResourceWithRawResponse,
    LimitsResourceWithStreamingResponse,
    AsyncLimitsResourceWithStreamingResponse,
)
from .patterns import (
    PatternsResource,
    AsyncPatternsResource,
    PatternsResourceWithRawResponse,
    AsyncPatternsResourceWithRawResponse,
    PatternsResourceWithStreamingResponse,
    AsyncPatternsResourceWithStreamingResponse,
)
from .settings import (
    SettingsResource,
    AsyncSettingsResource,
    SettingsResourceWithRawResponse,
    AsyncSettingsResourceWithRawResponse,
    SettingsResourceWithStreamingResponse,
    AsyncSettingsResourceWithStreamingResponse,
)
from ...._compat import cached_property
from .email.email import (
    EmailResource,
    AsyncEmailResource,
    EmailResourceWithRawResponse,
    AsyncEmailResourceWithRawResponse,
    EmailResourceWithStreamingResponse,
    AsyncEmailResourceWithStreamingResponse,
)
from ...._resource import SyncAPIResource, AsyncAPIResource
from .data_classes import (
    DataClassesResource,
    AsyncDataClassesResource,
    DataClassesResourceWithRawResponse,
    AsyncDataClassesResourceWithRawResponse,
    DataClassesResourceWithStreamingResponse,
    AsyncDataClassesResourceWithStreamingResponse,
)
from .payload_logs import (
    PayloadLogsResource,
    AsyncPayloadLogsResource,
    PayloadLogsResourceWithRawResponse,
    AsyncPayloadLogsResourceWithRawResponse,
    PayloadLogsResourceWithStreamingResponse,
    AsyncPayloadLogsResourceWithStreamingResponse,
)
from .entries.entries import (
    EntriesResource,
    AsyncEntriesResource,
    EntriesResourceWithRawResponse,
    AsyncEntriesResourceWithRawResponse,
    EntriesResourceWithStreamingResponse,
    AsyncEntriesResourceWithStreamingResponse,
)
from .datasets.datasets import (
    DatasetsResource,
    AsyncDatasetsResource,
    DatasetsResourceWithRawResponse,
    AsyncDatasetsResourceWithRawResponse,
    DatasetsResourceWithStreamingResponse,
    AsyncDatasetsResourceWithStreamingResponse,
)
from .profiles.profiles import (
    ProfilesResource,
    AsyncProfilesResource,
    ProfilesResourceWithRawResponse,
    AsyncProfilesResourceWithRawResponse,
    ProfilesResourceWithStreamingResponse,
    AsyncProfilesResourceWithStreamingResponse,
)
from .custom_prompt_topics import (
    CustomPromptTopicsResource,
    AsyncCustomPromptTopicsResource,
    CustomPromptTopicsResourceWithRawResponse,
    AsyncCustomPromptTopicsResourceWithRawResponse,
    CustomPromptTopicsResourceWithStreamingResponse,
    AsyncCustomPromptTopicsResourceWithStreamingResponse,
)
from .sensitivity_groups.sensitivity_groups import (
    SensitivityGroupsResource,
    AsyncSensitivityGroupsResource,
    SensitivityGroupsResourceWithRawResponse,
    AsyncSensitivityGroupsResourceWithRawResponse,
    SensitivityGroupsResourceWithStreamingResponse,
    AsyncSensitivityGroupsResourceWithStreamingResponse,
)
from .data_tag_categories.data_tag_categories import (
    DataTagCategoriesResource,
    AsyncDataTagCategoriesResource,
    DataTagCategoriesResourceWithRawResponse,
    AsyncDataTagCategoriesResourceWithRawResponse,
    DataTagCategoriesResourceWithStreamingResponse,
    AsyncDataTagCategoriesResourceWithStreamingResponse,
)

__all__ = ["DLPResource", "AsyncDLPResource"]


class DLPResource(SyncAPIResource):
    @cached_property
    def custom_prompt_topics(self) -> CustomPromptTopicsResource:
        return CustomPromptTopicsResource(self._client)

    @cached_property
    def datasets(self) -> DatasetsResource:
        return DatasetsResource(self._client)

    @cached_property
    def patterns(self) -> PatternsResource:
        return PatternsResource(self._client)

    @cached_property
    def payload_logs(self) -> PayloadLogsResource:
        return PayloadLogsResource(self._client)

    @cached_property
    def settings(self) -> SettingsResource:
        return SettingsResource(self._client)

    @cached_property
    def email(self) -> EmailResource:
        return EmailResource(self._client)

    @cached_property
    def profiles(self) -> ProfilesResource:
        return ProfilesResource(self._client)

    @cached_property
    def limits(self) -> LimitsResource:
        return LimitsResource(self._client)

    @cached_property
    def entries(self) -> EntriesResource:
        return EntriesResource(self._client)

    @cached_property
    def sensitivity_groups(self) -> SensitivityGroupsResource:
        return SensitivityGroupsResource(self._client)

    @cached_property
    def data_tag_categories(self) -> DataTagCategoriesResource:
        return DataTagCategoriesResource(self._client)

    @cached_property
    def data_classes(self) -> DataClassesResource:
        return DataClassesResource(self._client)

    @cached_property
    def with_raw_response(self) -> DLPResourceWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
        """
        return DLPResourceWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> DLPResourceWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
        """
        return DLPResourceWithStreamingResponse(self)


class AsyncDLPResource(AsyncAPIResource):
    @cached_property
    def custom_prompt_topics(self) -> AsyncCustomPromptTopicsResource:
        return AsyncCustomPromptTopicsResource(self._client)

    @cached_property
    def datasets(self) -> AsyncDatasetsResource:
        return AsyncDatasetsResource(self._client)

    @cached_property
    def patterns(self) -> AsyncPatternsResource:
        return AsyncPatternsResource(self._client)

    @cached_property
    def payload_logs(self) -> AsyncPayloadLogsResource:
        return AsyncPayloadLogsResource(self._client)

    @cached_property
    def settings(self) -> AsyncSettingsResource:
        return AsyncSettingsResource(self._client)

    @cached_property
    def email(self) -> AsyncEmailResource:
        return AsyncEmailResource(self._client)

    @cached_property
    def profiles(self) -> AsyncProfilesResource:
        return AsyncProfilesResource(self._client)

    @cached_property
    def limits(self) -> AsyncLimitsResource:
        return AsyncLimitsResource(self._client)

    @cached_property
    def entries(self) -> AsyncEntriesResource:
        return AsyncEntriesResource(self._client)

    @cached_property
    def sensitivity_groups(self) -> AsyncSensitivityGroupsResource:
        return AsyncSensitivityGroupsResource(self._client)

    @cached_property
    def data_tag_categories(self) -> AsyncDataTagCategoriesResource:
        return AsyncDataTagCategoriesResource(self._client)

    @cached_property
    def data_classes(self) -> AsyncDataClassesResource:
        return AsyncDataClassesResource(self._client)

    @cached_property
    def with_raw_response(self) -> AsyncDLPResourceWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
        """
        return AsyncDLPResourceWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> AsyncDLPResourceWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
        """
        return AsyncDLPResourceWithStreamingResponse(self)


class DLPResourceWithRawResponse:
    def __init__(self, dlp: DLPResource) -> None:
        self._dlp = dlp

    @cached_property
    def custom_prompt_topics(self) -> CustomPromptTopicsResourceWithRawResponse:
        return CustomPromptTopicsResourceWithRawResponse(self._dlp.custom_prompt_topics)

    @cached_property
    def datasets(self) -> DatasetsResourceWithRawResponse:
        return DatasetsResourceWithRawResponse(self._dlp.datasets)

    @cached_property
    def patterns(self) -> PatternsResourceWithRawResponse:
        return PatternsResourceWithRawResponse(self._dlp.patterns)

    @cached_property
    def payload_logs(self) -> PayloadLogsResourceWithRawResponse:
        return PayloadLogsResourceWithRawResponse(self._dlp.payload_logs)

    @cached_property
    def settings(self) -> SettingsResourceWithRawResponse:
        return SettingsResourceWithRawResponse(self._dlp.settings)

    @cached_property
    def email(self) -> EmailResourceWithRawResponse:
        return EmailResourceWithRawResponse(self._dlp.email)

    @cached_property
    def profiles(self) -> ProfilesResourceWithRawResponse:
        return ProfilesResourceWithRawResponse(self._dlp.profiles)

    @cached_property
    def limits(self) -> LimitsResourceWithRawResponse:
        return LimitsResourceWithRawResponse(self._dlp.limits)

    @cached_property
    def entries(self) -> EntriesResourceWithRawResponse:
        return EntriesResourceWithRawResponse(self._dlp.entries)

    @cached_property
    def sensitivity_groups(self) -> SensitivityGroupsResourceWithRawResponse:
        return SensitivityGroupsResourceWithRawResponse(self._dlp.sensitivity_groups)

    @cached_property
    def data_tag_categories(self) -> DataTagCategoriesResourceWithRawResponse:
        return DataTagCategoriesResourceWithRawResponse(self._dlp.data_tag_categories)

    @cached_property
    def data_classes(self) -> DataClassesResourceWithRawResponse:
        return DataClassesResourceWithRawResponse(self._dlp.data_classes)


class AsyncDLPResourceWithRawResponse:
    def __init__(self, dlp: AsyncDLPResource) -> None:
        self._dlp = dlp

    @cached_property
    def custom_prompt_topics(self) -> AsyncCustomPromptTopicsResourceWithRawResponse:
        return AsyncCustomPromptTopicsResourceWithRawResponse(self._dlp.custom_prompt_topics)

    @cached_property
    def datasets(self) -> AsyncDatasetsResourceWithRawResponse:
        return AsyncDatasetsResourceWithRawResponse(self._dlp.datasets)

    @cached_property
    def patterns(self) -> AsyncPatternsResourceWithRawResponse:
        return AsyncPatternsResourceWithRawResponse(self._dlp.patterns)

    @cached_property
    def payload_logs(self) -> AsyncPayloadLogsResourceWithRawResponse:
        return AsyncPayloadLogsResourceWithRawResponse(self._dlp.payload_logs)

    @cached_property
    def settings(self) -> AsyncSettingsResourceWithRawResponse:
        return AsyncSettingsResourceWithRawResponse(self._dlp.settings)

    @cached_property
    def email(self) -> AsyncEmailResourceWithRawResponse:
        return AsyncEmailResourceWithRawResponse(self._dlp.email)

    @cached_property
    def profiles(self) -> AsyncProfilesResourceWithRawResponse:
        return AsyncProfilesResourceWithRawResponse(self._dlp.profiles)

    @cached_property
    def limits(self) -> AsyncLimitsResourceWithRawResponse:
        return AsyncLimitsResourceWithRawResponse(self._dlp.limits)

    @cached_property
    def entries(self) -> AsyncEntriesResourceWithRawResponse:
        return AsyncEntriesResourceWithRawResponse(self._dlp.entries)

    @cached_property
    def sensitivity_groups(self) -> AsyncSensitivityGroupsResourceWithRawResponse:
        return AsyncSensitivityGroupsResourceWithRawResponse(self._dlp.sensitivity_groups)

    @cached_property
    def data_tag_categories(self) -> AsyncDataTagCategoriesResourceWithRawResponse:
        return AsyncDataTagCategoriesResourceWithRawResponse(self._dlp.data_tag_categories)

    @cached_property
    def data_classes(self) -> AsyncDataClassesResourceWithRawResponse:
        return AsyncDataClassesResourceWithRawResponse(self._dlp.data_classes)


class DLPResourceWithStreamingResponse:
    def __init__(self, dlp: DLPResource) -> None:
        self._dlp = dlp

    @cached_property
    def custom_prompt_topics(self) -> CustomPromptTopicsResourceWithStreamingResponse:
        return CustomPromptTopicsResourceWithStreamingResponse(self._dlp.custom_prompt_topics)

    @cached_property
    def datasets(self) -> DatasetsResourceWithStreamingResponse:
        return DatasetsResourceWithStreamingResponse(self._dlp.datasets)

    @cached_property
    def patterns(self) -> PatternsResourceWithStreamingResponse:
        return PatternsResourceWithStreamingResponse(self._dlp.patterns)

    @cached_property
    def payload_logs(self) -> PayloadLogsResourceWithStreamingResponse:
        return PayloadLogsResourceWithStreamingResponse(self._dlp.payload_logs)

    @cached_property
    def settings(self) -> SettingsResourceWithStreamingResponse:
        return SettingsResourceWithStreamingResponse(self._dlp.settings)

    @cached_property
    def email(self) -> EmailResourceWithStreamingResponse:
        return EmailResourceWithStreamingResponse(self._dlp.email)

    @cached_property
    def profiles(self) -> ProfilesResourceWithStreamingResponse:
        return ProfilesResourceWithStreamingResponse(self._dlp.profiles)

    @cached_property
    def limits(self) -> LimitsResourceWithStreamingResponse:
        return LimitsResourceWithStreamingResponse(self._dlp.limits)

    @cached_property
    def entries(self) -> EntriesResourceWithStreamingResponse:
        return EntriesResourceWithStreamingResponse(self._dlp.entries)

    @cached_property
    def sensitivity_groups(self) -> SensitivityGroupsResourceWithStreamingResponse:
        return SensitivityGroupsResourceWithStreamingResponse(self._dlp.sensitivity_groups)

    @cached_property
    def data_tag_categories(self) -> DataTagCategoriesResourceWithStreamingResponse:
        return DataTagCategoriesResourceWithStreamingResponse(self._dlp.data_tag_categories)

    @cached_property
    def data_classes(self) -> DataClassesResourceWithStreamingResponse:
        return DataClassesResourceWithStreamingResponse(self._dlp.data_classes)


class AsyncDLPResourceWithStreamingResponse:
    def __init__(self, dlp: AsyncDLPResource) -> None:
        self._dlp = dlp

    @cached_property
    def custom_prompt_topics(self) -> AsyncCustomPromptTopicsResourceWithStreamingResponse:
        return AsyncCustomPromptTopicsResourceWithStreamingResponse(self._dlp.custom_prompt_topics)

    @cached_property
    def datasets(self) -> AsyncDatasetsResourceWithStreamingResponse:
        return AsyncDatasetsResourceWithStreamingResponse(self._dlp.datasets)

    @cached_property
    def patterns(self) -> AsyncPatternsResourceWithStreamingResponse:
        return AsyncPatternsResourceWithStreamingResponse(self._dlp.patterns)

    @cached_property
    def payload_logs(self) -> AsyncPayloadLogsResourceWithStreamingResponse:
        return AsyncPayloadLogsResourceWithStreamingResponse(self._dlp.payload_logs)

    @cached_property
    def settings(self) -> AsyncSettingsResourceWithStreamingResponse:
        return AsyncSettingsResourceWithStreamingResponse(self._dlp.settings)

    @cached_property
    def email(self) -> AsyncEmailResourceWithStreamingResponse:
        return AsyncEmailResourceWithStreamingResponse(self._dlp.email)

    @cached_property
    def profiles(self) -> AsyncProfilesResourceWithStreamingResponse:
        return AsyncProfilesResourceWithStreamingResponse(self._dlp.profiles)

    @cached_property
    def limits(self) -> AsyncLimitsResourceWithStreamingResponse:
        return AsyncLimitsResourceWithStreamingResponse(self._dlp.limits)

    @cached_property
    def entries(self) -> AsyncEntriesResourceWithStreamingResponse:
        return AsyncEntriesResourceWithStreamingResponse(self._dlp.entries)

    @cached_property
    def sensitivity_groups(self) -> AsyncSensitivityGroupsResourceWithStreamingResponse:
        return AsyncSensitivityGroupsResourceWithStreamingResponse(self._dlp.sensitivity_groups)

    @cached_property
    def data_tag_categories(self) -> AsyncDataTagCategoriesResourceWithStreamingResponse:
        return AsyncDataTagCategoriesResourceWithStreamingResponse(self._dlp.data_tag_categories)

    @cached_property
    def data_classes(self) -> AsyncDataClassesResourceWithStreamingResponse:
        return AsyncDataClassesResourceWithStreamingResponse(self._dlp.data_classes)
