# coding: utf-8

"""
    OidcVpAdapterBackend

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

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

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


from __future__ import annotations
import pprint
import re  # noqa: F401
import json


from typing import List, Optional
from pydantic import BaseModel, Field, StrictStr, conlist

class JsonWebKeyKeysInner(BaseModel):
    """
    JsonWebKeyKeysInner
    """
    alg: StrictStr = Field(default=..., description="The \"alg\" (algorithm) parameter identifies the algorithm intended for use  with the key. The values used should either be registered in the IANA  \"JSON Web Signature and Encryption Algorithms\" registry established  by [JWA] or be a value that contains a Collision- Resistant Name. ")
    crv: Optional[StrictStr] = None
    d: Optional[StrictStr] = None
    dp: Optional[StrictStr] = None
    dq: Optional[StrictStr] = None
    e: Optional[StrictStr] = None
    k: Optional[StrictStr] = None
    kid: StrictStr = Field(default=..., description="The \"kid\" (key ID) parameter is used to match a specific key. This is used,  for instance, to choose among a set of keys within a JWK Set during key  rollover. The structure of the \"kid\" value is unspecified. When \"kid\"  values are used within a JWK Set, different keys within the JWK Set SHOULD  use distinct \"kid\" values. (One example in which different keys might use  the same \"kid\" value is if they have different \"kty\" (key type) values but  are considered to be equivalent alternatives by the application using them.)  The \"kid\" value is a case-sensitive string. ")
    kty: StrictStr = Field(default=..., description="The \"kty\" (key type) parameter identifies the cryptographic algorithm family  used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be  registered in the IANA \"JSON Web Key Types\" registry established by [JWA]  or be a value that contains a Collision- Resistant Name. The \"kty\" value  is a case-sensitive string. ")
    n: Optional[StrictStr] = None
    p: Optional[StrictStr] = None
    q: Optional[StrictStr] = None
    qi: Optional[StrictStr] = None
    use: StrictStr = Field(default=..., description="Use (\"public key use\") identifies the intended use of the public key. The  \"use\" parameter is employed to indicate whether a public key is used for  encrypting data or verifying the signature on data. Values are commonly  \"sig\" (signature) or \"enc\" (encryption). ")
    x: Optional[StrictStr] = None
    x5c: conlist(StrictStr) = Field(default=..., description="The \"x5c\" (X.509 certificate chain) parameter contains a chain of one  or more PKIX certificates [RFC5280]. The certificate chain is represented  as a JSON array of certificate value strings. Each string in the array is  a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the  key value MUST be the first certificate. ")
    y: Optional[StrictStr] = None
    __properties = ["alg", "crv", "d", "dp", "dq", "e", "k", "kid", "kty", "n", "p", "q", "qi", "use", "x", "x5c", "y"]

    class Config:
        """Pydantic configuration"""
        allow_population_by_field_name = True
        validate_assignment = True

    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.dict(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(self.to_dict())

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

    def to_dict(self):
        """Returns the dictionary representation of the model using alias"""
        _dict = self.dict(by_alias=True,
                          exclude={
                          },
                          exclude_none=True)
        return _dict

    @classmethod
    def from_dict(cls, obj: dict) -> JsonWebKeyKeysInner:
        """Create an instance of JsonWebKeyKeysInner from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return JsonWebKeyKeysInner.parse_obj(obj)

        _obj = JsonWebKeyKeysInner.parse_obj({
            "alg": obj.get("alg"),
            "crv": obj.get("crv"),
            "d": obj.get("d"),
            "dp": obj.get("dp"),
            "dq": obj.get("dq"),
            "e": obj.get("e"),
            "k": obj.get("k"),
            "kid": obj.get("kid"),
            "kty": obj.get("kty"),
            "n": obj.get("n"),
            "p": obj.get("p"),
            "q": obj.get("q"),
            "qi": obj.get("qi"),
            "use": obj.get("use"),
            "x": obj.get("x"),
            "x5c": obj.get("x5c"),
            "y": obj.get("y")
        })
        return _obj


