# generated by datamodel-codegen:
#   filename:  schema/entity/teams/authN/jwtAuth.json
#   timestamp: 2022-05-10T08:41:27+00:00

from __future__ import annotations

from enum import Enum
from typing import Optional

from pydantic import BaseModel, Extra, Field

from ....type import basic


class JWTTokenExpiry(Enum):
    field_7 = '7'
    field_30 = '30'
    field_60 = '60'
    field_90 = '90'
    Unlimited = 'Unlimited'


class JWTAuthMechanism(BaseModel):
    class Config:
        extra = Extra.forbid

    JWTToken: str = Field(..., description='JWT Auth Token.')
    JWTTokenExpiry: JWTTokenExpiry = Field(
        ..., description='JWT Auth Token expiration in days'
    )
    JWTTokenExpiresAt: Optional[basic.Timestamp] = Field(
        None, description='JWT Auth Token expiration time.'
    )
