# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from enum import Enum
from azure.core import CaseInsensitiveEnumMeta


class AutoRunState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Enabling this field will trigger an automatic build on image template creation or update."""

    AUTO_RUN_ENABLED = "Enabled"
    """Autorun is enabled"""
    AUTO_RUN_DISABLED = "Disabled"
    """Autorun is disabled"""


class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The type of identity that created the resource."""

    USER = "User"
    APPLICATION = "Application"
    MANAGED_IDENTITY = "ManagedIdentity"
    KEY = "Key"


class OnBuildError(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Error handling behavior upon build failure."""

    CLEANUP = "cleanup"
    ABORT = "abort"


class ProvisioningErrorCode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Error code of the provisioning failure."""

    BAD_SOURCE_TYPE = "BadSourceType"
    BAD_PIR_SOURCE = "BadPIRSource"
    BAD_MANAGED_IMAGE_SOURCE = "BadManagedImageSource"
    BAD_SHARED_IMAGE_VERSION_SOURCE = "BadSharedImageVersionSource"
    BAD_CUSTOMIZER_TYPE = "BadCustomizerType"
    UNSUPPORTED_CUSTOMIZER_TYPE = "UnsupportedCustomizerType"
    NO_CUSTOMIZER_SCRIPT = "NoCustomizerScript"
    BAD_VALIDATOR_TYPE = "BadValidatorType"
    UNSUPPORTED_VALIDATOR_TYPE = "UnsupportedValidatorType"
    NO_VALIDATOR_SCRIPT = "NoValidatorScript"
    BAD_DISTRIBUTE_TYPE = "BadDistributeType"
    BAD_SHARED_IMAGE_DISTRIBUTE = "BadSharedImageDistribute"
    BAD_STAGING_RESOURCE_GROUP = "BadStagingResourceGroup"
    SERVER_ERROR = "ServerError"
    OTHER = "Other"


class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Provisioning state of the resource."""

    CREATING = "Creating"
    UPDATING = "Updating"
    SUCCEEDED = "Succeeded"
    FAILED = "Failed"
    DELETING = "Deleting"
    CANCELED = "Canceled"


class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """The type of identity used for the image template. The type 'None' will remove any identities
    from the image template.
    """

    USER_ASSIGNED = "UserAssigned"
    NONE = "None"


class RunState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """State of the last run."""

    RUNNING = "Running"
    CANCELING = "Canceling"
    SUCCEEDED = "Succeeded"
    PARTIALLY_SUCCEEDED = "PartiallySucceeded"
    FAILED = "Failed"
    CANCELED = "Canceled"


class RunSubState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Sub-state of the last run."""

    QUEUED = "Queued"
    BUILDING = "Building"
    CUSTOMIZING = "Customizing"
    OPTIMIZING = "Optimizing"
    VALIDATING = "Validating"
    DISTRIBUTING = "Distributing"


class SharedImageStorageAccountType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Specifies the storage account type to be used to store the Azure Compute Gallery image version
    in.
    """

    STANDARD_LRS = "Standard_LRS"
    STANDARD_ZRS = "Standard_ZRS"
    PREMIUM_LRS = "Premium_LRS"


class VMBootOptimizationState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
    """Enabling this field will improve VM boot time by optimizing the final customized image output."""

    ENABLED = "Enabled"
    DISABLED = "Disabled"
