# Generated by scripts/generate_models.py
# DO NOT EDIT MANUALLY - Run 'uv run python scripts/generate_models.py' to regenerate


from __future__ import annotations

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

from pydantic import BaseModel, ConfigDict, Field


class Aggregation(Enum):
    SUM = "SUM"
    AVERAGE = "AVERAGE"
    MIN = "MIN"
    MAX = "MAX"
    MOST_FREQUENTLY = "MOST_FREQUENTLY"
    ABS_MIN = "ABS_MIN"
    ABS_MAX = "ABS_MAX"
    FIRST_VALUE = "FIRST_VALUE"
    LAST_VALUE = "LAST_VALUE"


class ErrorPayload(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    message: str | None = None
    extensions: dict[str, Any] | None = None


class ErrorsPayload(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    errors: list[ErrorPayload] | None = None


class File(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    id: int = Field(
        ...,
        description='The `LongNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-9223372036854775808` and `9223372036854775807`. Example: `"1234567891234"`',
        examples=["1234567891234"],
    )
    created_by: UUID = Field(..., alias="createdBy")
    created_at: datetime = Field(
        ...,
        alias="createdAt",
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    name: str
    media_type: str = Field(..., alias="mediaType")
    charset: str
    size: int = Field(
        ...,
        description='The `LongNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-9223372036854775808` and `9223372036854775807`. Example: `"1234567891234"`',
        examples=["1234567891234"],
    )
    hash_algorithm: str = Field(..., alias="hashAlgorithm")
    hash_base64: str = Field(..., alias="hashBase64")
    inventory_property_id: int = Field(
        ...,
        alias="inventoryPropertyId",
        description='The `LongNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-9223372036854775808` and `9223372036854775807`. Example: `"1234567891234"`',
        examples=["1234567891234"],
    )
    inventory_item_id: int = Field(
        ...,
        alias="inventoryItemId",
        description='The `LongNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-9223372036854775808` and `9223372036854775807`. Example: `"1234567891234"`',
        examples=["1234567891234"],
    )
    deleted_at: datetime = Field(
        ...,
        alias="deletedAt",
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    storage_delete_attempts: int = Field(
        ...,
        alias="storageDeleteAttempts",
        description='The `IntNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-2147483648` and `2147483647`. Example: `"1234567"`',
        examples=["1234567"],
    )
    audit_enabled: bool = Field(..., alias="auditEnabled")


class Quality(Enum):
    NO_VALUE = "NO_VALUE"
    MANUALLY_REPLACED = "MANUALLY_REPLACED"
    FAULTY = "FAULTY"
    VALID = "VALID"
    SCHEDULE = "SCHEDULE"
    MISSING = "MISSING"
    ACCOUNTED = "ACCOUNTED"
    ESTIMATED = "ESTIMATED"
    INTERPOLATED = "INTERPOLATED"


class QuotationBehavior(Enum):
    LATEST_EXACTLY_AT = "LATEST_EXACTLY_AT"
    LATEST = "LATEST"
    LATEST_NO_FUTURE = "LATEST_NO_FUTURE"


class QuotationValue(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    time: datetime = Field(
        ...,
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    from_: datetime = Field(
        ...,
        alias="from",
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    to: datetime = Field(
        ...,
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )


class Quotations(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    time_series_id: int | None = Field(
        None,
        alias="timeSeriesId",
        description='The `LongNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-9223372036854775808` and `9223372036854775807`. Example: `"1234567891234"`',
        examples=["1234567891234"],
    )
    values: list[QuotationValue] | None = None


class TimeSeriesValue(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    time: datetime = Field(
        ...,
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    value: float = Field(
        ...,
        description='The `DoubleNumberString` scalar type is a string representation of a number. The type represents a fractional floating point numeric value. It complies with the IEC 60559:1989 (IEEE 754) standard for binary floating-point arithmetic. It can represent values between `-1.79769313486232e308` and `1.79769313486232e308`. Example: `"123456.1234"`',
        examples=["123456.1234"],
    )
    quality: Quality | None = None


class TimeUnit(Enum):
    SECOND = "SECOND"
    MINUTE = "MINUTE"
    HOUR = "HOUR"
    DAY = "DAY"
    WEEK = "WEEK"
    MONTH = "MONTH"
    QUARTER = "QUARTER"
    YEAR = "YEAR"


class ValueAlignment(Enum):
    LEFT = "LEFT"
    RIGHT = "RIGHT"
    NONE = "NONE"


class ValueAvailability(Enum):
    AT_INTERVAL_BEGIN = "AT_INTERVAL_BEGIN"
    AT_INTERVAL_END = "AT_INTERVAL_END"


class Interval(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    time_unit: TimeUnit = Field(..., alias="timeUnit")
    multiplier: int = Field(
        ...,
        description='The `IntNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-2147483648` and `2147483647`. Example: `"1234567"`',
        examples=["1234567"],
    )


class SetTimeSeriesDataInput(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    time_series_id: int = Field(
        ...,
        alias="timeSeriesId",
        description='The `LongNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-9223372036854775808` and `9223372036854775807`. Example: `"1234567891234"`',
        examples=["1234567891234"],
    )
    interval: Interval | None = None
    unit: str | None = None
    time_zone: str | None = Field(None, alias="timeZone")
    quotation_time: datetime | None = Field(
        None,
        alias="quotationTime",
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    values: list[TimeSeriesValue]


class TimeSeriesData(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    time_series_id: int | None = Field(
        None,
        alias="timeSeriesId",
        description='The `LongNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-9223372036854775808` and `9223372036854775807`. Example: `"1234567891234"`',
        examples=["1234567891234"],
    )
    interval: Interval | None = None
    unit: str | None = None
    time_zone: str | None = Field(None, alias="timeZone")
    values: list[TimeSeriesValue] | None = None


class TimeSeriesPayload(BaseModel):
    model_config = ConfigDict(
        extra="forbid",
    )
    id: int = Field(
        ...,
        description='The `LongNumberString` scalar type is a string representation of a number. The type represents non-fractional signed whole numeric values. It can represent values between `-9223372036854775808` and `9223372036854775807`. Example: `"1234567891234"`',
        examples=["1234567891234"],
    )
    created_by: UUID = Field(..., alias="createdBy")
    created_at: datetime = Field(
        ...,
        alias="createdAt",
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    altered_by: UUID = Field(..., alias="alteredBy")
    altered_at: datetime = Field(
        ...,
        alias="alteredAt",
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    interval: Interval
    value_alignment: ValueAlignment = Field(..., alias="valueAlignment")
    value_availability: ValueAvailability = Field(..., alias="valueAvailability")
    unit: str
    time_zone: str = Field(..., alias="timeZone")
    default_aggregation: Aggregation = Field(..., alias="defaultAggregation")
    start_of_time: datetime = Field(
        ...,
        alias="startOfTime",
        description="The `DateTimeWithMicroseconds` scalar represents an ISO-8601 compliant date time type with microsecond precision. Please note that values without offset are assumed to be UTC, not local. So values ending with 'Z' and without offset are both assumed to be UTC. Example: `\"2024-03-27T12:34:56.654321+02:00\"`",
        examples=["2024-03-27T12:34:56.321+02:00"],
    )
    audit_enabled: bool = Field(..., alias="auditEnabled")
    quotation_enabled: bool = Field(..., alias="quotationEnabled")
    default_quotation_behavior: QuotationBehavior = Field(
        ..., alias="defaultQuotationBehavior"
    )
