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

from __future__ import annotations

from pydantic import AwareDatetime, BaseModel, RootModel


class ReadOnlyTimestamp(RootModel[AwareDatetime]):
    root: AwareDatetime


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


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


class UserResponse(BaseModel):
    name: str
    created_at: ReadOnlyTimestamp | None = None


class User(BaseModel):
    name: str
    created_at: ReadOnlyTimestamp | None = None
    secret: WriteOnlySecret | None = None
