"""
Fluent accessor classes for PolicyPack resources.

Auto-generated from OpenAPI specification.
"""

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ..client import AsyncCredoAI, CredoAI


# =============================================================================
# PolicyPack Fluent Accessors (Sync)
# =============================================================================


class PolicyPackDuplicateAccessor:
    """Access duplicate for a specific policy_pack.

    This accessor provides methods to create
    the duplicate associated with a policy_pack.

    Example:
    """

    def __init__(self, client: "CredoAI", policy_pack_id: str):
        """Initialize the duplicate accessor.

        Args:
            client: The CredoAI client instance
            policy_pack_id: The ID of the parent policy_pack
        """
        self._client = client
        self._policy_pack_id = policy_pack_id


class PolicyPack:
    """Fluent accessor for a specific policy_pack.

    Provides access to related resources through property accessors that enable
    intuitive chaining.

    Example:
        >>> policy_pack = client.policy_pack("policy_pack-id")
        >>> policy_pack.duplicate.get()
    """

    def __init__(self, client: "CredoAI", policy_pack_id: str):
        """Initialize the policy_pack accessor.

        Args:
            client: The CredoAI client instance
            policy_pack_id: The ID of the policy_pack
        """
        self._client = client
        self._policy_pack_id = policy_pack_id

    @property
    def duplicate(self) -> "PolicyPackDuplicateAccessor":
        """Access duplicate associated with this policy_pack.

        Returns:
            PolicyPackDuplicateAccessor: Accessor for duplicate operations
        """
        return PolicyPackDuplicateAccessor(self._client, self._policy_pack_id)


# =============================================================================
# PolicyPack Fluent Accessors (Async)
# =============================================================================


class AsyncPolicyPackDuplicateAccessor:
    """Async access duplicate for a specific policy_pack.

    This accessor provides async methods to create
    the duplicate associated with a policy_pack.

    Example:
    """

    def __init__(self, client: "AsyncCredoAI", policy_pack_id: str):
        """Initialize the async duplicate accessor.

        Args:
            client: The AsyncCredoAI client instance
            policy_pack_id: The ID of the parent policy_pack
        """
        self._client = client
        self._policy_pack_id = policy_pack_id


class AsyncPolicyPack:
    """Async fluent accessor for a specific policy_pack.

    Provides access to related resources through property accessors that enable
    intuitive chaining with async/await.

    Example:
        >>> policy_pack = client.policy_pack("policy_pack-id")
        >>> await policy_pack.duplicate.get()
    """

    def __init__(self, client: "AsyncCredoAI", policy_pack_id: str):
        """Initialize the async policy_pack accessor.

        Args:
            client: The AsyncCredoAI client instance
            policy_pack_id: The ID of the policy_pack
        """
        self._client = client
        self._policy_pack_id = policy_pack_id

    @property
    def duplicate(self) -> "AsyncPolicyPackDuplicateAccessor":
        """Access duplicate associated with this policy_pack.

        Returns:
            AsyncPolicyPackDuplicateAccessor: Async accessor for duplicate operations
        """
        return AsyncPolicyPackDuplicateAccessor(self._client, self._policy_pack_id)


# =============================================================================
# Export list
# =============================================================================

__all__ = [
    "PolicyPack",
    "AsyncPolicyPack",
    "PolicyPackDuplicateAccessor",
    "AsyncPolicyPackDuplicateAccessor",
]
