import datetime

from google.api import field_behavior_pb2 as _field_behavior_pb2
from google.protobuf import timestamp_pb2 as _timestamp_pb2
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from collections.abc import Mapping as _Mapping
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union

DESCRIPTOR: _descriptor.FileDescriptor

class ApiKeyState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
    __slots__ = ()
    API_KEY_STATE_UNSPECIFIED: _ClassVar[ApiKeyState]
    API_KEY_STATE_ACTIVE: _ClassVar[ApiKeyState]
    API_KEY_STATE_REVOKED: _ClassVar[ApiKeyState]

class ApiKeyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
    __slots__ = ()
    API_KEY_TYPE_UNSPECIFIED: _ClassVar[ApiKeyType]
    API_KEY_TYPE_PROMPT: _ClassVar[ApiKeyType]
    API_KEY_TYPE_MANAGEMENT: _ClassVar[ApiKeyType]
API_KEY_STATE_UNSPECIFIED: ApiKeyState
API_KEY_STATE_ACTIVE: ApiKeyState
API_KEY_STATE_REVOKED: ApiKeyState
API_KEY_TYPE_UNSPECIFIED: ApiKeyType
API_KEY_TYPE_PROMPT: ApiKeyType
API_KEY_TYPE_MANAGEMENT: ApiKeyType

class ApiKey(_message.Message):
    __slots__ = ("id", "identity_id", "customer_id", "name", "prefix", "state", "type", "expires_at", "last_used_at", "created_at", "revoked_at")
    ID_FIELD_NUMBER: _ClassVar[int]
    IDENTITY_ID_FIELD_NUMBER: _ClassVar[int]
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    NAME_FIELD_NUMBER: _ClassVar[int]
    PREFIX_FIELD_NUMBER: _ClassVar[int]
    STATE_FIELD_NUMBER: _ClassVar[int]
    TYPE_FIELD_NUMBER: _ClassVar[int]
    EXPIRES_AT_FIELD_NUMBER: _ClassVar[int]
    LAST_USED_AT_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    REVOKED_AT_FIELD_NUMBER: _ClassVar[int]
    id: str
    identity_id: str
    customer_id: str
    name: str
    prefix: str
    state: ApiKeyState
    type: ApiKeyType
    expires_at: _timestamp_pb2.Timestamp
    last_used_at: _timestamp_pb2.Timestamp
    created_at: _timestamp_pb2.Timestamp
    revoked_at: _timestamp_pb2.Timestamp
    def __init__(self, id: _Optional[str] = ..., identity_id: _Optional[str] = ..., customer_id: _Optional[str] = ..., name: _Optional[str] = ..., prefix: _Optional[str] = ..., state: _Optional[_Union[ApiKeyState, str]] = ..., type: _Optional[_Union[ApiKeyType, str]] = ..., expires_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., last_used_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., revoked_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...

class Session(_message.Message):
    __slots__ = ("id", "identity_id", "issued_at", "expires_at", "step_up_active", "user_agent", "ip")
    ID_FIELD_NUMBER: _ClassVar[int]
    IDENTITY_ID_FIELD_NUMBER: _ClassVar[int]
    ISSUED_AT_FIELD_NUMBER: _ClassVar[int]
    EXPIRES_AT_FIELD_NUMBER: _ClassVar[int]
    STEP_UP_ACTIVE_FIELD_NUMBER: _ClassVar[int]
    USER_AGENT_FIELD_NUMBER: _ClassVar[int]
    IP_FIELD_NUMBER: _ClassVar[int]
    id: str
    identity_id: str
    issued_at: _timestamp_pb2.Timestamp
    expires_at: _timestamp_pb2.Timestamp
    step_up_active: bool
    user_agent: str
    ip: str
    def __init__(self, id: _Optional[str] = ..., identity_id: _Optional[str] = ..., issued_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., expires_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., step_up_active: _Optional[bool] = ..., user_agent: _Optional[str] = ..., ip: _Optional[str] = ...) -> None: ...

class Jwk(_message.Message):
    __slots__ = ("kid", "identity_id", "public_key_pem", "created_at", "deleted_at")
    KID_FIELD_NUMBER: _ClassVar[int]
    IDENTITY_ID_FIELD_NUMBER: _ClassVar[int]
    PUBLIC_KEY_PEM_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    DELETED_AT_FIELD_NUMBER: _ClassVar[int]
    kid: str
    identity_id: str
    public_key_pem: bytes
    created_at: _timestamp_pb2.Timestamp
    deleted_at: _timestamp_pb2.Timestamp
    def __init__(self, kid: _Optional[str] = ..., identity_id: _Optional[str] = ..., public_key_pem: _Optional[bytes] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., deleted_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
