# 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 DecryptModeEnums:

    @schemas.classproperty
    def RAW(cls) -> typing.Literal["RAW"]:
        return DecryptMode.validate("RAW")

    @schemas.classproperty
    def PKCS1(cls) -> typing.Literal["PKCS1"]:
        return DecryptMode.validate("PKCS1")

    @schemas.classproperty
    def OAEP_MD5(cls) -> typing.Literal["OAEP_MD5"]:
        return DecryptMode.validate("OAEP_MD5")

    @schemas.classproperty
    def OAEP_SHA1(cls) -> typing.Literal["OAEP_SHA1"]:
        return DecryptMode.validate("OAEP_SHA1")

    @schemas.classproperty
    def OAEP_SHA224(cls) -> typing.Literal["OAEP_SHA224"]:
        return DecryptMode.validate("OAEP_SHA224")

    @schemas.classproperty
    def OAEP_SHA256(cls) -> typing.Literal["OAEP_SHA256"]:
        return DecryptMode.validate("OAEP_SHA256")

    @schemas.classproperty
    def OAEP_SHA384(cls) -> typing.Literal["OAEP_SHA384"]:
        return DecryptMode.validate("OAEP_SHA384")

    @schemas.classproperty
    def OAEP_SHA512(cls) -> typing.Literal["OAEP_SHA512"]:
        return DecryptMode.validate("OAEP_SHA512")

    @schemas.classproperty
    def AES_CBC(cls) -> typing.Literal["AES_CBC"]:
        return DecryptMode.validate("AES_CBC")


@dataclasses.dataclass(frozen=True)
class DecryptMode(
    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: {
            "RAW": "RAW",
            "PKCS1": "PKCS1",
            "OAEP_MD5": "OAEP_MD5",
            "OAEP_SHA1": "OAEP_SHA1",
            "OAEP_SHA224": "OAEP_SHA224",
            "OAEP_SHA256": "OAEP_SHA256",
            "OAEP_SHA384": "OAEP_SHA384",
            "OAEP_SHA512": "OAEP_SHA512",
            "AES_CBC": "AES_CBC",
        }
    )
    enums = DecryptModeEnums

    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["RAW"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["RAW"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["PKCS1"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["PKCS1"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["OAEP_MD5"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["OAEP_MD5"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["OAEP_SHA1"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["OAEP_SHA1"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["OAEP_SHA224"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["OAEP_SHA224"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["OAEP_SHA256"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["OAEP_SHA256"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["OAEP_SHA384"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["OAEP_SHA384"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["OAEP_SHA512"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["OAEP_SHA512"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: typing.Literal["AES_CBC"],
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["AES_CBC"]: ...
    @typing.overload
    @classmethod
    def validate(
        cls,
        arg: str,
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal["RAW","PKCS1","OAEP_MD5","OAEP_SHA1","OAEP_SHA224","OAEP_SHA256","OAEP_SHA384","OAEP_SHA512","AES_CBC",]: ...
    @classmethod
    def validate(
        cls,
        arg,
        configuration: typing.Optional[schema_configuration.SchemaConfiguration] = None
    ) -> typing.Literal[
        "RAW",
        "PKCS1",
        "OAEP_MD5",
        "OAEP_SHA1",
        "OAEP_SHA224",
        "OAEP_SHA256",
        "OAEP_SHA384",
        "OAEP_SHA512",
        "AES_CBC",
    ]:
        validated_arg = super().validate_base(
            arg,
            configuration=configuration,
        )
        return typing.cast(typing.Literal[
                "RAW",
                "PKCS1",
                "OAEP_MD5",
                "OAEP_SHA1",
                "OAEP_SHA224",
                "OAEP_SHA256",
                "OAEP_SHA384",
                "OAEP_SHA512",
                "AES_CBC",
            ],
            validated_arg
        )
