# Generated by oapi-gen 0.1.0. DO NOT EDIT.
# Source SHA256: bc992a4f0e652367ab7756437f7207d1c1db579e44540e68c06834396fc1ce98
from __future__ import annotations

from datetime import datetime
from enum import StrEnum
from typing import Any
from uuid import UUID

from msgspec import UNSET, Struct, UnsetType


class Role(StrEnum):
    admin = "admin"
    geologist = "geologist"
    office_geologist = "office_geologist"
    management = "management"


class LoginRequest(Struct):
    email: str
    password: str


class PasswordResetRequest(Struct):
    email: str


class PasswordResetConfirmRequest(Struct):
    password: str
    token: str


class UpdatePasswordRequest(Struct):
    old_password: str
    new_password: str


class AuthSuccessResponse(Struct):
    message: str | UnsetType = UNSET


class MessageResponse(Struct):
    message: str | UnsetType = UNSET


class CreateUserRequest(Struct):
    email: str
    last_name: str
    first_name: str
    role: Role
    patronymic: str | UnsetType = UNSET


class CreateUserResponse(Struct):
    user_id: UUID


class UserLicenseItem(Struct):
    license_id: int
    license_number: str
    name: str


class ValidationErrorItem(Struct):
    loc: list[str | int]
    msg: str
    type: str
    input: Any | None = None
    ctx: dict[str, Any] | UnsetType = UNSET


class HttpValidationError(Struct):
    detail: list[ValidationErrorItem]


class UpdateUserRequest(Struct):
    last_name: str | UnsetType = UNSET
    first_name: str | UnsetType = UNSET
    patronymic: str | UnsetType = UNSET
    is_active: bool | UnsetType = UNSET
    must_change_password: bool | UnsetType = UNSET
    available_licenses: list[int] | UnsetType = UNSET


class UserItem(Struct):
    user_id: UUID
    email: str
    last_name: str
    first_name: str
    role: Role
    is_active: bool
    must_change_password: bool
    available_licenses: list[UserLicenseItem]
    created_at: datetime
    updated_at: datetime
    patronymic: str | UnsetType = UNSET


class UserListResponse(Struct):
    items: list[UserItem]
    page: int
    page_size: int
    total: int
