# generated by datamodel-codegen:
#   filename:  entity/teams/authN/jwtAuth.json
#   timestamp: 2022-10-03T15:16:21+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):
    OneHour = 'OneHour'
    field_1 = '1'
    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
    JWTTokenExpiresAt: Optional[basic.Timestamp] = Field(
        None, description='JWT Auth Token expiration time.'
    )
