# generated by datamodel-codegen:
#   filename:  read_only_write_only_ref.yaml
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import BaseModel, RootModel


class ReadOnlyId(RootModel[int]):
    root: int


class WriteOnlySecret(RootModel[str]):
    root: str


class UserRequest(BaseModel):
    name: str
    secret: WriteOnlySecret | None = None


class UserResponse(BaseModel):
    id: ReadOnlyId
    name: str


class User(BaseModel):
    id: ReadOnlyId
    name: str
    secret: WriteOnlySecret | None = None
