# Generated by ariadne-codegen
# Source: ../schema.graphql

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import RunOnEnum


class AcquireInput(BaseModel):
    acquires: Optional[List[Optional["EntityAcquireInput"]]] = None
    sub_acquires: Optional[List[Optional["AcquireInput"]]] = Field(
        alias="subAcquires", default=None
    )
    step_run_on: RunOnEnum = Field(alias="stepRunOn")
    device_acquires: Optional[List[Optional["EntityAcquireInput"]]] = Field(
        alias="deviceAcquires", default=None
    )
    device_group_acquires: Optional[List[Optional["EntityAcquireInput"]]] = Field(
        alias="deviceGroupAcquires", default=None
    )
    interface_acquires: Optional[List[Optional["EntityAcquireInput"]]] = Field(
        alias="interfaceAcquires", default=None
    )


class EntityAcquireInput(BaseModel):
    resolve_related: Optional[bool] = Field(alias="resolveRelated", default=False)
    query_containing_jmes_expr: str = Field(alias="queryContainingJmesExpr")
    entity: RunOnEnum


class DbUpdatesInput(BaseModel):
    device_updates: Optional[List[Optional["EntityUpdateInput"]]] = Field(
        alias="deviceUpdates", default=None
    )
    group_updates: Optional[List[Optional["EntityUpdateInput"]]] = Field(
        alias="groupUpdates", default=None
    )


class EntityUpdateInput(BaseModel):
    id: str
    path: str
    value: Any
