# coding: utf-8

"""
    NetHSM
    All endpoints expect exactly the specified JSON. Additional properties will cause a Bad Request Error (400). All HTTP errors contain a JSON structure with an explanation of type string. All [base64](https://tools.ietf.org/html/rfc4648#section-4) encoded values are Big Endian.   # noqa: E501
    The version of the OpenAPI document: v1
    Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator
"""

from __future__ import annotations
from nethsm.client.shared_imports.schema_imports import *  # pyright: ignore [reportWildcardImportFromLibrary]



class SystemStateEnums:

    @schemas.classproperty
    def UNPROVISIONED(cls) -> typing.Literal["Unprovisioned"]:
        return SystemState.validate("Unprovisioned")

    @schemas.classproperty
    def LOCKED(cls) -> typing.Literal["Locked"]:
        return SystemState.validate("Locked")

    @schemas.classproperty
    def OPERATIONAL(cls) -> typing.Literal["Operational"]:
        return SystemState.validate("Operational")


@dataclasses.dataclass(frozen=True)
class SystemState(
    schemas.Schema
):
    """NOTE: This class is auto generated by OpenAPI JSON Schema Generator.
    Ref: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator

    Do not edit the class manually.
    """
    types: typing.FrozenSet[typing.Type] = frozenset({
        str,
    })
    enum_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field(
        default_factory=lambda: {
            "Unprovisioned": "UNPROVISIONED",
            "Locked": "LOCKED",
            "Operational": "OPERATIONAL",
        }
    )
    enums = SystemStateEnums

    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["Unprovisioned"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["Unprovisioned"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["Locked"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["Locked"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["Operational"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["Operational"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: str,
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["Unprovisioned","Locked","Operational",]: ...
    @classmethod
    def validate(
        cls,
        arg,
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal[
        "Unprovisioned",
        "Locked",
        "Operational",
    ]:
        validated_arg = super().validate_base(
            arg,
            configuration=configuration,
        )
        return typing.cast(typing.Literal[
                "Unprovisioned",
                "Locked",
                "Operational",
            ],
            validated_arg
        )
