# DO NOT EDIT — generated by _client_gen/convenience_emitter.py from convenience.json.
# Regenerate with: cd clients/v2 && python -c "from _client_gen.convenience_emitter import generate_convenience; generate_convenience()"

"""Users API namespace — generated from convenience.json."""

from __future__ import annotations

from typing import Any

from goodmem._api_base.users import UsersAPIBase, AsyncUsersAPIBase


# --- Convenience imports ---
from goodmem.models.user_response import UserResponse


class UsersAPI(UsersAPIBase):
    def get(self, *, email: str | None = None, id: str | None = None) -> UserResponse:
        """Get a user by ID

        Retrieves a specific user by their UUID. This endpoint only accepts user IDs - for email-based lookup, use GET /v1/users/email/{email}. For getting your own profile, use GET /v1/users/me.

        Args:
            email (str, optional): The user's email address. Mutually exclusive with `id` — exactly one must be provided.
            id (str, optional): The user's UUID. Mutually exclusive with `email` — exactly one must be provided.

        Returns:
            UserResponse
        """
        _kw: dict[str, Any] = {}
        if email is not None: _kw["email"] = email
        if id is not None: _kw["id"] = id
        return super().get(**_kw)



class AsyncUsersAPI(AsyncUsersAPIBase):
    async def get(self, *, email: str | None = None, id: str | None = None) -> UserResponse:
        """Get a user by ID

        Retrieves a specific user by their UUID. This endpoint only accepts user IDs - for email-based lookup, use GET /v1/users/email/{email}. For getting your own profile, use GET /v1/users/me.

        Args:
            email (str, optional): The user's email address. Mutually exclusive with `id` — exactly one must be provided.
            id (str, optional): The user's UUID. Mutually exclusive with `email` — exactly one must be provided.

        Returns:
            UserResponse
        """
        _kw: dict[str, Any] = {}
        if email is not None: _kw["email"] = email
        if id is not None: _kw["id"] = id
        return await super().get(**_kw)

