# generated by datamodel-codegen:
#   filename:  <stdin>
#   timestamp: 2024-07-19T07:42:04+00:00

from __future__ import annotations

from enum import Enum
from typing import List, Optional

from pydantic import BaseModel, Field, RootModel


class Plugin(BaseModel):
    type: Optional[str] = None
    """
    Slurm plugin type (if applicable)
    """
    name: Optional[str] = None
    """
    Slurm plugin name (if applicable)
    """
    data_parser: Optional[str] = None
    """
    Slurm data_parser plugin
    """
    accounting_storage: Optional[str] = None
    """
    Slurm accounting plugin
    """


class Client(BaseModel):
    source: Optional[str] = None
    """
    Client source description
    """
    user: Optional[str] = None
    """
    Client user (if known)
    """
    group: Optional[str] = None
    """
    Client group (if known)
    """


class Version(BaseModel):
    major: Optional[str] = None
    """
    Slurm release major version
    """
    micro: Optional[str] = None
    """
    Slurm release micro version
    """
    minor: Optional[str] = None
    """
    Slurm release minor version
    """


class Slurm(BaseModel):
    version: Optional[Version] = None
    release: Optional[str] = None
    """
    Slurm release string
    """
    cluster: Optional[str] = None
    """
    Slurm cluster name
    """


class StringArray(RootModel[List[str]]):
    root: List[str]


class OpenapiError(BaseModel):
    description: Optional[str] = None
    """
    Long form error description
    """
    error_number: Optional[int] = None
    """
    Slurm numeric error identifier
    """
    error: Optional[str] = None
    """
    Short form error description
    """
    source: Optional[str] = None
    """
    Source of error or where error was first detected
    """


class OpenapiWarning(BaseModel):
    description: Optional[str] = None
    """
    Long form warning description
    """
    source: Optional[str] = None
    """
    Source of warning or where warning was first detected
    """


class Uint64NoVal(BaseModel):
    """
    Integer number with flags
    """

    set: Optional[bool] = False
    """
    True if number has been set. False if number is unset
    """
    infinite: Optional[bool] = 0
    """
    True if number has been set to infinite. "set" and "number" will be ignored.
    """
    number: Optional[int] = None
    """
    If set is True the number will be set with value. Otherwise ignore number contents.
    """


class ScheduleExitFields(BaseModel):
    end_job_queue: Optional[int] = None
    default_queue_depth: Optional[int] = None
    max_job_start: Optional[int] = None
    max_rpc_cnt: Optional[int] = None
    max_sched_time: Optional[int] = None
    licenses: Optional[int] = None


class BfExitFields(BaseModel):
    end_job_queue: Optional[int] = None
    bf_max_job_start: Optional[int] = None
    bf_max_job_test: Optional[int] = None
    bf_max_time: Optional[int] = None
    bf_node_space_size: Optional[int] = None
    state_changed: Optional[int] = None


class StatsMsgRpcsByTypeItem(BaseModel):
    """
    RPC
    """

    message_type: Optional[str] = None
    """
    Message type as string
    """
    type_id: Optional[int] = None
    """
    Message type as integer
    """
    count: Optional[int] = None
    """
    Number of RPCs received
    """
    average_time: Optional[int] = None
    """
    Average time spent processing RPC in seconds
    """
    total_time: Optional[int] = None
    """
    Total time spent processing RPC in seconds
    """


class StatsMsgRpcsByType(RootModel[List[StatsMsgRpcsByTypeItem]]):
    """
    RPCs by message type
    """

    root: List[StatsMsgRpcsByTypeItem]
    """
    RPCs by message type
    """


class StatsMsgRpcsByUserItem(BaseModel):
    """
    user
    """

    user: Optional[str] = None
    """
    user name
    """
    user_id: Optional[int] = None
    """
    user id (numeric)
    """
    count: Optional[int] = None
    """
    Number of RPCs received
    """
    average_time: Optional[int] = None
    """
    Average time spent processing RPC in seconds
    """
    total_time: Optional[int] = None
    """
    Total time spent processing RPC in seconds
    """


class StatsMsgRpcsByUser(RootModel[List[StatsMsgRpcsByUserItem]]):
    """
    RPCs by user
    """

    root: List[StatsMsgRpcsByUserItem]
    """
    RPCs by user
    """


class License(BaseModel):
    LicenseName: Optional[str] = None
    Total: Optional[int] = None
    Used: Optional[int] = None
    Free: Optional[int] = None
    Remote: Optional[bool] = None
    Reserved: Optional[int] = None
    LastConsumed: Optional[int] = None
    LastDeficit: Optional[int] = None
    LastUpdate: Optional[int] = None


class ControllerPing(BaseModel):
    hostname: Optional[str] = None
    pinged: Optional[str] = None
    latency: Optional[int] = None
    mode: Optional[str] = None


class Flag(Enum):
    KILL_INVALID_DEPENDENCY = "KILL_INVALID_DEPENDENCY"
    NO_KILL_INVALID_DEPENDENCY = "NO_KILL_INVALID_DEPENDENCY"
    HAS_STATE_DIRECTORY = "HAS_STATE_DIRECTORY"
    TESTING_BACKFILL = "TESTING_BACKFILL"
    GRES_BINDING_ENFORCED = "GRES_BINDING_ENFORCED"
    TEST_NOW_ONLY = "TEST_NOW_ONLY"
    SEND_JOB_ENVIRONMENT = "SEND_JOB_ENVIRONMENT"
    SPREAD_JOB = "SPREAD_JOB"
    PREFER_MINIMUM_NODE_COUNT = "PREFER_MINIMUM_NODE_COUNT"
    JOB_KILL_HURRY = "JOB_KILL_HURRY"
    SKIP_TRES_STRING_ACCOUNTING = "SKIP_TRES_STRING_ACCOUNTING"
    SIBLING_CLUSTER_UPDATE_ONLY = "SIBLING_CLUSTER_UPDATE_ONLY"
    HETEROGENEOUS_JOB = "HETEROGENEOUS_JOB"
    EXACT_TASK_COUNT_REQUESTED = "EXACT_TASK_COUNT_REQUESTED"
    EXACT_CPU_COUNT_REQUESTED = "EXACT_CPU_COUNT_REQUESTED"
    TESTING_WHOLE_NODE_BACKFILL = "TESTING_WHOLE_NODE_BACKFILL"
    TOP_PRIORITY_JOB = "TOP_PRIORITY_JOB"
    ACCRUE_COUNT_CLEARED = "ACCRUE_COUNT_CLEARED"
    GRED_BINDING_DISABLED = "GRED_BINDING_DISABLED"
    JOB_WAS_RUNNING = "JOB_WAS_RUNNING"
    JOB_ACCRUE_TIME_RESET = "JOB_ACCRUE_TIME_RESET"
    CRON_JOB = "CRON_JOB"
    EXACT_MEMORY_REQUESTED = "EXACT_MEMORY_REQUESTED"
    USING_DEFAULT_ACCOUNT = "USING_DEFAULT_ACCOUNT"
    USING_DEFAULT_PARTITION = "USING_DEFAULT_PARTITION"
    USING_DEFAULT_QOS = "USING_DEFAULT_QOS"
    USING_DEFAULT_WCKEY = "USING_DEFAULT_WCKEY"
    DEPENDENT = "DEPENDENT"
    MAGNETIC = "MAGNETIC"
    PARTITION_ASSIGNED = "PARTITION_ASSIGNED"
    BACKFILL_ATTEMPTED = "BACKFILL_ATTEMPTED"
    SCHEDULING_ATTEMPTED = "SCHEDULING_ATTEMPTED"
    SAVE_BATCH_SCRIPT = "SAVE_BATCH_SCRIPT"


class JobStateEnum(Enum):
    PENDING = "PENDING"
    RUNNING = "RUNNING"
    SUSPENDED = "SUSPENDED"
    COMPLETED = "COMPLETED"
    CANCELLED = "CANCELLED"
    FAILED = "FAILED"
    TIMEOUT = "TIMEOUT"
    NODE_FAIL = "NODE_FAIL"
    PREEMPTED = "PREEMPTED"
    BOOT_FAIL = "BOOT_FAIL"
    DEADLINE = "DEADLINE"
    OUT_OF_MEMORY = "OUT_OF_MEMORY"
    LAUNCH_FAILED = "LAUNCH_FAILED"
    UPDATE_DB = "UPDATE_DB"
    REQUEUED = "REQUEUED"
    REQUEUE_HOLD = "REQUEUE_HOLD"
    SPECIAL_EXIT = "SPECIAL_EXIT"
    RESIZING = "RESIZING"
    CONFIGURING = "CONFIGURING"
    COMPLETING = "COMPLETING"
    STOPPED = "STOPPED"
    RECONFIG_FAIL = "RECONFIG_FAIL"
    POWER_UP_NODE = "POWER_UP_NODE"
    REVOKED = "REVOKED"
    REQUEUE_FED = "REQUEUE_FED"
    RESV_DEL_HOLD = "RESV_DEL_HOLD"
    SIGNALING = "SIGNALING"
    STAGE_OUT = "STAGE_OUT"


class MailTypeEnum(Enum):
    BEGIN = "BEGIN"
    END = "END"
    FAIL = "FAIL"
    REQUEUE = "REQUEUE"
    TIME_100_ = "TIME=100%"
    TIME_90_ = "TIME=90%"
    TIME_80_ = "TIME=80%"
    TIME_50_ = "TIME=50%"
    STAGE_OUT = "STAGE_OUT"
    ARRAY_TASKS = "ARRAY_TASKS"
    INVALID_DEPENDENCY = "INVALID_DEPENDENCY"


class FlagModel(Enum):
    EQUAL_POWER = "EQUAL_POWER"


class Power(BaseModel):
    flags: Optional[List[FlagModel]] = None


class ProfileEnum(Enum):
    NOT_SET = "NOT_SET"
    NONE = "NONE"
    ENERGY = "ENERGY"
    LUSTRE = "LUSTRE"
    NETWORK = "NETWORK"
    TASK = "TASK"


class SharedEnum(Enum):
    none = "none"
    oversubscribe = "oversubscribe"
    user = "user"
    mcs = "mcs"


class ExclusiveEnum(Enum):
    true = "true"
    false = "false"
    user = "user"
    mcs = "mcs"


class ShowFlag(Enum):
    ALL = "ALL"
    DETAIL = "DETAIL"
    MIXED = "MIXED"
    LOCAL = "LOCAL"
    SIBLING = "SIBLING"
    FEDERATION = "FEDERATION"
    FUTURE = "FUTURE"


class Uint32NoVal(BaseModel):
    """
    Integer number with flags
    """

    set: Optional[bool] = False
    """
    True if number has been set. False if number is unset
    """
    infinite: Optional[bool] = 0
    """
    True if number has been set to infinite. "set" and "number" will be ignored.
    """
    number: Optional[int] = None
    """
    If set is True the number will be set with value. Otherwise ignore number contents.
    """


class Uint16NoVal(BaseModel):
    """
    Integer number with flags
    """

    set: Optional[bool] = False
    """
    True if number has been set. False if number is unset
    """
    infinite: Optional[bool] = 0
    """
    True if number has been set to infinite. "set" and "number" will be ignored.
    """
    number: Optional[int] = None
    """
    If set is True the number will be set with value. Otherwise ignore number contents.
    """


class Float64NoVal(BaseModel):
    """
    64 bit floating point number with flags
    """

    set: Optional[bool] = False
    """
    True if number has been set. False if number is unset
    """
    infinite: Optional[bool] = 0.0
    """
    True if number has been set to infinite. "set" and "number" will be ignored.
    """
    number: Optional[float] = None
    """
    If set is True the number will be set with value. Otherwise ignore number contents.
    """


class StatusEnum(Enum):
    INVALID = "INVALID"
    PENDING = "PENDING"
    SUCCESS = "SUCCESS"
    ERROR = "ERROR"
    SIGNALED = "SIGNALED"
    CORE_DUMPED = "CORE_DUMPED"


class Signal(BaseModel):
    id: Optional[Uint16NoVal] = None
    """
    Signal sent to process (numeric)
    """
    name: Optional[str] = None
    """
    Signal sent to process
    """


class ProcessExitCodeVerbose(BaseModel):
    status: Optional[List[StatusEnum]] = None
    """
    Status given by return code
    """
    return_code: Optional[Uint32NoVal] = None
    """
    Process return code (numeric)
    """
    signal: Optional[Signal] = None


class JobInfoGresDetail(RootModel[List[str]]):
    root: List[str]


class JobResNodes(RootModel[List]):
    """
    job node resources
    """

    root: List
    """
    job node resources
    """


class CsvString(RootModel[List[str]]):
    root: List[str]


class FlagModel1(Enum):
    KILL_INVALID_DEPENDENCY = "KILL_INVALID_DEPENDENCY"
    NO_KILL_INVALID_DEPENDENCY = "NO_KILL_INVALID_DEPENDENCY"
    HAS_STATE_DIRECTORY = "HAS_STATE_DIRECTORY"
    TESTING_BACKFILL = "TESTING_BACKFILL"
    GRES_BINDING_ENFORCED = "GRES_BINDING_ENFORCED"
    TEST_NOW_ONLY = "TEST_NOW_ONLY"
    SEND_JOB_ENVIRONMENT = "SEND_JOB_ENVIRONMENT"
    SPREAD_JOB = "SPREAD_JOB"
    PREFER_MINIMUM_NODE_COUNT = "PREFER_MINIMUM_NODE_COUNT"
    JOB_KILL_HURRY = "JOB_KILL_HURRY"
    SKIP_TRES_STRING_ACCOUNTING = "SKIP_TRES_STRING_ACCOUNTING"
    SIBLING_CLUSTER_UPDATE_ONLY = "SIBLING_CLUSTER_UPDATE_ONLY"
    HETEROGENEOUS_JOB = "HETEROGENEOUS_JOB"
    EXACT_TASK_COUNT_REQUESTED = "EXACT_TASK_COUNT_REQUESTED"
    EXACT_CPU_COUNT_REQUESTED = "EXACT_CPU_COUNT_REQUESTED"
    TESTING_WHOLE_NODE_BACKFILL = "TESTING_WHOLE_NODE_BACKFILL"
    TOP_PRIORITY_JOB = "TOP_PRIORITY_JOB"
    ACCRUE_COUNT_CLEARED = "ACCRUE_COUNT_CLEARED"
    GRED_BINDING_DISABLED = "GRED_BINDING_DISABLED"
    JOB_WAS_RUNNING = "JOB_WAS_RUNNING"
    JOB_ACCRUE_TIME_RESET = "JOB_ACCRUE_TIME_RESET"
    CRON_JOB = "CRON_JOB"
    EXACT_MEMORY_REQUESTED = "EXACT_MEMORY_REQUESTED"
    USING_DEFAULT_ACCOUNT = "USING_DEFAULT_ACCOUNT"
    USING_DEFAULT_PARTITION = "USING_DEFAULT_PARTITION"
    USING_DEFAULT_QOS = "USING_DEFAULT_QOS"
    USING_DEFAULT_WCKEY = "USING_DEFAULT_WCKEY"
    DEPENDENT = "DEPENDENT"
    MAGNETIC = "MAGNETIC"
    PARTITION_ASSIGNED = "PARTITION_ASSIGNED"
    BACKFILL_ATTEMPTED = "BACKFILL_ATTEMPTED"
    SCHEDULING_ATTEMPTED = "SCHEDULING_ATTEMPTED"
    SAVE_BATCH_SCRIPT = "SAVE_BATCH_SCRIPT"


class CpuBindingFlag(Enum):
    CPU_BIND_TO_THREADS = "CPU_BIND_TO_THREADS"
    CPU_BIND_TO_CORES = "CPU_BIND_TO_CORES"
    CPU_BIND_TO_SOCKETS = "CPU_BIND_TO_SOCKETS"
    CPU_BIND_TO_LDOMS = "CPU_BIND_TO_LDOMS"
    CPU_BIND_NONE = "CPU_BIND_NONE"
    CPU_BIND_RANK = "CPU_BIND_RANK"
    CPU_BIND_MAP = "CPU_BIND_MAP"
    CPU_BIND_MASK = "CPU_BIND_MASK"
    CPU_BIND_LDRANK = "CPU_BIND_LDRANK"
    CPU_BIND_LDMAP = "CPU_BIND_LDMAP"
    CPU_BIND_LDMASK = "CPU_BIND_LDMASK"
    VERBOSE = "VERBOSE"
    CPU_BIND_ONE_THREAD_PER_CORE = "CPU_BIND_ONE_THREAD_PER_CORE"


class Rlimits(BaseModel):
    cpu: Optional[Uint64NoVal] = None
    """
    Per-process CPU limit, in seconds.
    """
    fsize: Optional[Uint64NoVal] = None
    """
    Largest file that can be created, in bytes.
    """
    data: Optional[Uint64NoVal] = None
    """
    Maximum size of data segment, in bytes. 
    """
    stack: Optional[Uint64NoVal] = None
    """
    Maximum size of stack segment, in bytes.
    """
    core: Optional[Uint64NoVal] = None
    """
    Largest core file that can be created, in bytes.
    """
    rss: Optional[Uint64NoVal] = None
    """
    Largest resident set size, in bytes. This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them.
    """
    nproc: Optional[Uint64NoVal] = None
    """
    Number of processes.
    """
    nofile: Optional[Uint64NoVal] = None
    """
    Number of open files.
    """
    memlock: Optional[Uint64NoVal] = None
    """
    Locked-in-memory address space
    """
    as_: Optional[Uint64NoVal] = Field(None, alias="as")
    """
    Address space limit.
    """


class MemoryBindingTypeEnum(Enum):
    NONE = "NONE"
    RANK = "RANK"
    MAP = "MAP"
    MASK = "MASK"
    LOCAL = "LOCAL"
    VERBOSE = "VERBOSE"
    SORT = "SORT"
    PREFER = "PREFER"


class OpenModeEnum(Enum):
    APPEND = "APPEND"
    TRUNCATE = "TRUNCATE"


class PowerFlag(Enum):
    EQUAL_POWER = "EQUAL_POWER"


class KillWarningFlag(Enum):
    BATCH_JOB = "BATCH_JOB"
    ARRAY_TASK = "ARRAY_TASK"
    FULL_STEPS_ONLY = "FULL_STEPS_ONLY"
    FULL_JOB = "FULL_JOB"
    FEDERATION_REQUEUE = "FEDERATION_REQUEUE"
    HURRY = "HURRY"
    OUT_OF_MEMORY = "OUT_OF_MEMORY"
    NO_SIBLING_JOBS = "NO_SIBLING_JOBS"
    RESERVATION_JOB = "RESERVATION_JOB"
    WARNING_SENT = "WARNING_SENT"


class X11Enum(Enum):
    FORWARD_ALL_NODES = "FORWARD_ALL_NODES"
    BATCH_NODE = "BATCH_NODE"
    FIRST_NODE = "FIRST_NODE"
    LAST_NODE = "LAST_NODE"


class FlagModel2(Enum):
    WILD_MINUTE = "WILD_MINUTE"
    WILD_HOUR = "WILD_HOUR"
    WILD_DAY_OF_MONTH = "WILD_DAY_OF_MONTH"
    WILD_MONTH = "WILD_MONTH"
    WILD_DAY_OF_WEEK = "WILD_DAY_OF_WEEK"


class Line(BaseModel):
    start: Optional[int] = None
    end: Optional[int] = None


class CronEntry(BaseModel):
    flags: Optional[List[FlagModel2]] = None
    minute: Optional[str] = None
    hour: Optional[str] = None
    day_of_month: Optional[str] = None
    month: Optional[str] = None
    day_of_week: Optional[str] = None
    specification: Optional[str] = None
    command: Optional[str] = None
    line: Optional[Line] = None


class JobArrayResponseMsgEntry(BaseModel):
    job_id: Optional[int] = None
    """
    JobId for updated Job
    """
    step_id: Optional[str] = None
    """
    StepId for updated Job
    """
    error: Optional[str] = None
    """
    Verbose update status or error
    """
    error_code: Optional[int] = None
    """
    Verbose update status or error
    """
    why: Optional[str] = None
    """
    Update response message
    """


class JobSubmitResponseMsg(BaseModel):
    job_id: Optional[int] = None
    step_id: Optional[str] = None
    error_code: Optional[int] = None
    error: Optional[str] = None
    job_submit_user_msg: Optional[str] = None


class NextStateAfterRebootEnum(Enum):
    INVALID = "INVALID"
    UNKNOWN = "UNKNOWN"
    DOWN = "DOWN"
    IDLE = "IDLE"
    ALLOCATED = "ALLOCATED"
    ERROR = "ERROR"
    MIXED = "MIXED"
    FUTURE = "FUTURE"
    PERFCTRS = "PERFCTRS"
    RESERVED = "RESERVED"
    UNDRAIN = "UNDRAIN"
    CLOUD = "CLOUD"
    RESUME = "RESUME"
    DRAIN = "DRAIN"
    COMPLETING = "COMPLETING"
    NOT_RESPONDING = "NOT_RESPONDING"
    POWERED_DOWN = "POWERED_DOWN"
    FAIL = "FAIL"
    POWERING_UP = "POWERING_UP"
    MAINTENANCE = "MAINTENANCE"
    REBOOT_REQUESTED = "REBOOT_REQUESTED"
    REBOOT_CANCELED = "REBOOT_CANCELED"
    POWERING_DOWN = "POWERING_DOWN"
    DYNAMIC_FUTURE = "DYNAMIC_FUTURE"
    REBOOT_ISSUED = "REBOOT_ISSUED"
    PLANNED = "PLANNED"
    INVALID_REG = "INVALID_REG"
    POWER_DOWN = "POWER_DOWN"
    POWER_UP = "POWER_UP"
    POWER_DRAIN = "POWER_DRAIN"
    DYNAMIC_NORM = "DYNAMIC_NORM"


class StateEnum(Enum):
    INVALID = "INVALID"
    UNKNOWN = "UNKNOWN"
    DOWN = "DOWN"
    IDLE = "IDLE"
    ALLOCATED = "ALLOCATED"
    ERROR = "ERROR"
    MIXED = "MIXED"
    FUTURE = "FUTURE"
    PERFCTRS = "PERFCTRS"
    RESERVED = "RESERVED"
    UNDRAIN = "UNDRAIN"
    CLOUD = "CLOUD"
    RESUME = "RESUME"
    DRAIN = "DRAIN"
    COMPLETING = "COMPLETING"
    NOT_RESPONDING = "NOT_RESPONDING"
    POWERED_DOWN = "POWERED_DOWN"
    FAIL = "FAIL"
    POWERING_UP = "POWERING_UP"
    MAINTENANCE = "MAINTENANCE"
    REBOOT_REQUESTED = "REBOOT_REQUESTED"
    REBOOT_CANCELED = "REBOOT_CANCELED"
    POWERING_DOWN = "POWERING_DOWN"
    DYNAMIC_FUTURE = "DYNAMIC_FUTURE"
    REBOOT_ISSUED = "REBOOT_ISSUED"
    PLANNED = "PLANNED"
    INVALID_REG = "INVALID_REG"
    POWER_DOWN = "POWER_DOWN"
    POWER_UP = "POWER_UP"
    POWER_DRAIN = "POWER_DRAIN"
    DYNAMIC_NORM = "DYNAMIC_NORM"


class AcctGatherEnergy(BaseModel):
    average_watts: Optional[int] = None
    base_consumed_energy: Optional[int] = None
    consumed_energy: Optional[int] = None
    current_watts: Optional[Uint32NoVal] = None
    previous_consumed_energy: Optional[int] = None
    last_collected: Optional[int] = None


class ExtSensorsData(BaseModel):
    consumed_energy: Optional[Uint64NoVal] = None
    temperature: Optional[Uint32NoVal] = None
    energy_update_time: Optional[int] = None
    current_watts: Optional[int] = None


class PowerMgmtData(BaseModel):
    maximum_watts: Optional[Uint32NoVal] = None
    current_watts: Optional[int] = None
    total_energy: Optional[int] = None
    new_maximum_watts: Optional[int] = None
    peak_watts: Optional[int] = None
    lowest_watts: Optional[int] = None
    new_job_time: Optional[Uint64NoVal] = None
    state: Optional[int] = None
    time_start_day: Optional[int] = None


class HostlistString(RootModel[List[str]]):
    root: List[str]


class Nodes(BaseModel):
    allowed_allocation: Optional[str] = None
    configured: Optional[str] = None
    total: Optional[int] = None


class Accounts(BaseModel):
    allowed: Optional[str] = None
    deny: Optional[str] = None


class Groups(BaseModel):
    allowed: Optional[str] = None


class Qos(BaseModel):
    allowed: Optional[str] = None
    deny: Optional[str] = None
    assigned: Optional[str] = None


class Tres(BaseModel):
    billing_weights: Optional[str] = None
    configured: Optional[str] = None


class Cpus(BaseModel):
    task_binding: Optional[int] = None
    total: Optional[int] = None


class Defaults(BaseModel):
    memory_per_cpu: Optional[int] = None
    partition_memory_per_cpu: Optional[Uint64NoVal] = None
    partition_memory_per_node: Optional[Uint64NoVal] = None
    time: Optional[Uint32NoVal] = None
    job: Optional[str] = None


class FlagModel3(Enum):
    force = "force"


class Oversubscribe(BaseModel):
    jobs: Optional[int] = None
    flags: Optional[List[FlagModel3]] = None


class Maximums(BaseModel):
    cpus_per_node: Optional[Uint32NoVal] = None
    cpus_per_socket: Optional[Uint32NoVal] = None
    memory_per_cpu: Optional[int] = None
    partition_memory_per_cpu: Optional[Uint64NoVal] = None
    partition_memory_per_node: Optional[Uint64NoVal] = None
    nodes: Optional[Uint32NoVal] = None
    shares: Optional[int] = None
    oversubscribe: Optional[Oversubscribe] = None
    time: Optional[Uint32NoVal] = None
    over_time_limit: Optional[Uint16NoVal] = None


class Minimums(BaseModel):
    nodes: Optional[int] = None


class Priority(BaseModel):
    job_factor: Optional[int] = None
    tier: Optional[int] = None


class Timeouts(BaseModel):
    resume: Optional[Uint16NoVal] = None
    suspend: Optional[Uint16NoVal] = None


class StateEnumModel(Enum):
    INACTIVE = "INACTIVE"
    UNKNOWN = "UNKNOWN"
    UP = "UP"
    DOWN = "DOWN"
    DRAIN = "DRAIN"


class Partition(BaseModel):
    state: Optional[List[StateEnumModel]] = None


class PartitionInfo(BaseModel):
    nodes: Optional[Nodes] = None
    accounts: Optional[Accounts] = None
    groups: Optional[Groups] = None
    qos: Optional[Qos] = None
    alternate: Optional[str] = None
    tres: Optional[Tres] = None
    cluster: Optional[str] = None
    cpus: Optional[Cpus] = None
    defaults: Optional[Defaults] = None
    grace_time: Optional[int] = None
    maximums: Optional[Maximums] = None
    minimums: Optional[Minimums] = None
    name: Optional[str] = None
    node_sets: Optional[str] = None
    priority: Optional[Priority] = None
    timeouts: Optional[Timeouts] = None
    partition: Optional[Partition] = None
    suspend_time: Optional[Uint32NoVal] = None


class FlagModel4(Enum):
    MAINT = "MAINT"
    NO_MAINT = "NO_MAINT"
    DAILY = "DAILY"
    NO_DAILY = "NO_DAILY"
    WEEKLY = "WEEKLY"
    NO_WEEKLY = "NO_WEEKLY"
    IGNORE_JOBS = "IGNORE_JOBS"
    NO_IGNORE_JOBS = "NO_IGNORE_JOBS"
    ANY_NODES = "ANY_NODES"
    STATIC = "STATIC"
    NO_STATIC = "NO_STATIC"
    PART_NODES = "PART_NODES"
    NO_PART_NODES = "NO_PART_NODES"
    OVERLAP = "OVERLAP"
    SPEC_NODES = "SPEC_NODES"
    TIME_FLOAT = "TIME_FLOAT"
    REPLACE = "REPLACE"
    ALL_NODES = "ALL_NODES"
    PURGE_COMP = "PURGE_COMP"
    WEEKDAY = "WEEKDAY"
    NO_WEEKDAY = "NO_WEEKDAY"
    WEEKEND = "WEEKEND"
    NO_WEEKEND = "NO_WEEKEND"
    FLEX = "FLEX"
    NO_FLEX = "NO_FLEX"
    DURATION_PLUS = "DURATION_PLUS"
    DURATION_MINUS = "DURATION_MINUS"
    NO_HOLD_JOBS_AFTER_END = "NO_HOLD_JOBS_AFTER_END"
    NO_PURGE_COMP = "NO_PURGE_COMP"
    MAGNETIC = "MAGNETIC"
    SKIP = "SKIP"
    HOURLY = "HOURLY"
    NO_HOURLY = "NO_HOURLY"
    REOCCURRING = "REOCCURRING"


class PurgeCompleted(BaseModel):
    time: Optional[Uint32NoVal] = None


class ReservationCoreSpec(BaseModel):
    node: Optional[str] = None
    core: Optional[str] = None


class Fairshare(BaseModel):
    factor: Optional[float] = None
    """
    fairshare factor
    """
    level: Optional[float] = None
    """
    fairshare factor at this level. stored on an assoc as a long double, but that is not needed for display in sshare
    """


class TypeEnum(Enum):
    USER = "USER"
    ASSOCIATION = "ASSOCIATION"


class SharesUint64Tres(BaseModel):
    name: Optional[str] = None
    """
    TRES name
    """
    value: Optional[Uint64NoVal] = None
    """
    TRES value
    """


class SharesFloat128Tres(BaseModel):
    name: Optional[str] = None
    """
    TRES name
    """
    value: Optional[float] = None
    """
    TRES value
    """


class Comment(BaseModel):
    administrator: Optional[str] = None
    job: Optional[str] = None
    system: Optional[str] = None


class Running(BaseModel):
    tasks: Optional[int] = None


class Max(BaseModel):
    running: Optional[Running] = None


class Limits(BaseModel):
    max: Optional[Max] = None


class Array(BaseModel):
    job_id: Optional[int] = None
    limits: Optional[Limits] = None
    task_id: Optional[Uint32NoVal] = None
    task: Optional[str] = None


class System(BaseModel):
    seconds: Optional[int] = None
    microseconds: Optional[int] = None


class Total(BaseModel):
    seconds: Optional[int] = None
    microseconds: Optional[int] = None


class User(BaseModel):
    seconds: Optional[int] = None
    microseconds: Optional[int] = None


class Time(BaseModel):
    elapsed: Optional[int] = None
    eligible: Optional[int] = None
    end: Optional[int] = None
    start: Optional[int] = None
    submission: Optional[int] = None
    suspended: Optional[int] = None
    system: Optional[System] = None
    limit: Optional[Uint32NoVal] = None
    total: Optional[Total] = None
    user: Optional[User] = None


class FlagModel5(Enum):
    NONE = "NONE"
    CLEAR_SCHEDULING = "CLEAR_SCHEDULING"
    NOT_SET = "NOT_SET"
    STARTED_ON_SUBMIT = "STARTED_ON_SUBMIT"
    STARTED_ON_SCHEDULE = "STARTED_ON_SCHEDULE"
    STARTED_ON_BACKFILL = "STARTED_ON_BACKFILL"
    START_RECEIVED = "START_RECEIVED"


class Het(BaseModel):
    job_id: Optional[int] = None
    job_offset: Optional[Uint32NoVal] = None


class Mcs(BaseModel):
    label: Optional[str] = None


class Required(BaseModel):
    CPUs: Optional[int] = None
    memory_per_cpu: Optional[Uint64NoVal] = None
    memory_per_node: Optional[Uint64NoVal] = None


class Reservation(BaseModel):
    id: Optional[int] = None
    name: Optional[str] = None


class CurrentEnum(Enum):
    PENDING = "PENDING"
    RUNNING = "RUNNING"
    SUSPENDED = "SUSPENDED"
    COMPLETED = "COMPLETED"
    CANCELLED = "CANCELLED"
    FAILED = "FAILED"
    TIMEOUT = "TIMEOUT"
    NODE_FAIL = "NODE_FAIL"
    PREEMPTED = "PREEMPTED"
    BOOT_FAIL = "BOOT_FAIL"
    DEADLINE = "DEADLINE"
    OUT_OF_MEMORY = "OUT_OF_MEMORY"
    LAUNCH_FAILED = "LAUNCH_FAILED"
    UPDATE_DB = "UPDATE_DB"
    REQUEUED = "REQUEUED"
    REQUEUE_HOLD = "REQUEUE_HOLD"
    SPECIAL_EXIT = "SPECIAL_EXIT"
    RESIZING = "RESIZING"
    CONFIGURING = "CONFIGURING"
    COMPLETING = "COMPLETING"
    STOPPED = "STOPPED"
    RECONFIG_FAIL = "RECONFIG_FAIL"
    POWER_UP_NODE = "POWER_UP_NODE"
    REVOKED = "REVOKED"
    REQUEUE_FED = "REQUEUE_FED"
    RESV_DEL_HOLD = "RESV_DEL_HOLD"
    SIGNALING = "SIGNALING"
    STAGE_OUT = "STAGE_OUT"


class State(BaseModel):
    current: Optional[List[CurrentEnum]] = None
    reason: Optional[str] = None


class AssocShort(BaseModel):
    account: Optional[str] = None
    """
    Association account (if assigned)
    """
    cluster: Optional[str] = None
    """
    Association cluster (if assigned)
    """
    partition: Optional[str] = None
    """
    Association partition (if assigned)
    """
    user: str
    """
    Assocation user (if assigned)
    """
    id: Optional[int] = None
    """
    Numeric Association ID (if known)
    """


class TimeModel(BaseModel):
    elapsed: Optional[int] = None
    end: Optional[Uint64NoVal] = None
    start: Optional[Uint64NoVal] = None
    suspended: Optional[int] = None
    system: Optional[System] = None
    total: Optional[Total] = None
    user: Optional[User] = None


class Tasks(BaseModel):
    count: Optional[int] = None


class RequestedFrequency(BaseModel):
    min: Optional[Uint32NoVal] = None
    max: Optional[Uint32NoVal] = None


class CPU(BaseModel):
    requested_frequency: Optional[RequestedFrequency] = None
    governor: Optional[str] = None


class StateEnumModel1(Enum):
    PENDING = "PENDING"
    RUNNING = "RUNNING"
    SUSPENDED = "SUSPENDED"
    COMPLETED = "COMPLETED"
    CANCELLED = "CANCELLED"
    FAILED = "FAILED"
    TIMEOUT = "TIMEOUT"
    NODE_FAIL = "NODE_FAIL"
    PREEMPTED = "PREEMPTED"
    BOOT_FAIL = "BOOT_FAIL"
    DEADLINE = "DEADLINE"
    OUT_OF_MEMORY = "OUT_OF_MEMORY"
    LAUNCH_FAILED = "LAUNCH_FAILED"
    UPDATE_DB = "UPDATE_DB"
    REQUEUED = "REQUEUED"
    REQUEUE_HOLD = "REQUEUE_HOLD"
    SPECIAL_EXIT = "SPECIAL_EXIT"
    RESIZING = "RESIZING"
    CONFIGURING = "CONFIGURING"
    COMPLETING = "COMPLETING"
    STOPPED = "STOPPED"
    RECONFIG_FAIL = "RECONFIG_FAIL"
    POWER_UP_NODE = "POWER_UP_NODE"
    REVOKED = "REVOKED"
    REQUEUE_FED = "REQUEUE_FED"
    RESV_DEL_HOLD = "RESV_DEL_HOLD"
    SIGNALING = "SIGNALING"
    STAGE_OUT = "STAGE_OUT"


class CPUModel(BaseModel):
    actual_frequency: Optional[int] = None


class Energy(BaseModel):
    consumed: Optional[Uint64NoVal] = None


class Statistics(BaseModel):
    CPU: Optional[CPUModel] = None
    energy: Optional[Energy] = None


class Step(BaseModel):
    id: Optional[str] = None
    """
    Slurm Job StepId
    """
    name: Optional[str] = None


class Task(BaseModel):
    distribution: Optional[str] = None


class Hostlist(RootModel[List[str]]):
    root: List[str]


class TresModel(BaseModel):
    type: str
    name: Optional[str] = None
    id: Optional[int] = None
    count: Optional[int] = None


class StepTresReqMin(RootModel[List[TresModel]]):
    root: List[TresModel]


class StepTresUsageMax(RootModel[List[TresModel]]):
    root: List[TresModel]


class StepTresUsageMin(RootModel[List[TresModel]]):
    root: List[TresModel]


class TresList(RootModel[List[TresModel]]):
    root: List[TresModel]


class FlagModel6(Enum):
    ASSIGNED_DEFAULT = "ASSIGNED_DEFAULT"


class WckeyTagStruct(BaseModel):
    wckey: str
    """
    WCKey name
    """
    flags: List[FlagModel6]
    """
    Active flags
    """


class Controller(BaseModel):
    host: Optional[str] = None
    port: Optional[int] = None


class FlagModel7(Enum):
    REGISTERING = "REGISTERING"
    MULTIPLE_SLURMD = "MULTIPLE_SLURMD"
    FRONT_END = "FRONT_END"
    CRAY_NATIVE = "CRAY_NATIVE"
    FEDERATION = "FEDERATION"
    EXTERNAL = "EXTERNAL"


class Associations(BaseModel):
    root: Optional[AssocShort] = None


class ClusterRec(BaseModel):
    controller: Optional[Controller] = None
    flags: Optional[List[FlagModel7]] = None
    name: Optional[str] = None
    nodes: Optional[str] = None
    select_plugin: Optional[str] = None
    associations: Optional[Associations] = None
    rpc_version: Optional[int] = None
    tres: Optional[TresList] = None


class FlagModel8(Enum):
    DELETED = "DELETED"


class AssocShortList(RootModel[List[AssocShort]]):
    root: List[AssocShort]


class Coord(BaseModel):
    name: str
    direct: Optional[bool] = None


class AdministratorLevelEnum(Enum):
    Not_Set = "Not Set"
    None_ = "None"
    Operator = "Operator"
    Administrator = "Administrator"


class Default(BaseModel):
    account: Optional[str] = None
    wckey: Optional[str] = None


class FlagModel9(Enum):
    NONE = "NONE"
    DELETED = "DELETED"


class FlagModel10(Enum):
    DELETED = "DELETED"


class Allocated(BaseModel):
    seconds: Optional[int] = None


class Accounting(BaseModel):
    allocated: Optional[Allocated] = None
    id: Optional[int] = None
    start: Optional[int] = None
    TRES: Optional[TresModel] = None


class FlagModel11(Enum):
    NOT_SET = "NOT_SET"
    ADD = "ADD"
    REMOVE = "REMOVE"
    PARTITION_MINIMUM_NODE = "PARTITION_MINIMUM_NODE"
    PARTITION_MAXIMUM_NODE = "PARTITION_MAXIMUM_NODE"
    PARTITION_TIME_LIMIT = "PARTITION_TIME_LIMIT"
    ENFORCE_USAGE_THRESHOLD = "ENFORCE_USAGE_THRESHOLD"
    NO_RESERVE = "NO_RESERVE"
    REQUIRED_RESERVATION = "REQUIRED_RESERVATION"
    DENY_LIMIT = "DENY_LIMIT"
    OVERRIDE_PARTITION_QOS = "OVERRIDE_PARTITION_QOS"
    NO_DECAY = "NO_DECAY"
    USAGE_FACTOR_SAFE = "USAGE_FACTOR_SAFE"
    RELATIVE = "RELATIVE"


class ActiveJobs(BaseModel):
    accruing: Optional[Uint32NoVal] = None
    count: Optional[Uint32NoVal] = None


class Per(BaseModel):
    qos: Optional[TresList] = None
    job: Optional[TresList] = None
    account: Optional[TresList] = None
    user: Optional[TresList] = None


class Minutes(BaseModel):
    per: Optional[Per] = None


class PerModel(BaseModel):
    account: Optional[TresList] = None
    job: Optional[TresList] = None
    node: Optional[TresList] = None
    user: Optional[TresList] = None


class TresModel1(BaseModel):
    total: Optional[TresList] = None
    minutes: Optional[Minutes] = None
    per: Optional[PerModel] = None


class PerModel1(BaseModel):
    qos: Optional[Uint32NoVal] = None
    job: Optional[Uint32NoVal] = None


class WallClock(BaseModel):
    per: Optional[PerModel1] = None


class PerModel2(BaseModel):
    account: Optional[Uint32NoVal] = None
    user: Optional[Uint32NoVal] = None


class ActiveJobsModel(BaseModel):
    per: Optional[PerModel2] = None


class Jobs(BaseModel):
    active_jobs: Optional[ActiveJobsModel] = None
    per: Optional[PerModel2] = None


class Accruing(BaseModel):
    per: Optional[PerModel2] = None


class MaxModel(BaseModel):
    active_jobs: Optional[ActiveJobs] = None
    tres: Optional[TresModel1] = None
    wall_clock: Optional[WallClock] = None
    jobs: Optional[Jobs] = None
    accruing: Optional[Accruing] = None


class PerModel3(BaseModel):
    job: Optional[TresList] = None


class TresModel2(BaseModel):
    per: Optional[PerModel3] = None


class Min(BaseModel):
    priority_threshold: Optional[Uint32NoVal] = None
    tres: Optional[TresModel2] = None


class LimitsModel(BaseModel):
    grace_time: Optional[int] = None
    max: Optional[MaxModel] = None
    factor: Optional[Float64NoVal] = None
    min: Optional[Min] = None


class ModeEnum(Enum):
    DISABLED = "DISABLED"
    SUSPEND = "SUSPEND"
    REQUEUE = "REQUEUE"
    CANCEL = "CANCEL"
    GANG = "GANG"


class QosPreemptList(RootModel[List[str]]):
    root: List[str]


class DefaultModel(BaseModel):
    qos: Optional[str] = None


class FlagModel12(Enum):
    DELETED = "DELETED"


class PerModel4(BaseModel):
    count: Optional[Uint32NoVal] = None
    accruing: Optional[Uint32NoVal] = None
    submitted: Optional[Uint32NoVal] = None
    wall_clock: Optional[Uint32NoVal] = None


class JobsModel(BaseModel):
    per: Optional[PerModel4] = None
    active: Optional[Uint32NoVal] = None
    accruing: Optional[Uint32NoVal] = None
    total: Optional[Uint32NoVal] = None


class Group(BaseModel):
    minutes: Optional[TresList] = None
    active: Optional[TresList] = None


class PerModel5(BaseModel):
    job: Optional[TresList] = None


class MinutesModel(BaseModel):
    total: Optional[TresList] = None
    per: Optional[PerModel5] = None


class PerModel6(BaseModel):
    job: Optional[TresList] = None
    node: Optional[TresList] = None


class TresModel3(BaseModel):
    total: Optional[TresList] = None
    group: Optional[Group] = None
    minutes: Optional[MinutesModel] = None
    per: Optional[PerModel6] = None


class Account(BaseModel):
    wall_clock: Optional[Uint32NoVal] = None


class PerModel7(BaseModel):
    account: Optional[Account] = None


class MaxModel1(BaseModel):
    jobs: Optional[JobsModel] = None
    tres: Optional[TresModel3] = None
    per: Optional[PerModel7] = None


class MinModel(BaseModel):
    priority_threshold: Optional[Uint32NoVal] = None


class QosStringIdList(RootModel[List[str]]):
    """
    List of QOS names
    """

    root: List[str]
    """
    List of QOS names
    """


class TimeModel1(BaseModel):
    time_end: Optional[int] = None
    time_start: Optional[int] = None


class Instance(BaseModel):
    cluster: Optional[str] = None
    extra: Optional[str] = None
    instance_id: Optional[str] = None
    instance_type: Optional[str] = None
    node_name: Optional[str] = None
    time: Optional[TimeModel1] = None


class StringList(RootModel[List[str]]):
    root: List[str]


class AssocRecSet(BaseModel):
    comment: Optional[str] = None
    """
    Comment for the association
    """
    defaultqos: Optional[str] = None
    """
    Which QOS id is this association default
    """
    grpjobs: Optional[Uint32NoVal] = None
    """
    Max number of jobs the underlying group of associations can run at one time
    """
    grpjobsaccrue: Optional[Uint32NoVal] = None
    """
    Max number of jobs the underlying group of associations can have accruing priority at one time
    """
    grpsubmitjobs: Optional[Uint32NoVal] = None
    """
    Max number of jobs the underlying group of associations can submit at one time
    """
    grptres: Optional[TresList] = None
    grptresmins: Optional[TresList] = None
    """
    Max number of cpu minutes the underlying group of associations can run for
    """
    grptresrunmins: Optional[TresList] = None
    """
    Max number of cpu minutes the underlying group of associations can having running at one time
    """
    grpwall: Optional[Uint32NoVal] = None
    """
    Total time in minutes the underlying group of associations can run for
    """
    maxjobs: Optional[Uint32NoVal] = None
    """
    Max number of jobs this association can run at one time
    """
    maxjobsaccrue: Optional[Uint32NoVal] = None
    """
    Max number of jobs this association can have accruing priority time
    """
    maxsubmitjobs: Optional[Uint32NoVal] = None
    """
    Max number of jobs that can be submitted by association
    """
    maxtresminsperjob: Optional[TresList] = None
    """
    Max number of cpu minutes this association can have per job
    """
    maxtresrunmins: Optional[TresList] = None
    """
    Max number of cpu minutes this association can having running at one time
    """
    maxtresperjob: Optional[TresList] = None
    """
    Max number of cpus this association can allocate per job
    """
    maxtrespernode: Optional[TresList] = None
    """
    Max number of TRES this association can allocate per node
    """
    maxwalldurationperjob: Optional[Uint32NoVal] = None
    """
    Longest time this association can run a job
    """
    minpriothresh: Optional[Uint32NoVal] = None
    """
    Don't reserve resources for pending jobs unless they have a priority equal to or higher than this
    """
    parent: Optional[str] = None
    """
    Name of parent account
    """
    priority: Optional[Uint32NoVal] = None
    """
    Association priority
    """
    qoslevel: Optional[QosStringIdList] = None
    """
    List of QOS names
    """
    fairshare: Optional[int] = None
    """
    Number of shares allocated to this association
    """


class AdminlevelEnum(Enum):
    Not_Set = "Not Set"
    None_ = "None"
    Operator = "Operator"
    Administrator = "Administrator"


class UserShort(BaseModel):
    adminlevel: Optional[List[AdminlevelEnum]] = None
    """
    Admin level of user.  Valid levels are None, Operator, and Admin.
    """
    defaultaccount: Optional[str] = None
    """
    Identify the default bank account name to be used for a job if none is specified at submission time.
    """
    defaultwckey: Optional[str] = None
    """
    Identify the default Workload Characterization Key.
    """


class AccountsAddCond(BaseModel):
    accounts: StringList
    """
    CSV accounts list
    """
    association: Optional[AssocRecSet] = None
    """
    Association limits and options
    """
    clusters: Optional[StringList] = None
    """
    CSV clusters list
    """


class AccountShort(BaseModel):
    description: Optional[str] = None
    """
    An arbitrary string describing an account
    """
    organization: Optional[str] = None
    """
    Organization to which the account belongs
    """


class Type(Enum):
    """
    type
    """

    internal = "internal"
    user = "user"
    unknown = "unknown"


class RollupStat(BaseModel):
    """
    recorded rollup statistics
    """

    type: Optional[Type] = None
    """
    type
    """
    last_run: Optional[int] = Field(None, alias="last run")
    """
    Last time rollup ran (UNIX timestamp)
    """
    max_cycle: Optional[int] = None
    """
    longest rollup time (seconds)
    """
    total_time: Optional[int] = None
    """
    total time spent doing rollups (seconds)
    """
    total_cycles: Optional[int] = None
    """
    number of rollups since last_run
    """
    mean_cycles: Optional[int] = None
    """
    average time for rollup (seconds)
    """


class RollupStats(RootModel[List[RollupStat]]):
    """
    list of recorded rollup statistics
    """

    root: List[RollupStat]
    """
    list of recorded rollup statistics
    """


class TimeModel2(BaseModel):
    average: Optional[int] = None
    total: Optional[int] = None


class StatsRpc(BaseModel):
    rpc: Optional[str] = None
    count: Optional[int] = None
    time: Optional[TimeModel2] = None


class StatsUser(BaseModel):
    user: Optional[str] = None
    count: Optional[int] = None
    time: Optional[TimeModel2] = None


class OpenapiMeta(BaseModel):
    plugin: Optional[Plugin] = None
    client: Optional[Client] = None
    command: Optional[StringArray] = None
    """
    CLI command (if applicable)
    """
    slurm: Optional[Slurm] = None


class OpenapiErrors(RootModel[List[OpenapiError]]):
    root: List[OpenapiError]


class OpenapiWarnings(RootModel[List[OpenapiWarning]]):
    root: List[OpenapiWarning]


class StatsMsg(BaseModel):
    parts_packed: Optional[int] = None
    req_time: Optional[Uint64NoVal] = None
    req_time_start: Optional[Uint64NoVal] = None
    server_thread_count: Optional[int] = None
    agent_queue_size: Optional[int] = None
    agent_count: Optional[int] = None
    agent_thread_count: Optional[int] = None
    dbd_agent_queue_size: Optional[int] = None
    gettimeofday_latency: Optional[int] = None
    schedule_cycle_max: Optional[int] = None
    schedule_cycle_last: Optional[int] = None
    schedule_cycle_total: Optional[int] = None
    schedule_cycle_mean: Optional[int] = None
    schedule_cycle_mean_depth: Optional[int] = None
    schedule_cycle_per_minute: Optional[int] = None
    schedule_queue_length: Optional[int] = None
    schedule_exit: Optional[ScheduleExitFields] = None
    jobs_submitted: Optional[int] = None
    jobs_started: Optional[int] = None
    jobs_completed: Optional[int] = None
    jobs_canceled: Optional[int] = None
    jobs_failed: Optional[int] = None
    jobs_pending: Optional[int] = None
    jobs_running: Optional[int] = None
    job_states_ts: Optional[Uint64NoVal] = None
    bf_backfilled_jobs: Optional[int] = None
    bf_last_backfilled_jobs: Optional[int] = None
    bf_backfilled_het_jobs: Optional[int] = None
    bf_cycle_counter: Optional[int] = None
    bf_cycle_mean: Optional[int] = None
    bf_depth_mean: Optional[int] = None
    bf_depth_mean_try: Optional[int] = None
    bf_cycle_sum: Optional[int] = None
    bf_cycle_last: Optional[int] = None
    bf_last_depth: Optional[int] = None
    bf_last_depth_try: Optional[int] = None
    bf_depth_sum: Optional[int] = None
    bf_depth_try_sum: Optional[int] = None
    bf_queue_len: Optional[int] = None
    bf_queue_len_mean: Optional[int] = None
    bf_queue_len_sum: Optional[int] = None
    bf_table_size: Optional[int] = None
    bf_table_size_mean: Optional[int] = None
    bf_when_last_cycle: Optional[Uint64NoVal] = None
    bf_active: Optional[bool] = None
    bf_exit: Optional[BfExitFields] = None
    rpcs_by_message_type: Optional[StatsMsgRpcsByType] = None
    rpcs_by_user: Optional[StatsMsgRpcsByUser] = None


class Licenses(RootModel[List[License]]):
    root: List[License]


class ControllerPingArray(RootModel[List[ControllerPing]]):
    root: List[ControllerPing]


class JobRes(BaseModel):
    nodes: Optional[str] = None
    allocated_cores: Optional[int] = None
    allocated_cpus: Optional[int] = None
    allocated_hosts: Optional[int] = None
    allocated_nodes: Optional[JobResNodes] = None


class JobDescMsg(BaseModel):
    account: Optional[str] = None
    account_gather_frequency: Optional[str] = None
    admin_comment: Optional[str] = None
    allocation_node_list: Optional[str] = None
    allocation_node_port: Optional[int] = None
    argv: Optional[StringArray] = None
    array: Optional[str] = None
    batch_features: Optional[str] = None
    begin_time: Optional[Uint64NoVal] = None
    flags: Optional[List[FlagModel1]] = None
    burst_buffer: Optional[str] = None
    clusters: Optional[str] = None
    cluster_constraint: Optional[str] = None
    comment: Optional[str] = None
    contiguous: Optional[bool] = None
    container: Optional[str] = None
    container_id: Optional[str] = None
    core_specification: Optional[int] = None
    thread_specification: Optional[int] = None
    cpu_binding: Optional[str] = None
    cpu_binding_flags: Optional[List[CpuBindingFlag]] = None
    cpu_frequency: Optional[str] = None
    cpus_per_tres: Optional[str] = None
    crontab: Optional[CronEntry] = None
    deadline: Optional[int] = None
    delay_boot: Optional[int] = None
    dependency: Optional[str] = None
    end_time: Optional[int] = None
    environment: Optional[StringArray] = None
    rlimits: Optional[Rlimits] = None
    excluded_nodes: Optional[CsvString] = None
    extra: Optional[str] = None
    constraints: Optional[str] = None
    group_id: Optional[str] = None
    hetjob_group: Optional[int] = None
    immediate: Optional[bool] = None
    job_id: Optional[int] = None
    kill_on_node_fail: Optional[bool] = None
    licenses: Optional[str] = None
    mail_type: Optional[List[MailTypeEnum]] = None
    mail_user: Optional[str] = None
    mcs_label: Optional[str] = None
    memory_binding: Optional[str] = None
    memory_binding_type: Optional[List[MemoryBindingTypeEnum]] = None
    memory_per_tres: Optional[str] = None
    name: Optional[str] = None
    network: Optional[str] = None
    nice: Optional[int] = None
    tasks: Optional[int] = None
    open_mode: Optional[List[OpenModeEnum]] = None
    reserve_ports: Optional[int] = None
    overcommit: Optional[bool] = None
    partition: Optional[str] = None
    distribution_plane_size: Optional[int] = None
    power_flags: Optional[List[PowerFlag]] = None
    prefer: Optional[str] = None
    priority: Optional[Uint32NoVal] = None
    profile: Optional[List[ProfileEnum]] = None
    qos: Optional[str] = None
    reboot: Optional[bool] = None
    required_nodes: Optional[CsvString] = None
    requeue: Optional[bool] = None
    reservation: Optional[str] = None
    script: Optional[str] = None
    shared: Optional[List[SharedEnum]] = None
    exclusive: Optional[List[ExclusiveEnum]] = None
    oversubscribe: Optional[bool] = None
    site_factor: Optional[int] = None
    spank_environment: Optional[StringArray] = None
    distribution: Optional[str] = None
    time_limit: Optional[Uint32NoVal] = None
    time_minimum: Optional[Uint32NoVal] = None
    tres_bind: Optional[str] = None
    tres_freq: Optional[str] = None
    tres_per_job: Optional[str] = None
    tres_per_node: Optional[str] = None
    tres_per_socket: Optional[str] = None
    tres_per_task: Optional[str] = None
    user_id: Optional[str] = None
    wait_all_nodes: Optional[bool] = None
    kill_warning_flags: Optional[List[KillWarningFlag]] = None
    kill_warning_signal: Optional[str] = None
    kill_warning_delay: Optional[Uint16NoVal] = None
    current_working_directory: Optional[str] = None
    cpus_per_task: Optional[int] = None
    minimum_cpus: Optional[int] = None
    maximum_cpus: Optional[int] = None
    nodes: Optional[str] = None
    minimum_nodes: Optional[int] = None
    maximum_nodes: Optional[int] = None
    minimum_boards_per_node: Optional[int] = None
    minimum_sockets_per_board: Optional[int] = None
    sockets_per_node: Optional[int] = None
    threads_per_core: Optional[int] = None
    tasks_per_node: Optional[int] = None
    tasks_per_socket: Optional[int] = None
    tasks_per_core: Optional[int] = None
    tasks_per_board: Optional[int] = None
    ntasks_per_tres: Optional[int] = None
    minimum_cpus_per_node: Optional[int] = None
    memory_per_cpu: Optional[Uint64NoVal] = None
    memory_per_node: Optional[Uint64NoVal] = None
    temporary_disk_per_node: Optional[int] = None
    selinux_context: Optional[str] = None
    required_switches: Optional[Uint32NoVal] = None
    standard_error: Optional[str] = None
    standard_input: Optional[str] = None
    standard_output: Optional[str] = None
    wait_for_switch: Optional[int] = None
    wckey: Optional[str] = None
    x11: Optional[List[X11Enum]] = None
    x11_magic_cookie: Optional[str] = None
    x11_target_host: Optional[str] = None
    x11_target_port: Optional[int] = None


class JobArrayResponseArray(RootModel[List[JobArrayResponseMsgEntry]]):
    root: List[JobArrayResponseMsgEntry]


class JobDescMsgList(RootModel[List[JobDescMsg]]):
    root: List[JobDescMsg]


class OpenapiJobSubmitResponse(BaseModel):
    result: Optional[JobSubmitResponseMsg] = None
    """
    Job submission
    """
    job_id: Optional[int] = None
    """
    submited JobId
    """
    step_id: Optional[str] = None
    """
    submited StepID
    """
    job_submit_user_msg: Optional[str] = None
    """
    job submision user message
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class Node(BaseModel):
    architecture: Optional[str] = None
    burstbuffer_network_address: Optional[str] = None
    boards: Optional[int] = None
    boot_time: Optional[Uint64NoVal] = None
    cluster_name: Optional[str] = None
    cores: Optional[int] = None
    specialized_cores: Optional[int] = None
    cpu_binding: Optional[int] = None
    cpu_load: Optional[int] = None
    free_mem: Optional[Uint64NoVal] = None
    cpus: Optional[int] = None
    effective_cpus: Optional[int] = None
    specialized_cpus: Optional[str] = None
    energy: Optional[AcctGatherEnergy] = None
    external_sensors: Optional[ExtSensorsData] = None
    extra: Optional[str] = None
    power: Optional[PowerMgmtData] = None
    features: Optional[CsvString] = None
    active_features: Optional[CsvString] = None
    gres: Optional[str] = None
    gres_drained: Optional[str] = None
    gres_used: Optional[str] = None
    instance_id: Optional[str] = None
    instance_type: Optional[str] = None
    last_busy: Optional[Uint64NoVal] = None
    mcs_label: Optional[str] = None
    specialized_memory: Optional[int] = None
    name: Optional[str] = None
    next_state_after_reboot: Optional[List[NextStateAfterRebootEnum]] = None
    address: Optional[str] = None
    hostname: Optional[str] = None
    state: Optional[List[StateEnum]] = None
    operating_system: Optional[str] = None
    owner: Optional[str] = None
    partitions: Optional[CsvString] = None
    port: Optional[int] = None
    real_memory: Optional[int] = None
    comment: Optional[str] = None
    reason: Optional[str] = None
    reason_changed_at: Optional[Uint64NoVal] = None
    reason_set_by_user: Optional[str] = None
    resume_after: Optional[Uint64NoVal] = None
    reservation: Optional[str] = None
    alloc_memory: Optional[int] = None
    alloc_cpus: Optional[int] = None
    alloc_idle_cpus: Optional[int] = None
    tres_used: Optional[str] = None
    tres_weighted: Optional[float] = None
    slurmd_start_time: Optional[Uint64NoVal] = None
    sockets: Optional[int] = None
    threads: Optional[int] = None
    temporary_disk: Optional[int] = None
    weight: Optional[int] = None
    tres: Optional[str] = None
    version: Optional[str] = None


class UpdateNodeMsg(BaseModel):
    comment: Optional[str] = None
    """
    arbitrary comment
    """
    cpu_bind: Optional[int] = None
    """
    default CPU binding type
    """
    extra: Optional[str] = None
    """
    arbitrary string
    """
    features: Optional[CsvString] = None
    """
    new available feature for node
    """
    features_act: Optional[CsvString] = None
    """
    new active feature for node
    """
    gres: Optional[str] = None
    """
    new generic resources for node
    """
    address: Optional[HostlistString] = None
    """
    communication name
    """
    hostname: Optional[HostlistString] = None
    """
    node's hostname
    """
    name: Optional[HostlistString] = None
    """
    node to update
    """
    state: Optional[List[StateEnum]] = None
    """
    assign new node state
    """
    reason: Optional[str] = None
    """
    reason for node being DOWN or DRAINING
    """
    reason_uid: Optional[str] = None
    """
    user ID of sending (needed if user root is sending message)
    """
    resume_after: Optional[Uint32NoVal] = None
    """
    automatically resume DOWN or DRAINED node after this amount of seconds
    """
    weight: Optional[Uint32NoVal] = None
    """
    new weight for node
    """


class PartitionInfoMsg(RootModel[List[PartitionInfo]]):
    root: List[PartitionInfo]


class ReservationInfoCoreSpec(RootModel[List[ReservationCoreSpec]]):
    root: List[ReservationCoreSpec]


class SharesUint64TresList(RootModel[List[SharesUint64Tres]]):
    root: List[SharesUint64Tres]


class SharesFloat128TresList(RootModel[List[SharesFloat128Tres]]):
    root: List[SharesFloat128Tres]


class TresModel4(BaseModel):
    allocated: Optional[TresList] = None
    requested: Optional[TresList] = None


class NodesModel(BaseModel):
    count: Optional[int] = None
    range: Optional[str] = None
    list: Optional[Hostlist] = None


class Consumed(BaseModel):
    max: Optional[StepTresUsageMax] = None
    min: Optional[StepTresUsageMin] = None
    average: Optional[TresList] = None
    total: Optional[TresList] = None


class StepTresReqMax(RootModel[List[TresModel]]):
    root: List[TresModel]


class ClusterRecList(RootModel[List[ClusterRec]]):
    root: List[ClusterRec]


class CoordList(RootModel[List[Coord]]):
    root: List[Coord]


class AccountingList(RootModel[List[Accounting]]):
    root: List[Accounting]


class Preempt(BaseModel):
    list: Optional[QosPreemptList] = None
    mode: Optional[List[ModeEnum]] = None
    exempt_time: Optional[Uint32NoVal] = None


class QosModel(BaseModel):
    description: Optional[str] = None
    flags: Optional[List[FlagModel11]] = None
    id: Optional[int] = None
    limits: Optional[LimitsModel] = None
    name: Optional[str] = None
    preempt: Optional[Preempt] = None
    priority: Optional[Uint32NoVal] = None
    usage_factor: Optional[Float64NoVal] = None
    usage_threshold: Optional[Float64NoVal] = None


class Assoc(BaseModel):
    accounting: Optional[AccountingList] = None
    """
    Usage accounting
    """
    account: Optional[str] = None
    cluster: Optional[str] = None
    comment: Optional[str] = None
    """
    comment for the association
    """
    default: Optional[DefaultModel] = None
    flags: Optional[List[FlagModel12]] = None
    max: Optional[MaxModel1] = None
    id: Optional[AssocShort] = None
    """
    Association ID
    """
    is_default: Optional[bool] = None
    lineage: Optional[str] = None
    """
    Complete path up the hierarchy to the root association
    """
    min: Optional[MinModel] = None
    parent_account: Optional[str] = None
    partition: Optional[str] = None
    priority: Optional[Uint32NoVal] = None
    qos: Optional[QosStringIdList] = None
    """
    List of QOS names
    """
    shares_raw: Optional[int] = None
    user: str


class InstanceList(RootModel[List[Instance]]):
    root: List[Instance]


class OpenapiTresResp(BaseModel):
    TRES: TresList
    """
    TRES
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiSlurmdbdQosRemovedResp(BaseModel):
    removed_qos: StringList
    """
    removed QOS
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiAssocsRemovedResp(BaseModel):
    removed_associations: StringList
    """
    removed_associations
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiInstancesResp(BaseModel):
    instances: InstanceList
    """
    instances
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class UsersAddCond(BaseModel):
    accounts: Optional[StringList] = None
    """
    CSV accounts list
    """
    association: Optional[AssocRecSet] = None
    """
    Association limits and options
    """
    clusters: Optional[StringList] = None
    """
    CSV clusters list
    """
    partitions: Optional[StringList] = None
    """
    CSV partitions list
    """
    users: StringList
    """
    CSV users list
    """
    wckeys: Optional[StringList] = None
    """
    CSV WCKeys list
    """


class OpenapiUsersAddCondRespStr(BaseModel):
    added_users: str
    """
    added_users
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiClustersRemovedResp(BaseModel):
    deleted_clusters: StringList
    """
    deleted_clusters
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiClustersResp(BaseModel):
    clusters: ClusterRecList
    """
    clusters
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiWckeyRemovedResp(BaseModel):
    deleted_wckeys: StringList
    """
    deleted wckeys
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiAccountsRemovedResp(BaseModel):
    removed_accounts: StringList
    """
    removed_accounts
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiAccountsAddCondRespStr(BaseModel):
    added_accounts: str
    """
    added_accounts
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiAccountsAddCondResp(BaseModel):
    association_condition: Optional[AccountsAddCond] = None
    """
    CSV list of accounts, association limits and options, CSV list of clusters
    """
    account: Optional[AccountShort] = None
    """
    Account organization and description
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class StatsRpcList(RootModel[List[StatsRpc]]):
    root: List[StatsRpc]


class StatsUserList(RootModel[List[StatsUser]]):
    root: List[StatsUser]


class OpenapiResp(BaseModel):
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiDiagResp(BaseModel):
    statistics: StatsMsg
    """
    statistics
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiLicensesResp(BaseModel):
    licenses: Licenses
    """
    list of licenses
    """
    last_update: Uint64NoVal
    """
    time of last licenses change (UNIX timestamp)
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiPingArrayResp(BaseModel):
    pings: ControllerPingArray
    """
    pings
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class JobInfo(BaseModel):
    account: Optional[str] = None
    accrue_time: Optional[Uint64NoVal] = None
    admin_comment: Optional[str] = None
    allocating_node: Optional[str] = None
    array_job_id: Optional[Uint32NoVal] = None
    array_task_id: Optional[Uint32NoVal] = None
    array_max_tasks: Optional[Uint32NoVal] = None
    array_task_string: Optional[str] = None
    association_id: Optional[int] = None
    batch_features: Optional[str] = None
    batch_flag: Optional[bool] = None
    batch_host: Optional[str] = None
    flags: Optional[List[Flag]] = None
    burst_buffer: Optional[str] = None
    burst_buffer_state: Optional[str] = None
    cluster: Optional[str] = None
    cluster_features: Optional[str] = None
    command: Optional[str] = None
    comment: Optional[str] = None
    container: Optional[str] = None
    container_id: Optional[str] = None
    contiguous: Optional[bool] = None
    core_spec: Optional[int] = None
    thread_spec: Optional[int] = None
    cores_per_socket: Optional[Uint16NoVal] = None
    billable_tres: Optional[Float64NoVal] = None
    cpus_per_task: Optional[Uint16NoVal] = None
    cpu_frequency_minimum: Optional[Uint32NoVal] = None
    cpu_frequency_maximum: Optional[Uint32NoVal] = None
    cpu_frequency_governor: Optional[Uint32NoVal] = None
    cpus_per_tres: Optional[str] = None
    cron: Optional[str] = None
    deadline: Optional[Uint64NoVal] = None
    delay_boot: Optional[Uint32NoVal] = None
    dependency: Optional[str] = None
    derived_exit_code: Optional[ProcessExitCodeVerbose] = None
    """
    return code returned by process
    """
    eligible_time: Optional[Uint64NoVal] = None
    end_time: Optional[Uint64NoVal] = None
    excluded_nodes: Optional[str] = None
    exit_code: Optional[ProcessExitCodeVerbose] = None
    """
    return code returned by process
    """
    extra: Optional[str] = None
    failed_node: Optional[str] = None
    features: Optional[str] = None
    federation_origin: Optional[str] = None
    federation_siblings_active: Optional[str] = None
    federation_siblings_viable: Optional[str] = None
    gres_detail: Optional[JobInfoGresDetail] = None
    group_id: Optional[int] = None
    group_name: Optional[str] = None
    het_job_id: Optional[Uint32NoVal] = None
    het_job_id_set: Optional[str] = None
    het_job_offset: Optional[Uint32NoVal] = None
    job_id: Optional[int] = None
    job_resources: Optional[JobRes] = None
    job_size_str: Optional[CsvString] = None
    job_state: Optional[List[JobStateEnum]] = None
    last_sched_evaluation: Optional[Uint64NoVal] = None
    licenses: Optional[str] = None
    mail_type: Optional[List[MailTypeEnum]] = None
    mail_user: Optional[str] = None
    max_cpus: Optional[Uint32NoVal] = None
    max_nodes: Optional[Uint32NoVal] = None
    mcs_label: Optional[str] = None
    memory_per_tres: Optional[str] = None
    name: Optional[str] = None
    network: Optional[str] = None
    nodes: Optional[str] = None
    nice: Optional[int] = None
    tasks_per_core: Optional[Uint16NoVal] = None
    tasks_per_tres: Optional[Uint16NoVal] = None
    tasks_per_node: Optional[Uint16NoVal] = None
    tasks_per_socket: Optional[Uint16NoVal] = None
    tasks_per_board: Optional[Uint16NoVal] = None
    cpus: Optional[Uint32NoVal] = None
    node_count: Optional[Uint32NoVal] = None
    tasks: Optional[Uint32NoVal] = None
    partition: Optional[str] = None
    prefer: Optional[str] = None
    memory_per_cpu: Optional[Uint64NoVal] = None
    memory_per_node: Optional[Uint64NoVal] = None
    minimum_cpus_per_node: Optional[Uint16NoVal] = None
    minimum_tmp_disk_per_node: Optional[Uint32NoVal] = None
    power: Optional[Power] = None
    preempt_time: Optional[Uint64NoVal] = None
    preemptable_time: Optional[Uint64NoVal] = None
    pre_sus_time: Optional[Uint64NoVal] = None
    priority: Optional[Uint32NoVal] = None
    profile: Optional[List[ProfileEnum]] = None
    qos: Optional[str] = None
    reboot: Optional[bool] = None
    required_nodes: Optional[str] = None
    minimum_switches: Optional[int] = None
    requeue: Optional[bool] = None
    resize_time: Optional[Uint64NoVal] = None
    restart_cnt: Optional[int] = None
    resv_name: Optional[str] = None
    scheduled_nodes: Optional[str] = None
    selinux_context: Optional[str] = None
    shared: Optional[List[SharedEnum]] = None
    exclusive: Optional[List[ExclusiveEnum]] = None
    oversubscribe: Optional[bool] = None
    show_flags: Optional[List[ShowFlag]] = None
    sockets_per_board: Optional[int] = None
    sockets_per_node: Optional[Uint16NoVal] = None
    start_time: Optional[Uint64NoVal] = None
    state_description: Optional[str] = None
    state_reason: Optional[str] = None
    standard_error: Optional[str] = None
    standard_input: Optional[str] = None
    standard_output: Optional[str] = None
    submit_time: Optional[Uint64NoVal] = None
    suspend_time: Optional[Uint64NoVal] = None
    system_comment: Optional[str] = None
    time_limit: Optional[Uint32NoVal] = None
    time_minimum: Optional[Uint32NoVal] = None
    threads_per_core: Optional[Uint16NoVal] = None
    tres_bind: Optional[str] = None
    tres_freq: Optional[str] = None
    tres_per_job: Optional[str] = None
    tres_per_node: Optional[str] = None
    tres_per_socket: Optional[str] = None
    tres_per_task: Optional[str] = None
    tres_req_str: Optional[str] = None
    tres_alloc_str: Optional[str] = None
    user_id: Optional[int] = None
    user_name: Optional[str] = None
    maximum_switch_wait_time: Optional[int] = None
    wckey: Optional[str] = None
    current_working_directory: Optional[str] = None


class OpenapiJobPostResponse(BaseModel):
    results: Optional[JobArrayResponseArray] = None
    """
    Job update results
    """
    job_id: Optional[str] = None
    """
    First updated JobId - Use results instead
    """
    step_id: Optional[str] = None
    """
    First updated StepID - Use results instead
    """
    job_submit_user_msg: Optional[str] = None
    """
    First updated Job submision user message - Use results instead
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class JobSubmitReq(BaseModel):
    script: Optional[str] = None
    """
    batch job script
    """
    jobs: Optional[JobDescMsgList] = None
    """
    HetJob description
    """
    job: Optional[JobDescMsg] = None
    """
    Job description
    """


class NodesModel1(RootModel[List[Node]]):
    root: List[Node]


class OpenapiPartitionResp(BaseModel):
    partitions: PartitionInfoMsg
    """
    list of partitions
    """
    last_update: Uint64NoVal
    """
    time of last partition change (UNIX timestamp)
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class ReservationInfo(BaseModel):
    accounts: Optional[str] = None
    burst_buffer: Optional[str] = None
    core_count: Optional[int] = None
    core_specializations: Optional[ReservationInfoCoreSpec] = None
    end_time: Optional[Uint64NoVal] = None
    features: Optional[str] = None
    flags: Optional[List[FlagModel4]] = None
    groups: Optional[str] = None
    licenses: Optional[str] = None
    max_start_delay: Optional[int] = None
    name: Optional[str] = None
    node_count: Optional[int] = None
    node_list: Optional[str] = None
    partition: Optional[str] = None
    purge_completed: Optional[PurgeCompleted] = None
    start_time: Optional[Uint64NoVal] = None
    watts: Optional[Uint32NoVal] = None
    tres: Optional[str] = None
    users: Optional[str] = None


class TresModel5(BaseModel):
    run_seconds: Optional[SharesUint64TresList] = None
    """
    currently running tres-secs = grp_used_tres_run_secs
    """
    group_minutes: Optional[SharesUint64TresList] = None
    """
    tres-minute limit
    """
    usage: Optional[SharesFloat128TresList] = None
    """
    measure of each tres usage
    """


class AssocSharesObjWrap(BaseModel):
    id: Optional[int] = None
    """
    assocation id
    """
    cluster: Optional[str] = None
    """
    cluster name
    """
    name: Optional[str] = None
    """
    share name
    """
    parent: Optional[str] = None
    """
    parent name
    """
    partition: Optional[str] = None
    """
    partition name
    """
    shares_normalized: Optional[Float64NoVal] = None
    """
    normalized shares
    """
    shares: Optional[Uint32NoVal] = None
    """
    number of shares allocated
    """
    tres: Optional[TresModel5] = None
    effective_usage: Optional[float] = None
    """
    effective, normalized usage
    """
    usage_normalized: Optional[Float64NoVal] = None
    """
    normalized usage
    """
    usage: Optional[int] = None
    """
    measure of tresbillableunits usage
    """
    fairshare: Optional[Fairshare] = None
    type: Optional[List[TypeEnum]] = None
    """
    user or account association
    """


class Requested(BaseModel):
    max: Optional[StepTresReqMax] = None
    min: Optional[StepTresReqMin] = None
    average: Optional[TresList] = None
    total: Optional[TresList] = None


class TresModel6(BaseModel):
    requested: Optional[Requested] = None
    consumed: Optional[Consumed] = None
    allocated: Optional[TresList] = None


class StepModel(BaseModel):
    time: Optional[TimeModel] = None
    exit_code: Optional[ProcessExitCodeVerbose] = None
    """
    return code returned by process
    """
    nodes: Optional[NodesModel] = None
    tasks: Optional[Tasks] = None
    pid: Optional[str] = None
    CPU: Optional[CPU] = None
    kill_request_user: Optional[str] = None
    state: Optional[List[StateEnumModel1]] = None
    statistics: Optional[Statistics] = None
    step: Optional[Step] = None
    task: Optional[Task] = None
    tres: Optional[TresModel6] = None


class AccountModel(BaseModel):
    associations: Optional[AssocShortList] = None
    coordinators: Optional[CoordList] = None
    description: str
    name: str
    organization: str
    flags: Optional[List[FlagModel8]] = None


class Wckey(BaseModel):
    accounting: Optional[AccountingList] = None
    cluster: str
    id: Optional[int] = None
    name: str
    user: str
    flags: Optional[List[FlagModel10]] = None


class QosList(RootModel[List[QosModel]]):
    root: List[QosModel]


class AssocList(RootModel[List[Assoc]]):
    root: List[Assoc]


class OpenapiSlurmdbdQosResp(BaseModel):
    qos: QosList
    """
    List of QOS
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiAssocsResp(BaseModel):
    associations: AssocList
    """
    associations
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiUsersAddCondResp(BaseModel):
    association_condition: Optional[UsersAddCond] = None
    """
    Filters to select associations for users
    """
    user: Optional[UserShort] = None
    """
    Admin level of user, DefaultAccount, DefaultWCKey
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class StatsRec(BaseModel):
    time_start: Optional[int] = None
    rollups: Optional[RollupStats] = None
    RPCs: Optional[StatsRpcList] = None
    users: Optional[StatsUserList] = None


class JobInfoMsg(RootModel[List[JobInfo]]):
    root: List[JobInfo]


class OpenapiNodesResp(BaseModel):
    nodes: NodesModel1
    """
    list of nodes
    """
    last_update: Uint64NoVal
    """
    time of last node change (UNIX timestamp)
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class ReservationInfoMsg(RootModel[List[ReservationInfo]]):
    root: List[ReservationInfo]


class AssocSharesObjList(RootModel[List[AssocSharesObjWrap]]):
    root: List[AssocSharesObjWrap]


class StepList(RootModel[List[StepModel]]):
    root: List[StepModel]


class AccountList(RootModel[List[AccountModel]]):
    root: List[AccountModel]


class WckeyList(RootModel[List[Wckey]]):
    root: List[Wckey]


class OpenapiWckeyResp(BaseModel):
    wckeys: WckeyList
    """
    wckeys
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiAccountsResp(BaseModel):
    accounts: AccountList
    """
    accounts
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiSlurmdbdStatsResp(BaseModel):
    statistics: StatsRec
    """
    statistics
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiJobInfoResp(BaseModel):
    jobs: JobInfoMsg
    """
    list of jobs
    """
    last_backfill: Uint64NoVal
    """
    time of last backfill scheduler run (UNIX timestamp)
    """
    last_update: Uint64NoVal
    """
    time of last job change (UNIX timestamp)
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiReservationResp(BaseModel):
    reservations: ReservationInfoMsg
    """
    list of reservations
    """
    last_update: Uint64NoVal
    """
    time of last reservation change (UNIX timestamp)
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class SharesRespMsg(BaseModel):
    shares: Optional[AssocSharesObjList] = None
    """
    Assocation shares
    """
    total_shares: Optional[int] = None
    """
    Total number of shares
    """


class Job(BaseModel):
    account: Optional[str] = None
    comment: Optional[Comment] = None
    allocation_nodes: Optional[int] = None
    array: Optional[Array] = None
    association: Optional[AssocShort] = None
    block: Optional[str] = None
    cluster: Optional[str] = None
    constraints: Optional[str] = None
    container: Optional[str] = None
    derived_exit_code: Optional[ProcessExitCodeVerbose] = None
    """
    return code returned by process
    """
    time: Optional[Time] = None
    exit_code: Optional[ProcessExitCodeVerbose] = None
    """
    return code returned by process
    """
    extra: Optional[str] = None
    failed_node: Optional[str] = None
    flags: Optional[List[FlagModel5]] = None
    group: Optional[str] = None
    het: Optional[Het] = None
    job_id: Optional[int] = None
    name: Optional[str] = None
    licenses: Optional[str] = None
    mcs: Optional[Mcs] = None
    nodes: Optional[str] = None
    partition: Optional[str] = None
    priority: Optional[Uint32NoVal] = None
    qos: Optional[str] = None
    required: Optional[Required] = None
    kill_request_user: Optional[str] = None
    reservation: Optional[Reservation] = None
    script: Optional[str] = None
    state: Optional[State] = None
    steps: Optional[StepList] = None
    submit_line: Optional[str] = None
    tres: Optional[TresModel4] = None
    used_gres: Optional[str] = None
    user: Optional[str] = None
    wckey: Optional[WckeyTagStruct] = None
    """
    WCKey ID with tagging
    """
    working_directory: Optional[str] = None


class UserModel(BaseModel):
    administrator_level: Optional[List[AdministratorLevelEnum]] = None
    associations: Optional[AssocShortList] = None
    coordinators: Optional[CoordList] = None
    default: Optional[Default] = None
    flags: Optional[List[FlagModel9]] = None
    name: str
    old_name: Optional[str] = None
    wckeys: Optional[WckeyList] = None


class OpenapiSharesResp(BaseModel):
    shares: SharesRespMsg
    """
    fairshare info
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class JobList(RootModel[List[Job]]):
    root: List[Job]


class UserList(RootModel[List[UserModel]]):
    root: List[UserModel]


class OpenapiUsersResp(BaseModel):
    users: UserList
    """
    users
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiSlurmdbdJobsResp(BaseModel):
    jobs: JobList
    """
    jobs
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """


class OpenapiSlurmdbdConfigResp(BaseModel):
    clusters: Optional[ClusterRecList] = None
    """
    clusters
    """
    tres: Optional[TresList] = None
    """
    tres
    """
    accounts: Optional[AccountList] = None
    """
    accounts
    """
    users: Optional[UserList] = None
    """
    users
    """
    qos: Optional[QosList] = None
    """
    qos
    """
    wckeys: Optional[WckeyList] = None
    """
    wckeys
    """
    associations: Optional[AssocList] = None
    """
    associations
    """
    instances: Optional[InstanceList] = None
    """
    instances
    """
    meta: Optional[OpenapiMeta] = None
    """
    Slurm meta values
    """
    errors: Optional[OpenapiErrors] = None
    """
    Query errors
    """
    warnings: Optional[OpenapiWarnings] = None
    """
    Query warnings
    """
