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

from __future__ import annotations

from .requests import (
    RequestsResource,
    AsyncRequestsResource,
    RequestsResourceWithRawResponse,
    AsyncRequestsResourceWithRawResponse,
    RequestsResourceWithStreamingResponse,
    AsyncRequestsResourceWithStreamingResponse,
)
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource

__all__ = ["VerificationResource", "AsyncVerificationResource"]


class VerificationResource(SyncAPIResource):
    @cached_property
    def requests(self) -> RequestsResource:
        """Manage your tollfree verification requests"""
        return RequestsResource(self._client)

    @cached_property
    def with_raw_response(self) -> VerificationResourceWithRawResponse:
        """
        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/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
        """
        return VerificationResourceWithRawResponse(self)

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

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


class AsyncVerificationResource(AsyncAPIResource):
    @cached_property
    def requests(self) -> AsyncRequestsResource:
        """Manage your tollfree verification requests"""
        return AsyncRequestsResource(self._client)

    @cached_property
    def with_raw_response(self) -> AsyncVerificationResourceWithRawResponse:
        """
        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/team-telnyx/telnyx-python#accessing-raw-response-data-eg-headers
        """
        return AsyncVerificationResourceWithRawResponse(self)

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

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


class VerificationResourceWithRawResponse:
    def __init__(self, verification: VerificationResource) -> None:
        self._verification = verification

    @cached_property
    def requests(self) -> RequestsResourceWithRawResponse:
        """Manage your tollfree verification requests"""
        return RequestsResourceWithRawResponse(self._verification.requests)


class AsyncVerificationResourceWithRawResponse:
    def __init__(self, verification: AsyncVerificationResource) -> None:
        self._verification = verification

    @cached_property
    def requests(self) -> AsyncRequestsResourceWithRawResponse:
        """Manage your tollfree verification requests"""
        return AsyncRequestsResourceWithRawResponse(self._verification.requests)


class VerificationResourceWithStreamingResponse:
    def __init__(self, verification: VerificationResource) -> None:
        self._verification = verification

    @cached_property
    def requests(self) -> RequestsResourceWithStreamingResponse:
        """Manage your tollfree verification requests"""
        return RequestsResourceWithStreamingResponse(self._verification.requests)


class AsyncVerificationResourceWithStreamingResponse:
    def __init__(self, verification: AsyncVerificationResource) -> None:
        self._verification = verification

    @cached_property
    def requests(self) -> AsyncRequestsResourceWithStreamingResponse:
        """Manage your tollfree verification requests"""
        return AsyncRequestsResourceWithStreamingResponse(self._verification.requests)
