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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .signing_keys_date import SigningKeysDate


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

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

    pkcs_7: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="pkcs7"),
        pydantic.Field(alias="pkcs7", description="The public certificate of the signing key in pkcs7 format"),
    ] = 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 the current key
    """

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

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

    current_since: typing.Optional[SigningKeysDate] = None
    current_until: typing.Optional[SigningKeysDate] = None
    fingerprint: str = pydantic.Field()
    """
    The cert fingerprint
    """

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

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

    revoked_at: typing.Optional[SigningKeysDate] = 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
