from enum import Enum

from dynamix_sdk.utils import (
    AutoNameEnum as _AutoNameEnum,
    enum_auto as _enum_auto,
)


class AccessType(str, _AutoNameEnum):
    ARCXDU = _enum_auto()
    CXDRAU = _enum_auto()
    RCX = _enum_auto()
    R = _enum_auto()


class AffinityMode(str, _AutoNameEnum):
    ANY = _enum_auto()
    EQ = _enum_auto()
    NE = _enum_auto()


class AffinityPolicy(str, _AutoNameEnum):
    RECOMMENDED = _enum_auto()
    REQUIRED = _enum_auto()


class AffinityTopology(str, _AutoNameEnum):
    VM = 'compute'
    NODE = 'node'


class BootDevice(str, _AutoNameEnum):
    CDROM = 'cdrom'
    HD = 'hd'
    NETWORK = 'network'


class Chipset(str, _AutoNameEnum):
    Q35 = _enum_auto()
    I440FX = 'i440fx'


class Driver(str, _AutoNameEnum):
    KVM_X86 = _enum_auto()
    SVA_KVM_X86 = _enum_auto()


class NetType(str, _AutoNameEnum):
    DPDK = _enum_auto()
    EMPTY = _enum_auto()
    EXTNET = _enum_auto()
    SDN = _enum_auto()
    TRUNK = _enum_auto()
    VFNIC = _enum_auto()
    VINS = _enum_auto()


class NetTypeForChangeIP(str, _AutoNameEnum):
    EXTNET = _enum_auto()
    VINS = _enum_auto()


class NumaAffinity(str, _AutoNameEnum):
    NONE = 'none'
    STRICT = 'strict'
    LOOSE = 'loose'


class TXMode(str, _AutoNameEnum):
    IOTHREAD = 'iothread'
    SELECTED_BY_HYPERVISOR = 'selected by hypervisor'
    TIMER = 'timer'


class Ioeventfd(str, _AutoNameEnum):
    OFF = 'off'
    ON = 'on'
    SELECTED_BY_HYPERVISOR = 'selected by hypervisor'


class EventIdx(str, _AutoNameEnum):
    OFF = 'off'
    ON = 'on'
    SELECTED_BY_HYPERVISOR = 'selected by hypervisor'


class ResourceGroupStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DELETED = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()
    DISABLED = _enum_auto()
    DISABLING = _enum_auto()
    ENABLED = _enum_auto()
    ENABLING = _enum_auto()
    MODELED = _enum_auto()
    RESTORING = _enum_auto()


class LockStatus(str, _AutoNameEnum):
    LOCKED = _enum_auto()
    UNLOCKED = _enum_auto()


class VMFeature(str, _AutoNameEnum):
    CHANGEMAC = 'changemac'
    CPUPIN = 'cpupin'
    DPDK = 'dpdk'
    HUGEPAGES = 'hugepages'
    NUMA = 'numa'
    TRUNK = 'trunk'
    VFNIC = 'vfnic'


class RGDefaultNetTypeForSet(str, _AutoNameEnum):
    PRIVATE = _enum_auto()
    PUBLIC = _enum_auto()


class RGDefaultNetType(str, _AutoNameEnum):
    NONE = _enum_auto()
    PRIVATE = _enum_auto()
    PUBLIC = _enum_auto()


class RGResourceType(str, _AutoNameEnum):
    VM = 'compute'
    K8S = 'k8s'
    LB = 'lb'
    VINS = 'vins'


class DiskStatus(str, _AutoNameEnum):
    ASSIGNED = _enum_auto()
    BACKUP_RUNNING = _enum_auto()
    CLONING = _enum_auto()
    CREATED = _enum_auto()
    CREATING = _enum_auto()
    DELETED = _enum_auto()
    DESTROYED = _enum_auto()
    MERGE = _enum_auto()
    MIGRATING = _enum_auto()
    MODELED = _enum_auto()
    PURGED = _enum_auto()
    REPLICATION = _enum_auto()
    ROLLBACK = _enum_auto()
    SNAPCREATE = _enum_auto()


class DiskTechStatus(str, _AutoNameEnum):
    ALLOCATED = _enum_auto()
    UNALLOCATED = _enum_auto()


class VMStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DELETED = _enum_auto()
    DELETING = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()
    DISABLED = _enum_auto()
    ENABLED = _enum_auto()
    MODELED = _enum_auto()
    REDEPLOYING = _enum_auto()


class VMTechStatus(str, _AutoNameEnum):
    BACKUP_RUNNING = _enum_auto()
    BACKUP_STOPPED = _enum_auto()
    CLONING = _enum_auto()
    DOWN = _enum_auto()
    MERGE = _enum_auto()
    MIGRATING = _enum_auto()
    MIGRATING_IN = _enum_auto()
    MIGRATING_OUT = _enum_auto()
    PAUSED = _enum_auto()
    PAUSING = _enum_auto()
    ROLLBACK = _enum_auto()
    SCHEDULED = _enum_auto()
    SNAPCREATE = _enum_auto()
    STARTED = _enum_auto()
    STARTING = _enum_auto()
    STOPPED = _enum_auto()
    STOPPING = _enum_auto()


class AccountStatus(str, _AutoNameEnum):
    CONFIRMED = _enum_auto()
    DISABLED = _enum_auto()
    DELETED = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()


class AccountResourceType(str, _AutoNameEnum):
    VM = 'compute'
    K8S = 'k8s'
    LB = 'lb'
    VINS = 'vins'
    FLIPGROUP = 'flipgroup'


class ImageTechStatus(str, _AutoNameEnum):
    ALLOCATED = _enum_auto()
    UNALLOCATED = _enum_auto()


class ImageStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    CREATING = _enum_auto()
    DESTROYED = _enum_auto()
    MODELED = _enum_auto()
    PURGED = _enum_auto()


class ImageType(str, _AutoNameEnum):
    CDROM = 'cdrom'
    LINUX = 'linux'
    MULTI = 'multi'
    UNKNOWN = 'unknown'
    VIRTUAL = 'virtual'
    WINDOWS = 'windows'


class NetIfaceNamingTemplate(str, _AutoNameEnum):
    ENS = 'ens'
    ETH = 'eth'


class VINSStatus(str, _AutoNameEnum):
    MODELED = _enum_auto()
    CREATED = _enum_auto()
    ENABLED = _enum_auto()
    ENABLING = _enum_auto()
    DISABLED = _enum_auto()
    DISABLING = _enum_auto()
    DELETED = _enum_auto()
    DELETING = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()


class VNFType(str, _AutoNameEnum):
    DHCP = _enum_auto()
    GW = _enum_auto()
    NAT = _enum_auto()


class VNFDevStatus(str, _AutoNameEnum):
    MODELED = _enum_auto()
    CREATED = _enum_auto()
    DELETED = _enum_auto()
    DESTROYED = _enum_auto()


class VNFDevTechStatus(str, _AutoNameEnum):
    DOWN = _enum_auto()
    MIGRATING = _enum_auto()
    SCHEDULED = _enum_auto()
    STARTED = _enum_auto()
    STARTING = _enum_auto()
    STOPPED = _enum_auto()
    STOPPING = _enum_auto()


class VNFStatus(str, _AutoNameEnum):
    MODELED = _enum_auto()
    CREATED = _enum_auto()
    ENABLED = _enum_auto()
    DISABLED = _enum_auto()
    DELETED = _enum_auto()
    DESTROYED = _enum_auto()
    STASHED = _enum_auto()


class VNFTechStatus(str, _AutoNameEnum):
    STARTING = _enum_auto()
    STARTED = _enum_auto()
    STOPPING = _enum_auto()
    STOPPED = _enum_auto()
    VIRTUAL = _enum_auto()


class VINSInterfaceType(str, _AutoNameEnum):
    MGMT = _enum_auto()


class NATRuleProtocol(str, _AutoNameEnum):
    TCP = 'tcp'
    UDP = 'udp'


class VNFDevType(str, _AutoNameEnum):
    VYOS = 'vyos'


class BootMode(str, _AutoNameEnum):
    BIOS = 'bios'
    UEFI = 'uefi'


class BServiceStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DELETED = _enum_auto()
    DELETING = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()
    DISABLED = _enum_auto()
    DISABLING = _enum_auto()
    ENABLED = _enum_auto()
    ENABLING = _enum_auto()
    MODELED = _enum_auto()
    RECONFIGURING = _enum_auto()
    RESTORING = _enum_auto()


class BServiceTechStatus(str, _AutoNameEnum):
    PAUSED = _enum_auto()
    PAUSING = _enum_auto()
    STARTED = _enum_auto()
    STARTING = _enum_auto()
    STOPPED = _enum_auto()
    STOPPING = _enum_auto()


class BServiceGroupStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    CREATING = _enum_auto()
    CURRUPTED = _enum_auto()
    DELETED = _enum_auto()
    DELETING = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()
    DISABLED = _enum_auto()
    DISABLING = _enum_auto()
    ENABLED = _enum_auto()
    ENABLING = _enum_auto()
    MODELED = _enum_auto()
    RESTORING = _enum_auto()


class BServiceGroupTechStatus(str, _AutoNameEnum):
    STARTED = _enum_auto()
    STARTING = _enum_auto()
    STOPPED = _enum_auto()
    STOPPING = _enum_auto()


class SEPType(str, _AutoNameEnum):
    HITACHI = _enum_auto()
    DES = _enum_auto()
    OVS = _enum_auto()
    LOCAL = _enum_auto()
    TATLIN = _enum_auto()
    DORADO = _enum_auto()
    SHARED = _enum_auto()
    USTOR = _enum_auto()


class ExtNetStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()
    DISABLED = _enum_auto()
    DISABLING = _enum_auto()
    ENABLED = _enum_auto()
    ENABLING = _enum_auto()
    MODELED = _enum_auto()


class BootLoaderType(str, _AutoNameEnum):
    LINUX = 'linux'
    UNKNOWN = 'unknown'
    WINDOWS = 'windows'


class FlipGroupClientType(str, _AutoNameEnum):
    VM = 'compute'


class FlipGroupStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DESTROYED = _enum_auto()


class FlipGroupNetType(str, _AutoNameEnum):
    EXTNET = _enum_auto()
    VINS = _enum_auto()


class PoolDiskType(str, _AutoNameEnum):
    BOOT = 'B'
    DATA = 'D'
    ANY = _enum_auto()


class CountChangeMode(str, _AutoNameEnum):
    ABSOLUTE = _enum_auto()
    RELATIVE = _enum_auto()


class LBStatus(str, _AutoNameEnum):
    MODELED = _enum_auto()
    CREATING = _enum_auto()
    CREATED = _enum_auto()
    DELETING = _enum_auto()
    DELETED = _enum_auto()
    DESTROYING = _enum_auto()
    DESTROYED = _enum_auto()
    ENABLING = _enum_auto()
    ENABLED = _enum_auto()
    DISABLING = _enum_auto()
    DISABLED = _enum_auto()
    RESTORING = _enum_auto()


class LBTechStatus(str, _AutoNameEnum):
    STARTING = _enum_auto()
    STARTED = _enum_auto()
    STOPPING = _enum_auto()
    STOPPED = _enum_auto()


class LBBackendAlgorithm(str, _AutoNameEnum):
    ROUNDROBIN = 'roundrobin'
    STATIC_RR = 'static-rr'
    LEASTCONN = 'leastconn'


class LBServerCheck(str, _AutoNameEnum):
    ENABLED = 'enabled'
    DISABLED = 'disabled'


class AccessTypeForSet(str, _AutoNameEnum):
    ARCXDU = _enum_auto()
    RCX = _enum_auto()
    R = _enum_auto()


class DataDisksChangeMode(str, _AutoNameEnum):
    DESTROY = _enum_auto()
    DETACH = _enum_auto()
    KEEP = _enum_auto()


class AuthBroker(str, _AutoNameEnum):
    DECS3O = 'decs3o'
    BVS = 'bvs'


class DHCPReservationType(str, _AutoNameEnum):
    DHCP = _enum_auto()
    EXCLUDED = _enum_auto()
    SERVICE = _enum_auto()
    VIP = _enum_auto()


class TaskStatus(str, _AutoNameEnum):
    ABORTED = _enum_auto()
    CLEANUPED = _enum_auto()
    ERROR = _enum_auto()
    OK = _enum_auto()
    PROCESSING = _enum_auto()
    SCHEDULED = _enum_auto()


class K8sNetworkPlugin(str, _AutoNameEnum):
    FLANNEL = 'flannel'
    CALICO = 'calico'
    WEAVENET = 'weavenet'


class K8CIStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DELETED = _enum_auto()
    DESTROYED = _enum_auto()
    DISABLED = _enum_auto()
    ENABLED = _enum_auto()
    MODELED = _enum_auto()


class K8sStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    CREATING = _enum_auto()
    DELETED = _enum_auto()
    DELETING = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()
    DISABLED = _enum_auto()
    DISABLING = _enum_auto()
    ENABLED = _enum_auto()
    ENABLING = _enum_auto()
    MODELED = _enum_auto()
    RESTORING = _enum_auto()


class K8sTechStatus(str, _AutoNameEnum):
    STARTED = _enum_auto()
    STARTING = _enum_auto()
    STOPPED = _enum_auto()
    STOPPING = _enum_auto()


class DPDKNetStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DESTROYED = _enum_auto()
    DISABLED = _enum_auto()
    ENABLED = _enum_auto()


class VFPoolStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DESTROYED = _enum_auto()
    DISABLED = _enum_auto()
    ENABLED = _enum_auto()


class LinkState(str, _AutoNameEnum):
    ON = 'on'
    OFF = 'off'


class ZoneStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DESTROYED = _enum_auto()


class TrafficDirection(str, _AutoNameEnum):
    INBOUND = 'inbound'
    OUTBOUND = 'outbound'


class SGRuleEthertype(str, _AutoNameEnum):
    IPV4 = 'IPv4'
    IPV6 = 'IPv6'


class SGRuleProtocol(str, _AutoNameEnum):
    ICMP = 'icmp'
    TCP = 'tcp'
    UDP = 'udp'


class TrunkStatus(str, _AutoNameEnum):
    CREATED = _enum_auto()
    DESTROYED = _enum_auto()
    DESTROYING = _enum_auto()
    DISABLED = _enum_auto()
    ENABLED = _enum_auto()
    ENABLING = _enum_auto()
    MODELED = _enum_auto()


class StoragePolicyStatus(str, _AutoNameEnum):
    DESTROYED = _enum_auto()
    DISABLED = _enum_auto()
    ENABLED = _enum_auto()


class JobStatus(str, _AutoNameEnum):
    ABORTED = _enum_auto()
    CLEANUPED = _enum_auto()
    ERROR = _enum_auto()
    OK = _enum_auto()
    PROCESSING = _enum_auto()
    SCHEDULED = _enum_auto()


class PGPUProcessorType(str, _AutoNameEnum):
    NVIDIA = _enum_auto()
    DUMMY = _enum_auto()


class PGPUMode(str, _AutoNameEnum):
    PASSTHROUGH = _enum_auto()


class VGPUStatus(str, _AutoNameEnum):
    ALLOCATED = _enum_auto()
    ALLOCATING = _enum_auto()
    CLAIMED = _enum_auto()
    CLAIMING = _enum_auto()
    CREATED = _enum_auto()
    DEALLOCATED = _enum_auto()
    DEALLOCATING = _enum_auto()
    DESTROYED = _enum_auto()
    ERROR = _enum_auto()


class NetMapSourceType(str, _AutoNameEnum):
    NETWORK = 'network'
    BRIDGE = 'bridge'


class DiskMigrateJobType(int, Enum):
    PULL = 1
    COPY = 2
    COMMIT = 3


class PCIDeviceStatus(str, _AutoNameEnum):
    CLAIMED = _enum_auto()
    CLAIMING = _enum_auto()
    DESTROYED = _enum_auto()
    DISABLED = _enum_auto()
    ENABLED = _enum_auto()
    ERROR = _enum_auto()


class CPUAllocationMode(str, _AutoNameEnum):
    STRICT = 'strict'
    LOOSE = 'loose'


class SEPTechStatus(str, _AutoNameEnum):
    DISABLED = _enum_auto()
    ENABLED = _enum_auto()


class DiskCacheMode(str, _AutoNameEnum):
    NONE = 'none'
    WRITETHROUGH = 'writethrough'


class DiskBlockSize(str, _AutoNameEnum):
    VAL_512 = '512'
    VAL_512E = '512e'
    VAL_4K = '4k'


class CPUAllocationParam(str, _AutoNameEnum):
    STRICT = 'strict'
    LOOSE = 'loose'
    NONE = ''


class DiskProvisionType(str, _AutoNameEnum):
    THICK = 'thick'
    THIN = 'thin'


class DRSDXSSOType(str, _AutoNameEnum):
    BVS = 'bvs'
    DECS3O = 'decs3o'
