# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .connection_key_use_enum import ConnectionKeyUseEnum


class PostConnectionsKeysResponseContentItem(UniversalBaseModel):
    kid: str = pydantic.Field()
    """
    The key id of the signing key
    """

    cert: str = pydantic.Field()
    """
    The public certificate of the signing key
    """

    pkcs: typing.Optional[str] = pydantic.Field(default=None)
    """
    The public certificate of the signing key in pkcs7 format
    """

    current: typing.Optional[bool] = pydantic.Field(default=None)
    """
    True if the key is the current key
    """

    next: typing.Optional[bool] = pydantic.Field(default=None)
    """
    True if the key is the next key
    """

    current_since: typing.Optional[str] = pydantic.Field(default=None)
    """
    The date and time when the key became the current key
    """

    fingerprint: str = pydantic.Field()
    """
    The cert fingerprint
    """

    thumbprint: str = pydantic.Field()
    """
    The cert thumbprint
    """

    algorithm: typing.Optional[str] = pydantic.Field(default=None)
    """
    Signing key algorithm
    """

    key_use: typing.Optional[ConnectionKeyUseEnum] = None
    subject_dn: typing.Optional[str] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
