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

from __future__ import annotations

from datetime import timedelta
from decimal import Decimal
from typing import Literal, TypeAlias, TypedDict

Status: TypeAlias = Literal['ACTIVE', 'INACTIVE']


class Address(TypedDict):
    street: str
    zip: str | None


MD5: TypeAlias = bytes


TraceId: TypeAlias = str


TaxDecimal: TypeAlias = Decimal


Duration: TypeAlias = timedelta


class User(TypedDict):
    id: str
    """
    Stable identifier
    """
    active: bool
    age: int
    visits: int
    score: float
    rating: float
    payload: bytes
    status: Status
    tags: list[str]
    attributes: dict[str, str]
    address: Address
    previous: User | None
    hash: MD5
    traceId: TraceId
    price: Decimal
    tax: TaxDecimal
    flexibleAmount: Decimal
    birthDate: str
    startTime: str
    endTime: str
    createdAt: str
    updatedAt: str
    processedAt: str
    localCreatedAt: str
    localUpdatedAt: str
    localProcessedAt: str
    duration: Duration
    choice: str | int | None
    rawDecimalText: str
