# coding: utf-8

"""
    STACKIT Key Management Service API

    This API provides endpoints for managing keys and key rings. 

    The version of the OpenAPI document: 1.0.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501

from __future__ import annotations

import json
from enum import Enum

from typing_extensions import Self


class Algorithm(str, Enum):
    """
    The algorithm the key material uses.
    """

    """
    allowed enum values
    """
    AES_256_GCM = "aes_256_gcm"
    RSA_2048_OAEP_SHA256 = "rsa_2048_oaep_sha256"
    RSA_3072_OAEP_SHA256 = "rsa_3072_oaep_sha256"
    RSA_4096_OAEP_SHA256 = "rsa_4096_oaep_sha256"
    RSA_4096_OAEP_SHA512 = "rsa_4096_oaep_sha512"
    HMAC_SHA256 = "hmac_sha256"
    HMAC_SHA384 = "hmac_sha384"
    HMAC_SHA512 = "hmac_sha512"
    ECDSA_P256_SHA256 = "ecdsa_p256_sha256"
    ECDSA_P384_SHA384 = "ecdsa_p384_sha384"
    ECDSA_P521_SHA512 = "ecdsa_p521_sha512"

    @classmethod
    def from_json(cls, json_str: str) -> Self:
        """Create an instance of Algorithm from a JSON string"""
        return cls(json.loads(json_str))
