# 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 date, datetime, time
from enum import Enum
from typing import Any, Literal
from uuid import UUID

from pydantic import BaseModel, ConfigDict, Field
from typing_extensions import TypeAliasType

Boolean = TypeAliasType("Boolean", bool)
"""
The `Boolean` scalar type represents `true` or `false`.
"""


Date2 = date
"""
The `Date2` scalar represents an ISO-8601 compliant date type. Example `"2024-03-27"`
"""


DateTimeWithMicroseconds = datetime
"""
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"`
"""


DecimalWithPrecisionString = (
    float  # GraphQL serialisiert as string, Python behandelt as float
)
"""
The `DecimalWithPrecisionString` scalar type is a string representation of a decimal number. The type represents fractional signed numeric values with up to `16` digits before the decimal point and up to `8` digits after the decimal point. It can represent values between `-999999999999999.99999999` and `999999999999999.99999999`. Example: `"123456789123.12345678"`
"""


Int = TypeAliasType("Int", int)
"""
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
"""


IntNumberString = (
    int  # GraphQL serialisiert as string, Python behandelt as int (32-bit)
)
"""
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"`
"""


JSON = Any


LongNumberString = (
    int  # GraphQL serialisiert as string, Python behandelt as int (64-bit)
)
"""
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"`
"""


String = TypeAliasType("String", str)
"""
The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
"""


TimeWithMicroseconds = time
"""
The `TimeWithMicroseconds` scalar represents a time type with microsecond precision in format `HH:mm:ss.ffffff`. Example: `"12:34:56.654321"`
"""


UIntNumberString = (
    int  # GraphQL serialisiert as string, Python behandelt as int (unsigned 32-bit)
)
"""
The `UIntNumberString` scalar type is a string representation of a number. The type represents non-fractional unsigned whole numeric values. It can represent values between `0` and `4294967295`. Example: `"1234567"`
"""


"""
The `UUID` scalar type is a string representation of a unique identifier (e. g. a user id) in format `00000000-0000-0000-0000-000000000000`. The empty `UUID` value `00000000-0000-0000-0000-000000000000` is not allowed. Example: `"275EC3E2-06DD-4FA7-AAD3-8B24172E82D9"`
"""


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


class FieldAssignableDataTypeEnumType(Enum):
    BOOLEAN = "BOOLEAN"
    DATE = "DATE"
    DATE_TIME = "DATE_TIME"
    DATE_TIME_OFFSET = "DATE_TIME_OFFSET"
    DECIMAL = "DECIMAL"
    FILE = "FILE"
    GUID = "GUID"
    INT = "INT"
    LONG = "LONG"
    STRING = "STRING"
    TIME = "TIME"
    TIME_SERIES = "TIME_SERIES"


class FieldAuditEventEnumType(Enum):
    ALTERED = "ALTERED"
    CREATED = "CREATED"
    DELETED = "DELETED"
    DROPPED = "DROPPED"
    INSERTED = "INSERTED"
    UPDATED = "UPDATED"


class FieldConflictActionEnumType(Enum):
    IGNORE = "IGNORE"
    RAISE_ERROR = "RAISE_ERROR"


class FieldDataTypeEnumType(Enum):
    BOOLEAN = "BOOLEAN"
    DATE = "DATE"
    DATE_TIME = "DATE_TIME"
    DATE_TIME_OFFSET = "DATE_TIME_OFFSET"
    DECIMAL = "DECIMAL"
    FILE = "FILE"
    GUID = "GUID"
    ID = "ID"
    INSERTED_AT = "INSERTED_AT"
    INSERTED_BY = "INSERTED_BY"
    INT = "INT"
    LONG = "LONG"
    NAVIGATION = "NAVIGATION"
    REFERENCE = "REFERENCE"
    ROW_VERSION = "ROW_VERSION"
    STRING = "STRING"
    TIME = "TIME"
    TIME_SERIES = "TIME_SERIES"
    UPDATED_AT = "UPDATED_AT"
    UPDATED_BY = "UPDATED_BY"


class FieldInventoryPrivilegeEnumType(Enum):
    AUDIT = "AUDIT"
    DELETE = "DELETE"
    INSERT = "INSERT"
    SELECT = "SELECT"
    UPDATE = "UPDATE"


class FieldInventoryPropertyPrivilegeEnumType(Enum):
    INSERT = "INSERT"
    SELECT = "SELECT"
    UPDATE = "UPDATE"


class FieldInventorySortByEnumType(Enum):
    ID = "ID"
    NAME_ = "NAME"


class FieldInventoryTypeEnumType(Enum):
    DATA = "DATA"
    MANY_TO_MANY = "MANY_TO_MANY"


class FieldNoneEnumType(Enum):
    """
    No return value
    """

    NONE = "NONE"


class FieldPermissionStateEnumType(Enum):
    DENY = "DENY"
    GRANT = "GRANT"
    REVOKE = "REVOKE"


class FieldQuotationBehaviorEnumType(Enum):
    """
    Determines how quotations are handled when reading time series data
    """

    LATEST = "LATEST"
    LATEST_EXACTLY_AT = "LATEST_EXACTLY_AT"
    LATEST_NO_FUTURE = "LATEST_NO_FUTURE"


class FieldRelationTypeEnumType(Enum):
    MANY_TO_MANY = "MANY_TO_MANY"
    ONE_TO_MANY = "ONE_TO_MANY"
    ONE_TO_ONE = "ONE_TO_ONE"


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


class FieldValueAlignmentEnumType(Enum):
    """
    Determines how the times in the time series should be aligned when writing time series data
    """

    LEFT = "LEFT"
    NONE = "NONE"
    RIGHT = "RIGHT"


class FieldValueAvailabilityEnumType(Enum):
    """
    Determines whether the values of the time series are available at the beginning or end of the respective measurement period (interval), i.e. whether when loading time series data 'from' is inclusive and 'to' is exclusive (`AT_INTERVAL_BEGIN`), or 'from' is exclusive and 'to' is inclusive (`AT_INTERVAL_END`).
    """

    AT_INTERVAL_BEGIN = "AT_INTERVAL_BEGIN"
    AT_INTERVAL_END = "AT_INTERVAL_END"


class CoreApplyPolicyEnumType(Enum):
    AFTER_RESOLVER = "AFTER_RESOLVER"
    BEFORE_RESOLVER = "BEFORE_RESOLVER"
    VALIDATION = "VALIDATION"


class FieldAuditConnectionType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    """
    A connection to a list of items.
    """

    edges: list[FieldAuditEdgeType] | None = Field(None, description="A list of edges.")
    nodes: list[FieldAuditType | None] | None = Field(
        None, description="A flattened list of the nodes."
    )
    page_info: FieldPageInfoType | None = Field(
        default=None, alias="pageInfo", description="Information to aid in pagination."
    )
    typename__: Literal["FieldAuditConnectionType"] | None = Field(
        "FieldAuditConnectionType", alias="__typename"
    )


class FieldAuditEdgeType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    """
    An edge in a connection.
    """

    cursor: String | None = Field(
        default=None, description="A cursor for use in pagination."
    )
    node: FieldAuditType | None = Field(
        None, description="The item at the end of the edge."
    )
    typename__: Literal["FieldAuditEdgeType"] | None = Field(
        "FieldAuditEdgeType", alias="__typename"
    )


class FieldAuditType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    data: String | None = Field(default=None)
    event: FieldAuditEventEnumType | None = Field(default=None)
    id: LongNumberString | None = Field(default=None)
    inventory_item_id: LongNumberString | None = Field(
        default=None, alias="inventoryItemId"
    )
    inventory_name: String | None = Field(default=None, alias="inventoryName")
    item: JSON | None = Field(default=None)
    namespace_name: String | None = Field(None, alias="namespaceName")
    timestamp: DateTimeWithMicroseconds | None = Field(default=None)
    transaction_id: UIntNumberString | None = Field(default=None, alias="transactionId")
    user_id: UUID | None = Field(default=None, alias="userId")
    typename__: Literal["FieldAuditType"] | None = Field(
        "FieldAuditType", alias="__typename"
    )


class FieldBackgroundJobIdPayloadType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    background_job_id: String | None = Field(default=None, alias="backgroundJobId")
    typename__: Literal["FieldBackgroundJobIdPayloadType"] | None = Field(
        "FieldBackgroundJobIdPayloadType", alias="__typename"
    )


class FieldBackgroundJobType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    executions: list[FieldExecutionType] = Field(default_factory=list)
    id: String | None = Field(default=None)
    is_finished: Boolean | None = Field(default=None, alias="isFinished")
    is_scheduled: Boolean | None = Field(default=None, alias="isScheduled")
    is_successful: Boolean | None = Field(default=None, alias="isSuccessful")
    typename__: Literal["FieldBackgroundJobType"] | None = Field(
        "FieldBackgroundJobType", alias="__typename"
    )


class FieldCharsetType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    value: String | None = None
    typename__: Literal["FieldCharsetType"] | None = Field(
        "FieldCharsetType", alias="__typename"
    )


class FieldEffectiveUserInventoryPermissionsType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    has_audit_permission: Boolean | None = Field(
        default=None, alias="hasAuditPermission"
    )
    has_delete_permission: Boolean | None = Field(
        default=None, alias="hasDeletePermission"
    )
    has_insert_permission: Boolean | None = Field(
        default=None, alias="hasInsertPermission"
    )
    has_policies: Boolean | None = Field(default=None, alias="hasPolicies")
    has_property_permissions: Boolean | None = Field(
        default=None, alias="hasPropertyPermissions"
    )
    has_select_permission: Boolean | None = Field(
        default=None, alias="hasSelectPermission"
    )
    has_update_permission: Boolean | None = Field(
        default=None, alias="hasUpdatePermission"
    )
    inventory_name: String | None = Field(default=None, alias="inventoryName")
    policies: list[FieldEffectiveUserPolicyType] = Field(default_factory=list)
    property_permissions: list[FieldEffectiveUserInventoryPropertyPermissionsType] = (
        Field(..., alias="propertyPermissions")
    )
    typename__: Literal["FieldEffectiveUserInventoryPermissionsType"] | None = Field(
        "FieldEffectiveUserInventoryPermissionsType", alias="__typename"
    )


class FieldEffectiveUserInventoryPropertyPermissionsType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    has_insert_permission: Boolean | None = Field(
        default=None, alias="hasInsertPermission"
    )
    has_select_permission: Boolean | None = Field(
        default=None, alias="hasSelectPermission"
    )
    has_update_permission: Boolean | None = Field(
        default=None, alias="hasUpdatePermission"
    )
    property_name: String | None = Field(default=None, alias="propertyName")
    typename__: Literal["FieldEffectiveUserInventoryPropertyPermissionsType"] | None = (
        Field("FieldEffectiveUserInventoryPropertyPermissionsType", alias="__typename")
    )


class FieldEffectiveUserNamespacePermissionsType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_permissions: list[FieldEffectiveUserInventoryPermissionsType] = Field(
        default_factory=list, alias="inventoryPermissions"
    )
    namespace_name: String | None = Field(None, alias="namespaceName")
    typename__: Literal["FieldEffectiveUserNamespacePermissionsType"] | None = Field(
        "FieldEffectiveUserNamespacePermissionsType", alias="__typename"
    )


class FieldEffectiveUserPermissionsType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    namespace_permissions: list[FieldEffectiveUserNamespacePermissionsType] = Field(
        default_factory=list, alias="namespacePermissions"
    )
    typename__: Literal["FieldEffectiveUserPermissionsType"] | None = Field(
        "FieldEffectiveUserPermissionsType", alias="__typename"
    )


class FieldEffectiveUserPolicyType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    policy_name: String | None = Field(default=None, alias="policyName")
    typename__: Literal["FieldEffectiveUserPolicyType"] | None = Field(
        "FieldEffectiveUserPolicyType", alias="__typename"
    )


class FieldErrorType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    code: String | None = Field(default=None)
    placeholders: JSON | None = Field(default=None)
    text: String | None = Field(default=None)
    typename__: Literal["FieldErrorType"] | None = Field(
        "FieldErrorType", alias="__typename"
    )


class FieldExecutionType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    errors: list[FieldErrorType] = Field(default_factory=list)
    execution_time_utc: DateTimeWithMicroseconds | None = Field(
        default=None, alias="executionTimeUtc"
    )
    typename__: Literal["FieldExecutionType"] | None = Field(
        "FieldExecutionType", alias="__typename"
    )


class FieldIdPayloadType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    field_id: LongNumberString | None = Field(default=None, alias="_id")
    typename__: Literal["FieldIdPayloadType"] | None = Field(
        "FieldIdPayloadType", alias="__typename"
    )


class FieldIntervalType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    """
    The time interval consisting of multiplier and time unit. Examples: `"15 MINUTE"`, `"1 HOUR"`
    """

    multiplier: IntNumberString | None = Field(
        default=None,
        description="The multiplier for the interval. Examples: The '15' of a `\"15 MINUTE\"` interval",
    )
    time_unit: FieldTimeUnitEnumType | None = Field(
        default=None,
        alias="timeUnit",
        description='The time unit for the interval. Examples: `"MINUTE"`, `"HOUR"`',
    )
    typename__: Literal["FieldIntervalType"] | None = Field(
        "FieldIntervalType", alias="__typename"
    )


class FieldInventoryIndexPropertyType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    is_descending: Boolean | None = Field(default=None, alias="isDescending")
    property: FieldInventoryPropertyReferenceType | None = Field(default=None)
    sort_order: IntNumberString | None = Field(default=None, alias="sortOrder")
    typename__: Literal["FieldInventoryIndexPropertyType"] | None = Field(
        "FieldInventoryIndexPropertyType", alias="__typename"
    )


class FieldInventoryIndexReferenceType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    name: String | None = Field(default=None)
    typename__: Literal["FieldInventoryIndexReferenceType"] | None = Field(
        "FieldInventoryIndexReferenceType", alias="__typename"
    )


class FieldInventoryIndexType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    description: String | None = None
    is_system: Boolean | None = Field(default=None, alias="isSystem")
    is_unique: Boolean | None = Field(default=None, alias="isUnique")
    name: String | None = Field(default=None)
    properties: list[FieldInventoryIndexPropertyType] = Field(default_factory=list)
    typename__: Literal["FieldInventoryIndexType"] | None = Field(
        "FieldInventoryIndexType", alias="__typename"
    )


class FieldInventoryPermissionType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    privilege: FieldInventoryPrivilegeEnumType | None = Field(default=None)
    role: FieldRoleReferenceType | None = Field(default=None)
    state: FieldPermissionStateEnumType | None = Field(default=None)
    typename__: Literal["FieldInventoryPermissionType"] | None = Field(
        "FieldInventoryPermissionType", alias="__typename"
    )


class FieldInventoryPolicyType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    description: String | None = None
    name: String | None = Field(default=None)
    property: FieldInventoryPropertyReferenceType | None = Field(default=None)
    role: FieldRoleReferenceType | None = Field(default=None)
    serialized_filter_value: String | None = Field(None, alias="serializedFilterValue")
    typename__: Literal["FieldInventoryPolicyType"] | None = Field(
        "FieldInventoryPolicyType", alias="__typename"
    )


class FieldInventoryPropertyFileType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    max_length: LongNumberString | None = Field(default=None, alias="maxLength")
    typename__: Literal["FieldInventoryPropertyFileType"] | None = Field(
        "FieldInventoryPropertyFileType", alias="__typename"
    )


class FieldInventoryPropertyPermissionType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    privilege: FieldInventoryPropertyPrivilegeEnumType | None = Field(default=None)
    role: FieldRoleReferenceType | None = Field(default=None)
    state: FieldPermissionStateEnumType | None = Field(default=None)
    typename__: Literal["FieldInventoryPropertyPermissionType"] | None = Field(
        "FieldInventoryPropertyPermissionType", alias="__typename"
    )


class FieldInventoryPropertyReferenceType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    field_name: String | None = Field(default=None, alias="fieldName")
    name: String | None = Field(default=None)
    typename__: Literal["FieldInventoryPropertyReferenceType"] | None = Field(
        "FieldInventoryPropertyReferenceType", alias="__typename"
    )


class FieldInventoryPropertyStringType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    is_case_sensitive: Boolean | None = Field(default=None, alias="isCaseSensitive")
    max_length: LongNumberString | None = Field(default=None, alias="maxLength")
    typename__: Literal["FieldInventoryPropertyStringType"] | None = Field(
        "FieldInventoryPropertyStringType", alias="__typename"
    )


class FieldInventoryPropertyTimeSeriesType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    audit_enabled: Boolean | None = Field(default=None, alias="auditEnabled")
    default_aggregation: FieldAggregationEnumType | None = Field(
        None, alias="defaultAggregation"
    )
    default_quotation_behavior: FieldQuotationBehaviorEnumType | None = Field(
        default=None, alias="defaultQuotationBehavior"
    )
    interval: FieldIntervalType | None = Field(default=None)
    quotation_enabled: Boolean | None = Field(default=None, alias="quotationEnabled")
    specifics_per_instance_allowed: Boolean | None = Field(
        default=None, alias="specificsPerInstanceAllowed"
    )
    start_of_time: DateTimeWithMicroseconds | None = Field(
        default=None, alias="startOfTime"
    )
    time_zone: String | None = Field(default=None, alias="timeZone")
    unit: String | None = Field(default=None)
    value_alignment: FieldValueAlignmentEnumType | None = Field(
        default=None, alias="valueAlignment"
    )
    value_availability: FieldValueAvailabilityEnumType | None = Field(
        default=None, alias="valueAvailability"
    )
    typename__: Literal["FieldInventoryPropertyTimeSeriesType"] | None = Field(
        "FieldInventoryPropertyTimeSeriesType", alias="__typename"
    )


class FieldInventoryPropertyType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    child_relation: FieldInventoryRelationReferenceType | None = Field(
        None, alias="childRelation"
    )
    data_type: FieldDataTypeEnumType | None = Field(default=None, alias="dataType")
    description: String | None = None
    field_name: String | None = Field(
        default=None,
        alias="fieldName",
        description="The name of the field used to access the value of this property in GraphQL when queryin or mutating inventory items.",
    )
    file: FieldInventoryPropertyFileType | None = None
    is_array: Boolean | None = Field(default=None, alias="isArray")
    is_required: Boolean | None = Field(default=None, alias="isRequired")
    is_unique: Boolean | None = Field(default=None, alias="isUnique")
    name: String | None = Field(default=None)
    parent_relation: FieldInventoryRelationReferenceType | None = Field(
        None, alias="parentRelation"
    )
    permissions: list[FieldInventoryPropertyPermissionType] = Field(
        default_factory=list
    )
    sort_order: IntNumberString | None = Field(default=None, alias="sortOrder")
    string: FieldInventoryPropertyStringType | None = None
    time_series: FieldInventoryPropertyTimeSeriesType | None = Field(
        None, alias="timeSeries"
    )
    typename__: Literal["FieldInventoryPropertyType"] | None = Field(
        "FieldInventoryPropertyType", alias="__typename"
    )


class FieldInventoryReferenceType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    name: String | None = Field(default=None)
    namespace: FieldNamespaceReferenceType | None = Field(default=None)
    typename__: Literal["FieldInventoryReferenceType"] | None = Field(
        "FieldInventoryReferenceType", alias="__typename"
    )


class FieldInventoryRelationReferenceType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory: FieldInventoryReferenceType | None = Field(default=None)
    is_required: Boolean | None = Field(default=None, alias="isRequired")
    many_to_many_inventory: FieldInventoryReferenceType | None = Field(
        None, alias="manyToManyInventory"
    )
    navigation_property: FieldInventoryPropertyReferenceType | None = Field(
        default=None, alias="navigationProperty"
    )
    reference_property: FieldInventoryPropertyReferenceType | None = Field(
        default=None, alias="referenceProperty"
    )
    relation_type: FieldRelationTypeEnumType | None = Field(
        default=None, alias="relationType"
    )
    typename__: Literal["FieldInventoryRelationReferenceType"] | None = Field(
        "FieldInventoryRelationReferenceType", alias="__typename"
    )


class FieldInventoryRelationType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    child_index: FieldInventoryIndexReferenceType | None = Field(
        default=None, alias="childIndex"
    )
    child_inventory: FieldInventoryReferenceType | None = Field(
        default=None, alias="childInventory"
    )
    child_navigation_property: FieldInventoryPropertyReferenceType | None = Field(
        default=None, alias="childNavigationProperty"
    )
    child_reference_property: FieldInventoryPropertyReferenceType | None = Field(
        default=None, alias="childReferenceProperty"
    )
    is_required: Boolean | None = Field(default=None, alias="isRequired")
    many_to_many_inventory: FieldInventoryReferenceType | None = Field(
        None, alias="manyToManyInventory"
    )
    parent_inventory: FieldInventoryReferenceType | None = Field(
        default=None, alias="parentInventory"
    )
    parent_navigation_property: FieldInventoryPropertyReferenceType | None = Field(
        default=None, alias="parentNavigationProperty"
    )
    parent_reference_property: FieldInventoryPropertyReferenceType | None = Field(
        default=None, alias="parentReferenceProperty"
    )
    relation_type: FieldRelationTypeEnumType | None = Field(
        default=None, alias="relationType"
    )
    typename__: Literal["FieldInventoryRelationType"] | None = Field(
        "FieldInventoryRelationType", alias="__typename"
    )


class FieldInventoryType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    altered_at: DateTimeWithMicroseconds | None = Field(default=None, alias="alteredAt")
    altered_by: UUID | None = Field(default=None, alias="alteredBy")
    audit_enabled: Boolean | None = Field(default=None, alias="auditEnabled")
    child_relations: list[FieldInventoryRelationType] = Field(
        default_factory=list, alias="childRelations"
    )
    created_at: DateTimeWithMicroseconds | None = Field(default=None, alias="createdAt")
    created_by: UUID | None = Field(default=None, alias="createdBy")
    delete_field_name: String | None = Field(
        default=None,
        alias="deleteFieldName",
        description="The name of the field used to delete (remove) items of this inventory in GraphQL.",
    )
    description: String | None = None
    indexes: list[FieldInventoryIndexType] = Field(default_factory=list)
    insert_field_name: String | None = Field(
        default=None,
        alias="insertFieldName",
        description="The name of the field used to insert (create) items of this inventory in GraphQL.",
    )
    inventory_type: FieldInventoryTypeEnumType | None = Field(
        default=None, alias="inventoryType"
    )
    many_to_many_relation: FieldInventoryRelationType | None = Field(
        None, alias="manyToManyRelation"
    )
    name: String | None = Field(default=None)
    namespace: FieldNamespaceReferenceType | None = Field(default=None)
    parent_relations: list[FieldInventoryRelationType] = Field(
        default_factory=list, alias="parentRelations"
    )
    permissions: list[FieldInventoryPermissionType] = Field(default_factory=list)
    policies: list[FieldInventoryPolicyType] = Field(default_factory=list)
    properties: list[FieldInventoryPropertyType] = Field(default_factory=list)
    select_field_name: String | None = Field(
        default=None,
        alias="selectFieldName",
        description="The name of the field used to select (read/query) items of this inventory in GraphQL.",
    )
    update_field_name: String | None = Field(
        default=None,
        alias="updateFieldName",
        description="The name of the field used to update (modify) items of this inventory in GraphQL.",
    )
    typename__: Literal["FieldInventoryType"] | None = Field(
        "FieldInventoryType", alias="__typename"
    )


class FieldItemType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    """
    Contains information about an item.
    """

    field_existed: Boolean | None = Field(
        default=None,
        alias="_existed",
        description="When inserting, indicates whether the item existed according to unique constraints (`true`) or was created (`false`). When updating, indicates whether the item existed according to id and row version and was updated (`true`) or was not found (`false`). When deleting, indicates whether the item existed according to id and row version and was deleted (`true`) or was not found (`false`).",
    )
    field_id: LongNumberString | None = Field(
        default=None, alias="_id", description="The unique identifier of the item."
    )
    field_row_version: IntNumberString | None = Field(
        default=None,
        alias="_rowVersion",
        description='The row version is used to detect whether the data has been changed by another user since it was loaded when updating or deleting data. If the data has been changed, an error will occur. ("Optimistic locking")',
    )
    typename__: Literal["FieldItemType"] | None = Field(
        "FieldItemType", alias="__typename"
    )


class FieldItemsPayloadType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    items: list[FieldItemType] = Field(default_factory=list)
    typename__: Literal["FieldItemsPayloadType"] | None = Field(
        "FieldItemsPayloadType", alias="__typename"
    )


class FieldMePayloadType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    effective_permissions: FieldEffectiveUserPermissionsType | None = Field(
        default=None, alias="effectivePermissions"
    )
    is_administrator: Boolean | None = Field(default=None, alias="isAdministrator")
    role_memberships: list[String] = Field(
        default_factory=list, alias="roleMemberships"
    )
    user_id: UUID | None = Field(default=None, alias="userId")
    user_name: String | None = Field(None, alias="userName")
    typename__: Literal["FieldMePayloadType"] | None = Field(
        "FieldMePayloadType", alias="__typename"
    )


class FieldMediaTypeType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    value: String | None = None
    typename__: Literal["FieldMediaTypeType"] | None = Field(
        "FieldMediaTypeType", alias="__typename"
    )


class FieldMemoryInfoType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    available_percent: DecimalWithPrecisionString | None = Field(
        default=None, alias="availablePercent"
    )
    free_mb: DecimalWithPrecisionString | None = Field(default=None, alias="freeMb")
    total_mb: DecimalWithPrecisionString | None = Field(default=None, alias="totalMb")
    used_mb: DecimalWithPrecisionString | None = Field(default=None, alias="usedMb")
    typename__: Literal["FieldMemoryInfoType"] | None = Field(
        "FieldMemoryInfoType", alias="__typename"
    )


class FieldMessageInfoType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    category: String | None = None
    code: String | None = Field(default=None)
    template: String | None = None
    typename__: Literal["FieldMessageInfoType"] | None = Field(
        "FieldMessageInfoType", alias="__typename"
    )


class FieldNamedItemPayloadType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    existed: Boolean | None = Field(default=None)
    name: String | None = Field(default=None)
    typename__: Literal["FieldNamedItemPayloadType"] | None = Field(
        "FieldNamedItemPayloadType", alias="__typename"
    )


class FieldNamespaceReferenceType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    name: String | None = None
    typename__: Literal["FieldNamespaceReferenceType"] | None = Field(
        "FieldNamespaceReferenceType", alias="__typename"
    )


class FieldNamespaceType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    altered_at: DateTimeWithMicroseconds | None = Field(default=None, alias="alteredAt")
    altered_by: UUID | None = Field(default=None, alias="alteredBy")
    created_at: DateTimeWithMicroseconds | None = Field(default=None, alias="createdAt")
    created_by: UUID | None = Field(default=None, alias="createdBy")
    description: String | None = None
    is_system: Boolean | None = Field(default=None, alias="isSystem")
    name: String | None = None
    typename__: Literal["FieldNamespaceType"] | None = Field(
        "FieldNamespaceType", alias="__typename"
    )


class FieldPageInfoType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    """
    Information about pagination in a connection.
    """

    end_cursor: String | None = Field(
        None,
        alias="endCursor",
        description="When paginating forwards, the cursor to continue.",
    )
    has_next_page: Boolean | None = Field(
        default=None,
        alias="hasNextPage",
        description="Indicates whether more edges exist following the set defined by the clients arguments.",
    )
    has_previous_page: Boolean | None = Field(
        default=None,
        alias="hasPreviousPage",
        description="Indicates whether more edges exist prior the set defined by the clients arguments.",
    )
    start_cursor: String | None = Field(
        None,
        alias="startCursor",
        description="When paginating backwards, the cursor to continue.",
    )
    typename__: Literal["FieldPageInfoType"] | None = Field(
        "FieldPageInfoType", alias="__typename"
    )


class FieldRoleReferenceType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    id: LongNumberString | None = Field(default=None)
    name: String | None = Field(default=None)
    typename__: Literal["FieldRoleReferenceType"] | None = Field(
        "FieldRoleReferenceType", alias="__typename"
    )


class FieldRoleType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    altered_at: DateTimeWithMicroseconds | None = Field(default=None, alias="alteredAt")
    altered_by: UUID | None = Field(default=None, alias="alteredBy")
    created_at: DateTimeWithMicroseconds | None = Field(default=None, alias="createdAt")
    created_by: UUID | None = Field(default=None, alias="createdBy")
    description: String | None = None
    is_system: Boolean | None = Field(default=None, alias="isSystem")
    name: String | None = None
    typename__: Literal["FieldRoleType"] | None = Field(
        "FieldRoleType", alias="__typename"
    )


class FieldSystemInfoType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    database_version: String | None = Field(default=None, alias="databaseVersion")
    dynamic_objects_version: String | None = Field(
        default=None, alias="dynamicObjectsVersion"
    )
    memory_info: FieldMemoryInfoType | None = Field(default=None, alias="memoryInfo")
    message_infos: list[FieldMessageInfoType] = Field(
        default_factory=list, alias="messageInfos"
    )
    typename__: Literal["FieldSystemInfoType"] | None = Field(
        "FieldSystemInfoType", alias="__typename"
    )


class FieldTimeSeriesType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    altered_at: DateTimeWithMicroseconds | None = Field(default=None, alias="alteredAt")
    altered_by: UUID | None = Field(default=None, alias="alteredBy")
    audit_enabled: Boolean | None = Field(default=None, alias="auditEnabled")
    created_at: DateTimeWithMicroseconds | None = Field(default=None, alias="createdAt")
    created_by: UUID | None = Field(default=None, alias="createdBy")
    default_aggregation: FieldAggregationEnumType | None = Field(
        None, alias="defaultAggregation"
    )
    default_quotation_behavior: FieldQuotationBehaviorEnumType | None = Field(
        default=None, alias="defaultQuotationBehavior"
    )
    id: LongNumberString | None = Field(default=None)
    interval: FieldIntervalType | None = Field(default=None)
    inventory_item_id: LongNumberString | None = Field(None, alias="inventoryItemId")
    quotation_enabled: Boolean | None = Field(default=None, alias="quotationEnabled")
    start_of_time: DateTimeWithMicroseconds | None = Field(
        default=None, alias="startOfTime"
    )
    time_zone: String | None = Field(default=None, alias="timeZone")
    unit: String | None = Field(default=None)
    value_alignment: FieldValueAlignmentEnumType | None = Field(
        default=None, alias="valueAlignment"
    )
    value_availability: FieldValueAvailabilityEnumType | None = Field(
        default=None, alias="valueAvailability"
    )
    typename__: Literal["FieldTimeSeriesType"] | None = Field(
        "FieldTimeSeriesType", alias="__typename"
    )


class FieldTimeZoneType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    base_utc_offset: String | None = Field(default=None, alias="baseUtcOffset")
    name: String | None = Field(default=None)
    supports_daylight_saving_time: Boolean | None = Field(
        default=None, alias="supportsDaylightSavingTime"
    )
    typename__: Literal["FieldTimeZoneType"] | None = Field(
        "FieldTimeZoneType", alias="__typename"
    )


class FieldUnitConversionType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    factor: DecimalWithPrecisionString | None = Field(default=None)
    interval: FieldIntervalType | None = None
    offset: DecimalWithPrecisionString | None = Field(default=None)
    source_unit: String | None = Field(None, alias="sourceUnit")
    target_unit: String | None = Field(default=None, alias="targetUnit")
    typename__: Literal["FieldUnitConversionType"] | None = Field(
        "FieldUnitConversionType", alias="__typename"
    )


class FieldUnitType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    aggregation: FieldAggregationEnumType | None = Field(default=None)
    symbol: String | None = Field(default=None)
    typename__: Literal["FieldUnitType"] | None = Field(
        "FieldUnitType", alias="__typename"
    )


class FieldAddInventoryPropertyInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    data_type: FieldAssignableDataTypeEnumType = Field(..., alias="dataType")
    description: String | None = None
    file: FieldCreateInventoryPropertyFileInputType | None = None
    if_exists: FieldConflictActionEnumType = Field(..., alias="ifExists")
    is_array: Boolean = Field(..., alias="isArray")
    is_required: Boolean = Field(..., alias="isRequired")
    is_unique: Boolean = Field(..., alias="isUnique")
    property_name: String = Field(..., alias="propertyName")
    string: FieldCreateInventoryPropertyStringInputType | None = None
    time_series: FieldCreateInventoryPropertyTimeSeriesInputType | None = Field(
        None, alias="timeSeries"
    )
    typename__: Literal["FieldAddInventoryPropertyInputType"] | None = Field(
        "FieldAddInventoryPropertyInputType", alias="__typename"
    )


class FieldAddInventoryRelationInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_exists: FieldConflictActionEnumType = Field(..., alias="ifExists")
    is_required: Boolean | None = Field(None, alias="isRequired")
    parent_inventory_name: String = Field(..., alias="parentInventoryName")
    parent_namespace_name: String | None = Field(None, alias="parentNamespaceName")
    parent_property_name: String = Field(..., alias="parentPropertyName")
    property_name: String = Field(..., alias="propertyName")
    relation_type: FieldRelationTypeEnumType = Field(..., alias="relationType")
    typename__: Literal["FieldAddInventoryRelationInputType"] | None = Field(
        "FieldAddInventoryRelationInputType", alias="__typename"
    )


class FieldAlterInventoryPropertyFileInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    max_length: LongNumberString = Field(
        ...,
        alias="maxLength",
        description="The max length in bytes for the value of the property",
    )
    typename__: Literal["FieldAlterInventoryPropertyFileInputType"] | None = Field(
        "FieldAlterInventoryPropertyFileInputType", alias="__typename"
    )


class FieldAlterInventoryPropertyStringInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    is_case_sensitive: Boolean = Field(
        ...,
        alias="isCaseSensitive",
        description="Determines whether the property is case sensitive or not.",
    )
    max_length: LongNumberString = Field(
        ...,
        alias="maxLength",
        description="The max length in characters for the value of the property",
    )
    typename__: Literal["FieldAlterInventoryPropertyStringInputType"] | None = Field(
        "FieldAlterInventoryPropertyStringInputType", alias="__typename"
    )


class FieldAlterInventoryPropertyTimeSeriesInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    allow_specifics_per_instance: Boolean = Field(
        ...,
        alias="allowSpecificsPerInstance",
        description="Declares whether the time series specifics (like 'unit', 'interval', etc.) are defined per instance of the time series or globally for the inventory property",
    )
    default_aggregation: FieldAggregationEnumType | None = Field(
        None,
        alias="defaultAggregation",
        description="The default aggregation. When `null`, the aggregation of the unit will be used.",
    )
    default_quotation_behavior: FieldQuotationBehaviorEnumType = Field(
        ...,
        alias="defaultQuotationBehavior",
        description="The default quotation behaviour",
    )
    enable_audit: Boolean = Field(..., alias="enableAudit", description="Enable audit")
    enable_quotation: Boolean = Field(
        ..., alias="enableQuotation", description="Enable quotation"
    )
    interval: FieldIntervalInputType = Field(
        ...,
        description='The time interval consisting of multiplier and time unit. Examples: `"15 MINUTE"`, `"1 HOUR"`',
    )
    start_of_time: DateTimeWithMicroseconds | None = Field(
        None,
        alias="startOfTime",
        description='The start of time for the time series. No values can be written before this time. When `null`, `"1970-01-01T00:00:00"` adapted to the time zone of the time series will be used as start time, unless the time unit of the interval is `WEEK`, then `"1970-01-05T00:00:00"` (a monday) adapted to the time zone of the time series will be used as start time. Please note that the start time is relevant for the aggregation of days, weeks, etc. Example: `"2023-01-01T00:00:00Z"`',
    )
    time_zone: String | None = Field(
        "Europe/Berlin",
        alias="timeZone",
        description='The time zone. Examples: `"Europe/Berlin"`, `"Etc/Utc"`',
    )
    unit: String = Field(..., description='The unit. Examples: `"kW"`, `"kWh"`, `"g"`')
    value_alignment: FieldValueAlignmentEnumType = Field(
        ...,
        alias="valueAlignment",
        description="Determines how the times in the time series should be aligned when writing time series data",
    )
    value_availability: FieldValueAvailabilityEnumType = Field(
        ...,
        alias="valueAvailability",
        description="Determines whether the values of the time series are available at the beginning or end of the respective measurement period (interval), i.e. whether when loading time series data 'from' is inclusive and 'to' is exclusive (`AT_INTERVAL_BEGIN`), or 'from' is exclusive and 'to' is inclusive (`AT_INTERVAL_END`).",
    )
    typename__: Literal["FieldAlterInventoryPropertyTimeSeriesInputType"] | None = (
        Field("FieldAlterInventoryPropertyTimeSeriesInputType", alias="__typename")
    )


class FieldAlterInventoryPropertyInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    data_type: FieldAssignableDataTypeEnumType | None = Field(None, alias="dataType")
    description: FieldDescriptionValueInputType | None = None
    file: FieldAlterInventoryPropertyFileInputType | None = None
    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    is_array: Boolean | None = Field(None, alias="isArray")
    is_required: Boolean | None = Field(None, alias="isRequired")
    is_unique: Boolean | None = Field(None, alias="isUnique")
    new_property_name: String | None = Field(None, alias="newPropertyName")
    property_name: String = Field(..., alias="propertyName")
    string: FieldAlterInventoryPropertyStringInputType | None = None
    time_series: FieldAlterInventoryPropertyTimeSeriesInputType | None = Field(
        None, alias="timeSeries"
    )
    typename__: Literal["FieldAlterInventoryPropertyInputType"] | None = Field(
        "FieldAlterInventoryPropertyInputType", alias="__typename"
    )


class FieldAlterInventoryRelationInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    property_name: String = Field(..., alias="propertyName")
    rename_parent_property_name: String | None = Field(
        None, alias="renameParentPropertyName"
    )
    rename_property_name: String | None = Field(None, alias="renamePropertyName")
    typename__: Literal["FieldAlterInventoryRelationInputType"] | None = Field(
        "FieldAlterInventoryRelationInputType", alias="__typename"
    )


class FieldAlterNamespaceInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    description: FieldDescriptionValueInputType | None = None
    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    namespace_name: String = Field(..., alias="namespaceName")
    new_namespace_name: String | None = Field(None, alias="newNamespaceName")
    typename__: Literal["FieldAlterNamespaceInputType"] | None = Field(
        "FieldAlterNamespaceInputType", alias="__typename"
    )


class FieldAlterUnitConversionInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    factor: DecimalWithPrecisionString
    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    interval: FieldIntervalInputType | None = None
    offset: DecimalWithPrecisionString
    source_unit: String | None = Field(None, alias="sourceUnit")
    target_unit: String = Field(..., alias="targetUnit")
    typename__: Literal["FieldAlterUnitConversionInputType"] | None = Field(
        "FieldAlterUnitConversionInputType", alias="__typename"
    )


class FieldAuditInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    before: DateTimeWithMicroseconds = Field(
        ...,
        description="The time up to which audit data is loaded (exclusive, so you can use the 'before' time as next 'from' to query subsequent audit data)",
    )
    from_: DateTimeWithMicroseconds = Field(
        ...,
        alias="from",
        description="The time from which audit data is loaded (inclusive)",
    )
    inventory_item_id: LongNumberString | None = Field(None, alias="inventoryItemId")
    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    user_id: UUID | None = Field(None, alias="userId")
    typename__: Literal["FieldAuditInputType"] | None = Field(
        "FieldAuditInputType", alias="__typename"
    )


class FieldBackgroundJobInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    id: String
    typename__: Literal["FieldBackgroundJobInputType"] | None = Field(
        "FieldBackgroundJobInputType", alias="__typename"
    )


class FieldCreateInventoryPolicyInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    description: String | None = None
    filter_value: Any = Field(
        ...,
        alias="filterValue",
        description='The policy filters items where the value of the property is equal to the filter value (property = filterValue). Example values: `"A"`,`"123"`, `"TenantA"`.',
    )
    if_exists: FieldConflictActionEnumType = Field(..., alias="ifExists")
    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    policy_name: String = Field(..., alias="policyName")
    property_name: String = Field(..., alias="propertyName")
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldCreateInventoryPolicyInputType"] | None = Field(
        "FieldCreateInventoryPolicyInputType", alias="__typename"
    )


class FieldCreateInventoryPropertyFileInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    max_length: LongNumberString = Field(
        ...,
        alias="maxLength",
        description="The max length in bytes for the value of the property",
    )
    typename__: Literal["FieldCreateInventoryPropertyFileInputType"] | None = Field(
        "FieldCreateInventoryPropertyFileInputType", alias="__typename"
    )


class FieldCreateInventoryPropertyStringInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    is_case_sensitive: Boolean = Field(
        ...,
        alias="isCaseSensitive",
        description="Determines whether the property is case sensitive or not.",
    )
    max_length: LongNumberString = Field(
        ...,
        alias="maxLength",
        description="The max length in characters for the value of the property",
    )
    typename__: Literal["FieldCreateInventoryPropertyStringInputType"] | None = Field(
        "FieldCreateInventoryPropertyStringInputType", alias="__typename"
    )


class FieldCreateInventoryPropertyTimeSeriesInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    allow_specifics_per_instance: Boolean = Field(
        ...,
        alias="allowSpecificsPerInstance",
        description="Declares whether the time series specifics (like 'unit', 'interval', etc.) are defined per instance of the time series or globally for the inventory property",
    )
    default_aggregation: FieldAggregationEnumType | None = Field(
        None,
        alias="defaultAggregation",
        description="The default aggregation. When `null`, the aggregation of the unit will be used.",
    )
    default_quotation_behavior: FieldQuotationBehaviorEnumType = Field(
        ...,
        alias="defaultQuotationBehavior",
        description="The default quotation behaviour",
    )
    enable_audit: Boolean = Field(..., alias="enableAudit", description="Enable audit")
    enable_quotation: Boolean = Field(
        ..., alias="enableQuotation", description="Enable quotation"
    )
    interval: FieldIntervalInputType = Field(
        ...,
        description='The time interval consisting of multiplier and time unit. Examples: `"15 MINUTE"`, `"1 HOUR"`',
    )
    start_of_time: DateTimeWithMicroseconds | None = Field(
        None,
        alias="startOfTime",
        description='The start of time for the time series. No values can be written before this time. When `null`, `"1970-01-01T00:00:00"` adapted to the time zone of the time series will be used as start time, unless the time unit of the interval is `WEEK`, then `"1970-01-05T00:00:00"` (a monday) adapted to the time zone of the time series will be used as start time. Please note that the start time is relevant for the aggregation of days, weeks, etc. Example: `"2023-01-01T00:00:00Z"`',
    )
    time_zone: String | None = Field(
        "Europe/Berlin",
        alias="timeZone",
        description='The time zone. Examples: `"Europe/Berlin"`, `"Etc/Utc"`',
    )
    unit: String = Field(..., description='The unit. Examples: `"kW"`, `"kWh"`, `"g"`')
    value_alignment: FieldValueAlignmentEnumType = Field(
        ...,
        alias="valueAlignment",
        description="Determines how the times in the time series should be aligned when writing time series data",
    )
    value_availability: FieldValueAvailabilityEnumType = Field(
        ...,
        alias="valueAvailability",
        description="Determines whether the values of the time series are available at the beginning or end of the respective measurement period (interval), i.e. whether when loading time series data 'from' is inclusive and 'to' is exclusive (`AT_INTERVAL_BEGIN`), or 'from' is exclusive and 'to' is inclusive (`AT_INTERVAL_END`).",
    )
    typename__: Literal["FieldCreateInventoryPropertyTimeSeriesInputType"] | None = (
        Field("FieldCreateInventoryPropertyTimeSeriesInputType", alias="__typename")
    )


class FieldCreateInventoryPropertyInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    data_type: FieldAssignableDataTypeEnumType = Field(..., alias="dataType")
    description: String | None = None
    file: FieldCreateInventoryPropertyFileInputType | None = None
    is_array: Boolean = Field(..., alias="isArray")
    is_required: Boolean = Field(..., alias="isRequired")
    is_unique: Boolean = Field(..., alias="isUnique")
    property_name: String = Field(..., alias="propertyName")
    string: FieldCreateInventoryPropertyStringInputType | None = None
    time_series: FieldCreateInventoryPropertyTimeSeriesInputType | None = Field(
        None, alias="timeSeries"
    )
    typename__: Literal["FieldCreateInventoryPropertyInputType"] | None = Field(
        "FieldCreateInventoryPropertyInputType", alias="__typename"
    )


class FieldCreateInventoryRelationInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    is_required: Boolean | None = Field(None, alias="isRequired")
    parent_inventory_name: String = Field(..., alias="parentInventoryName")
    parent_namespace_name: String | None = Field(None, alias="parentNamespaceName")
    parent_property_name: String = Field(..., alias="parentPropertyName")
    property_name: String = Field(..., alias="propertyName")
    relation_type: FieldRelationTypeEnumType = Field(..., alias="relationType")
    typename__: Literal["FieldCreateInventoryRelationInputType"] | None = Field(
        "FieldCreateInventoryRelationInputType", alias="__typename"
    )


class FieldCreateInventoryInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    description: String | None = None
    enable_audit: Boolean = Field(..., alias="enableAudit")
    if_exists: FieldConflictActionEnumType = Field(..., alias="ifExists")
    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    properties: list[FieldCreateInventoryPropertyInputType]
    relations: list[FieldCreateInventoryRelationInputType]
    typename__: Literal["FieldCreateInventoryInputType"] | None = Field(
        "FieldCreateInventoryInputType", alias="__typename"
    )


class FieldCreateNamespaceInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    description: String | None = None
    if_exists: FieldConflictActionEnumType = Field(..., alias="ifExists")
    namespace_name: String = Field(..., alias="namespaceName")
    typename__: Literal["FieldCreateNamespaceInputType"] | None = Field(
        "FieldCreateNamespaceInputType", alias="__typename"
    )


class FieldCreateRoleInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    description: String | None = None
    if_exists: FieldConflictActionEnumType = Field(..., alias="ifExists")
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldCreateRoleInputType"] | None = Field(
        "FieldCreateRoleInputType", alias="__typename"
    )


class FieldCreateTimeSeriesInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    property_name: String = Field(..., alias="propertyName")
    specifics: FieldTimeSeriesSpecificsInputType | None = None
    typename__: Literal["FieldCreateTimeSeriesInputType"] | None = Field(
        "FieldCreateTimeSeriesInputType", alias="__typename"
    )


class FieldCreateUnitInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    aggregation: FieldAggregationEnumType
    if_exists: FieldConflictActionEnumType = Field(..., alias="ifExists")
    symbol: String
    typename__: Literal["FieldCreateUnitInputType"] | None = Field(
        "FieldCreateUnitInputType", alias="__typename"
    )


class FieldDenyInventoryPermissionsInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    privileges: list[FieldInventoryPrivilegeEnumType]
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldDenyInventoryPermissionsInputType"] | None = Field(
        "FieldDenyInventoryPermissionsInputType", alias="__typename"
    )


class FieldDenyInventoryPropertyPermissionsInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    privileges: list[FieldInventoryPropertyPrivilegeEnumType]
    property_names: list[String] = Field(..., alias="propertyNames")
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldDenyInventoryPropertyPermissionsInputType"] | None = (
        Field("FieldDenyInventoryPropertyPermissionsInputType", alias="__typename")
    )


class FieldDescriptionValueInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    value: String | None = None
    typename__: Literal["FieldDescriptionValueInputType"] | None = Field(
        "FieldDescriptionValueInputType", alias="__typename"
    )


class FieldDropInventoryIndexInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    index_name: String = Field(..., alias="indexName")
    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    typename__: Literal["FieldDropInventoryIndexInputType"] | None = Field(
        "FieldDropInventoryIndexInputType", alias="__typename"
    )


class FieldDropInventoryPolicyInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    policy_name: String = Field(..., alias="policyName")
    typename__: Literal["FieldDropInventoryPolicyInputType"] | None = Field(
        "FieldDropInventoryPolicyInputType", alias="__typename"
    )


class FieldDropInventoryPropertyInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    property_name: String = Field(..., alias="propertyName")
    typename__: Literal["FieldDropInventoryPropertyInputType"] | None = Field(
        "FieldDropInventoryPropertyInputType", alias="__typename"
    )


class FieldDropInventoryRelationInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    property_name: String = Field(..., alias="propertyName")
    typename__: Literal["FieldDropInventoryRelationInputType"] | None = Field(
        "FieldDropInventoryRelationInputType", alias="__typename"
    )


class FieldDropInventoryInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    typename__: Literal["FieldDropInventoryInputType"] | None = Field(
        "FieldDropInventoryInputType", alias="__typename"
    )


class FieldDropNamespaceInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    namespace_name: String = Field(..., alias="namespaceName")
    typename__: Literal["FieldDropNamespaceInputType"] | None = Field(
        "FieldDropNamespaceInputType", alias="__typename"
    )


class FieldDropRoleInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldDropRoleInputType"] | None = Field(
        "FieldDropRoleInputType", alias="__typename"
    )


class FieldDropUnitInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    symbol: String
    typename__: Literal["FieldDropUnitInputType"] | None = Field(
        "FieldDropUnitInputType", alias="__typename"
    )


class FieldGetTimeSeriesInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    time_series_ids: list[LongNumberString] = Field(..., alias="timeSeriesIds")
    typename__: Literal["FieldGetTimeSeriesInputType"] | None = Field(
        "FieldGetTimeSeriesInputType", alias="__typename"
    )


class FieldGrantInventoryPermissionsInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    privileges: list[FieldInventoryPrivilegeEnumType]
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldGrantInventoryPermissionsInputType"] | None = Field(
        "FieldGrantInventoryPermissionsInputType", alias="__typename"
    )


class FieldGrantInventoryPropertyPermissionsInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    privileges: list[FieldInventoryPropertyPrivilegeEnumType]
    property_names: list[String] = Field(..., alias="propertyNames")
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldGrantInventoryPropertyPermissionsInputType"] | None = (
        Field("FieldGrantInventoryPropertyPermissionsInputType", alias="__typename")
    )


class FieldIntervalInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    """
    The time interval consisting of multiplier and time unit. Examples: `"15 MINUTE"`, `"1 HOUR"`
    """

    multiplier: IntNumberString = Field(
        ...,
        description="The multiplier for the interval. Examples: The '15' of a `\"15 MINUTE\"` interval",
    )
    time_unit: FieldTimeUnitEnumType = Field(
        ...,
        alias="timeUnit",
        description='The time unit for the interval. Examples: `"MINUTE"`, `"HOUR"`',
    )
    typename__: Literal["FieldIntervalInputType"] | None = Field(
        "FieldIntervalInputType", alias="__typename"
    )


class FieldInventoryFilterInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_names: list[String] | None = Field(None, alias="inventoryNames")
    namespace_names: list[String | None] | None = Field(None, alias="namespaceNames")
    typename__: Literal["FieldInventoryFilterInputType"] | None = Field(
        "FieldInventoryFilterInputType", alias="__typename"
    )


class FieldInventoryIndexPropertyInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    is_descending: Boolean = Field(..., alias="isDescending")
    property_name: String = Field(..., alias="propertyName")
    typename__: Literal["FieldInventoryIndexPropertyInputType"] | None = Field(
        "FieldInventoryIndexPropertyInputType", alias="__typename"
    )


class FieldInventorySortInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    by: FieldInventorySortByEnumType
    typename__: Literal["FieldInventorySortInputType"] | None = Field(
        "FieldInventorySortInputType", alias="__typename"
    )


class FieldRevokeInventoryPermissionsInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    privileges: list[FieldInventoryPrivilegeEnumType]
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldRevokeInventoryPermissionsInputType"] | None = Field(
        "FieldRevokeInventoryPermissionsInputType", alias="__typename"
    )


class FieldRevokeInventoryPropertyPermissionsInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    privileges: list[FieldInventoryPropertyPrivilegeEnumType]
    property_names: list[String] = Field(..., alias="propertyNames")
    role_name: String = Field(..., alias="roleName")
    typename__: Literal["FieldRevokeInventoryPropertyPermissionsInputType"] | None = (
        Field("FieldRevokeInventoryPropertyPermissionsInputType", alias="__typename")
    )


class FieldStartAlterInventoryInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    add_properties: list[FieldAddInventoryPropertyInputType] = Field(
        ..., alias="addProperties"
    )
    add_relations: list[FieldAddInventoryRelationInputType] = Field(
        ..., alias="addRelations"
    )
    alter_properties: list[FieldAlterInventoryPropertyInputType] = Field(
        ..., alias="alterProperties"
    )
    alter_relations: list[FieldAlterInventoryRelationInputType] = Field(
        ..., alias="alterRelations"
    )
    description: FieldDescriptionValueInputType | None = None
    drop_properties: list[FieldDropInventoryPropertyInputType] = Field(
        ..., alias="dropProperties"
    )
    drop_relations: list[FieldDropInventoryRelationInputType] = Field(
        ..., alias="dropRelations"
    )
    if_not_exists: FieldConflictActionEnumType = Field(..., alias="ifNotExists")
    inventory_name: String = Field(..., alias="inventoryName")
    namespace_name: String | None = Field(None, alias="namespaceName")
    new_inventory_name: String | None = Field(None, alias="newInventoryName")
    typename__: Literal["FieldStartAlterInventoryInputType"] | None = Field(
        "FieldStartAlterInventoryInputType", alias="__typename"
    )


class FieldStartCreateInventoryIndexInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    description: String | None = None
    if_exists: FieldConflictActionEnumType = Field(..., alias="ifExists")
    index_name: String = Field(..., alias="indexName")
    inventory_name: String = Field(..., alias="inventoryName")
    is_unique: Boolean = Field(..., alias="isUnique")
    namespace_name: String | None = Field(None, alias="namespaceName")
    properties: list[FieldInventoryIndexPropertyInputType]
    typename__: Literal["FieldStartCreateInventoryIndexInputType"] | None = Field(
        "FieldStartCreateInventoryIndexInputType", alias="__typename"
    )


class FieldTimeSeriesSpecificsInputType(BaseModel):
    model_config = ConfigDict(populate_by_name=True)

    default_aggregation: FieldAggregationEnumType | None = Field(
        None, alias="defaultAggregation"
    )
    default_quotation_behavior: FieldQuotationBehaviorEnumType | None = Field(
        None,
        alias="defaultQuotationBehavior",
        description="The default quotation behaviour",
    )
    interval: FieldIntervalInputType | None = None
    start_of_time: DateTimeWithMicroseconds | None = Field(None, alias="startOfTime")
    time_zone: String | None = Field(None, alias="timeZone")
    unit: String | None = None
    value_alignment: FieldValueAlignmentEnumType | None = Field(
        None, alias="valueAlignment"
    )
    value_availability: FieldValueAvailabilityEnumType | None = Field(
        None, alias="valueAvailability"
    )
    typename__: Literal["FieldTimeSeriesSpecificsInputType"] | None = Field(
        "FieldTimeSeriesSpecificsInputType", alias="__typename"
    )
