# This file is auto-generated by oagen. Do not edit.

from __future__ import annotations

import functools

from ._base_client import (
    WorkOSClient as _SyncBase,
    AsyncWorkOSClient as _AsyncBase,
)
from .agents._resource import Agents, AsyncAgents
from .multi_factor_auth._resource import MultiFactorAuth, AsyncMultiFactorAuth
from .connect._resource import Connect, AsyncConnect
from .authorization._resource import Authorization, AsyncAuthorization
from .client_api._resource import ClientApi, AsyncClientApi
from .sso._resource import SSO, AsyncSSO
from .pipes._resource import Pipes, AsyncPipes
from .directory_sync._resource import DirectorySync, AsyncDirectorySync
from .events._resource import Events, AsyncEvents
from .feature_flags._resource import FeatureFlags, AsyncFeatureFlags
from .organization_domains._resource import (
    OrganizationDomains,
    AsyncOrganizationDomains,
)
from .organizations._resource import Organizations, AsyncOrganizations
from .api_keys._resource import ApiKeys, AsyncApiKeys
from .pipes_provider._resource import PipesProvider, AsyncPipesProvider
from .groups._resource import Groups, AsyncGroups
from .admin_portal._resource import AdminPortal, AsyncAdminPortal
from .radar._resource import Radar, AsyncRadar
from .user_management._resource import UserManagement, AsyncUserManagement
from .organization_membership._resource import (
    OrganizationMembershipService,
    AsyncOrganizationMembershipService,
)
from .vault._resource import Vault, AsyncVault
from .webhooks._resource import Webhooks, AsyncWebhooks
from .widgets._resource import Widgets, AsyncWidgets
from .audit_logs._resource import AuditLogs, AsyncAuditLogs
from .passwordless import AsyncPasswordless, Passwordless
from .actions import Actions, AsyncActions
from .pkce import PKCE


class WorkOSClient(_SyncBase):
    """Synchronous WorkOS API client with service accessors."""

    @functools.cached_property
    def agents(self) -> Agents:
        """Agents API resources."""
        return Agents(self)

    @functools.cached_property
    def multi_factor_auth(self) -> MultiFactorAuth:
        """Multi Factor Auth API resources."""
        return MultiFactorAuth(self)

    @functools.cached_property
    def connect(self) -> Connect:
        """Connect API resources."""
        return Connect(self)

    @functools.cached_property
    def authorization(self) -> Authorization:
        """Authorization API resources."""
        return Authorization(self)

    @functools.cached_property
    def client_api(self) -> ClientApi:
        """Client Api API resources."""
        return ClientApi(self)

    @functools.cached_property
    def sso(self) -> SSO:
        """SSO API resources."""
        return SSO(self)

    @functools.cached_property
    def pipes(self) -> Pipes:
        """Pipes API resources."""
        return Pipes(self)

    @functools.cached_property
    def directory_sync(self) -> DirectorySync:
        """Directory Sync API resources."""
        return DirectorySync(self)

    @functools.cached_property
    def events(self) -> Events:
        """Events API resources."""
        return Events(self)

    @functools.cached_property
    def feature_flags(self) -> FeatureFlags:
        """Feature Flags API resources."""
        return FeatureFlags(self)

    @functools.cached_property
    def organization_domains(self) -> OrganizationDomains:
        """Organization Domains API resources."""
        return OrganizationDomains(self)

    @functools.cached_property
    def organizations(self) -> Organizations:
        """Organizations API resources."""
        return Organizations(self)

    @functools.cached_property
    def api_keys(self) -> ApiKeys:
        """Api Keys API resources."""
        return ApiKeys(self)

    @functools.cached_property
    def pipes_provider(self) -> PipesProvider:
        """Pipes Provider API resources."""
        return PipesProvider(self)

    @functools.cached_property
    def groups(self) -> Groups:
        """Groups API resources."""
        return Groups(self)

    @functools.cached_property
    def admin_portal(self) -> AdminPortal:
        """Admin Portal API resources."""
        return AdminPortal(self)

    @functools.cached_property
    def radar(self) -> Radar:
        """Radar API resources."""
        return Radar(self)

    @functools.cached_property
    def user_management(self) -> UserManagement:
        """User Management API resources."""
        return UserManagement(self)

    @functools.cached_property
    def organization_membership(self) -> OrganizationMembershipService:
        """Organization Membership Service API resources."""
        return OrganizationMembershipService(self)

    @functools.cached_property
    def vault(self) -> Vault:
        """Vault API resources."""
        return Vault(self)

    @functools.cached_property
    def webhooks(self) -> Webhooks:
        """Webhooks API resources."""
        return Webhooks(self)

    @functools.cached_property
    def widgets(self) -> Widgets:
        """Widgets API resources."""
        return Widgets(self)

    @functools.cached_property
    def audit_logs(self) -> AuditLogs:
        """Audit Logs API resources."""
        return AuditLogs(self)

    @functools.cached_property
    def mfa(self) -> MultiFactorAuth:
        """Alias for multi_factor_auth."""
        return self.multi_factor_auth

    # @oagen-ignore-start — non-spec service accessors (hand-maintained)

    @functools.cached_property
    def passwordless(self) -> Passwordless:
        """Passwordless authentication sessions."""
        return Passwordless(self)

    @functools.cached_property
    def actions(self) -> Actions:
        """Actions logging and audit trail."""
        return Actions()

    @functools.cached_property
    def pkce(self) -> PKCE:
        """PKCE (Proof Key for Code Exchange) utilities."""
        return PKCE()

    # @oagen-ignore-end


class AsyncWorkOSClient(_AsyncBase):
    """Asynchronous WorkOS API client with service accessors."""

    @functools.cached_property
    def agents(self) -> AsyncAgents:
        """Agents API resources."""
        return AsyncAgents(self)

    @functools.cached_property
    def multi_factor_auth(self) -> AsyncMultiFactorAuth:
        """Multi Factor Auth API resources."""
        return AsyncMultiFactorAuth(self)

    @functools.cached_property
    def connect(self) -> AsyncConnect:
        """Connect API resources."""
        return AsyncConnect(self)

    @functools.cached_property
    def authorization(self) -> AsyncAuthorization:
        """Authorization API resources."""
        return AsyncAuthorization(self)

    @functools.cached_property
    def client_api(self) -> AsyncClientApi:
        """Client Api API resources."""
        return AsyncClientApi(self)

    @functools.cached_property
    def sso(self) -> AsyncSSO:
        """SSO API resources."""
        return AsyncSSO(self)

    @functools.cached_property
    def pipes(self) -> AsyncPipes:
        """Pipes API resources."""
        return AsyncPipes(self)

    @functools.cached_property
    def directory_sync(self) -> AsyncDirectorySync:
        """Directory Sync API resources."""
        return AsyncDirectorySync(self)

    @functools.cached_property
    def events(self) -> AsyncEvents:
        """Events API resources."""
        return AsyncEvents(self)

    @functools.cached_property
    def feature_flags(self) -> AsyncFeatureFlags:
        """Feature Flags API resources."""
        return AsyncFeatureFlags(self)

    @functools.cached_property
    def organization_domains(self) -> AsyncOrganizationDomains:
        """Organization Domains API resources."""
        return AsyncOrganizationDomains(self)

    @functools.cached_property
    def organizations(self) -> AsyncOrganizations:
        """Organizations API resources."""
        return AsyncOrganizations(self)

    @functools.cached_property
    def api_keys(self) -> AsyncApiKeys:
        """Api Keys API resources."""
        return AsyncApiKeys(self)

    @functools.cached_property
    def pipes_provider(self) -> AsyncPipesProvider:
        """Pipes Provider API resources."""
        return AsyncPipesProvider(self)

    @functools.cached_property
    def groups(self) -> AsyncGroups:
        """Groups API resources."""
        return AsyncGroups(self)

    @functools.cached_property
    def admin_portal(self) -> AsyncAdminPortal:
        """Admin Portal API resources."""
        return AsyncAdminPortal(self)

    @functools.cached_property
    def radar(self) -> AsyncRadar:
        """Radar API resources."""
        return AsyncRadar(self)

    @functools.cached_property
    def user_management(self) -> AsyncUserManagement:
        """User Management API resources."""
        return AsyncUserManagement(self)

    @functools.cached_property
    def organization_membership(self) -> AsyncOrganizationMembershipService:
        """Organization Membership Service API resources."""
        return AsyncOrganizationMembershipService(self)

    @functools.cached_property
    def vault(self) -> AsyncVault:
        """Vault API resources."""
        return AsyncVault(self)

    @functools.cached_property
    def webhooks(self) -> AsyncWebhooks:
        """Webhooks API resources."""
        return AsyncWebhooks(self)

    @functools.cached_property
    def widgets(self) -> AsyncWidgets:
        """Widgets API resources."""
        return AsyncWidgets(self)

    @functools.cached_property
    def audit_logs(self) -> AsyncAuditLogs:
        """Audit Logs API resources."""
        return AsyncAuditLogs(self)

    @functools.cached_property
    def mfa(self) -> AsyncMultiFactorAuth:
        """Alias for multi_factor_auth."""
        return self.multi_factor_auth

    # @oagen-ignore-start — non-spec service accessors (hand-maintained)

    @functools.cached_property
    def passwordless(self) -> AsyncPasswordless:
        """Passwordless authentication sessions."""
        return AsyncPasswordless(self)

    @functools.cached_property
    def actions(self) -> AsyncActions:
        """Actions logging and audit trail."""
        return AsyncActions()

    @functools.cached_property
    def pkce(self) -> PKCE:
        """PKCE (Proof Key for Code Exchange) utilities."""
        return PKCE()

    # @oagen-ignore-end
