import datetime

from google.api import annotations_pb2 as _annotations_pb2
from google.api import field_behavior_pb2 as _field_behavior_pb2
from google.protobuf import timestamp_pb2 as _timestamp_pb2
from tars.auth.v1 import auth_options_pb2 as _auth_options_pb2
from tars.cli.v1 import cli_pb2 as _cli_pb2
from tars.docs.v1 import docs_pb2 as _docs_pb2
from google.protobuf.internal import containers as _containers
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 Iterable as _Iterable, Mapping as _Mapping
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union

DESCRIPTOR: _descriptor.FileDescriptor

class Provider(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
    __slots__ = ()
    PROVIDER_UNSPECIFIED: _ClassVar[Provider]
    PROVIDER_OPENAI: _ClassVar[Provider]
    PROVIDER_ANTHROPIC: _ClassVar[Provider]
    PROVIDER_AZURE_OPENAI: _ClassVar[Provider]
    PROVIDER_GOOGLE_VERTEX: _ClassVar[Provider]
    PROVIDER_AWS_BEDROCK: _ClassVar[Provider]
PROVIDER_UNSPECIFIED: Provider
PROVIDER_OPENAI: Provider
PROVIDER_ANTHROPIC: Provider
PROVIDER_AZURE_OPENAI: Provider
PROVIDER_GOOGLE_VERTEX: Provider
PROVIDER_AWS_BEDROCK: Provider

class AiKey(_message.Message):
    __slots__ = ("id", "customer_id", "project_id", "provider", "name", "display_suffix", "user_scope", "scope_user_id", "created_at", "updated_at", "revoked_at", "secret_ref")
    ID_FIELD_NUMBER: _ClassVar[int]
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    PROJECT_ID_FIELD_NUMBER: _ClassVar[int]
    PROVIDER_FIELD_NUMBER: _ClassVar[int]
    NAME_FIELD_NUMBER: _ClassVar[int]
    DISPLAY_SUFFIX_FIELD_NUMBER: _ClassVar[int]
    USER_SCOPE_FIELD_NUMBER: _ClassVar[int]
    SCOPE_USER_ID_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
    REVOKED_AT_FIELD_NUMBER: _ClassVar[int]
    SECRET_REF_FIELD_NUMBER: _ClassVar[int]
    id: str
    customer_id: str
    project_id: str
    provider: Provider
    name: str
    display_suffix: str
    user_scope: bool
    scope_user_id: str
    created_at: _timestamp_pb2.Timestamp
    updated_at: _timestamp_pb2.Timestamp
    revoked_at: _timestamp_pb2.Timestamp
    secret_ref: str
    def __init__(self, id: _Optional[str] = ..., customer_id: _Optional[str] = ..., project_id: _Optional[str] = ..., provider: _Optional[_Union[Provider, str]] = ..., name: _Optional[str] = ..., display_suffix: _Optional[str] = ..., user_scope: _Optional[bool] = ..., scope_user_id: _Optional[str] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., revoked_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., secret_ref: _Optional[str] = ...) -> None: ...

class RegisterRequest(_message.Message):
    __slots__ = ("customer_id", "project_id", "provider", "name", "secret", "user_scope")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    PROJECT_ID_FIELD_NUMBER: _ClassVar[int]
    PROVIDER_FIELD_NUMBER: _ClassVar[int]
    NAME_FIELD_NUMBER: _ClassVar[int]
    SECRET_FIELD_NUMBER: _ClassVar[int]
    USER_SCOPE_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    project_id: str
    provider: Provider
    name: str
    secret: str
    user_scope: bool
    def __init__(self, customer_id: _Optional[str] = ..., project_id: _Optional[str] = ..., provider: _Optional[_Union[Provider, str]] = ..., name: _Optional[str] = ..., secret: _Optional[str] = ..., user_scope: _Optional[bool] = ...) -> None: ...

class RegisterResponse(_message.Message):
    __slots__ = ("key",)
    KEY_FIELD_NUMBER: _ClassVar[int]
    key: AiKey
    def __init__(self, key: _Optional[_Union[AiKey, _Mapping]] = ...) -> None: ...

class GetRequest(_message.Message):
    __slots__ = ("customer_id", "project_id", "id")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    PROJECT_ID_FIELD_NUMBER: _ClassVar[int]
    ID_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    project_id: str
    id: str
    def __init__(self, customer_id: _Optional[str] = ..., project_id: _Optional[str] = ..., id: _Optional[str] = ...) -> None: ...

class GetResponse(_message.Message):
    __slots__ = ("key",)
    KEY_FIELD_NUMBER: _ClassVar[int]
    key: AiKey
    def __init__(self, key: _Optional[_Union[AiKey, _Mapping]] = ...) -> None: ...

class ListRequest(_message.Message):
    __slots__ = ("customer_id", "project_id")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    PROJECT_ID_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    project_id: str
    def __init__(self, customer_id: _Optional[str] = ..., project_id: _Optional[str] = ...) -> None: ...

class ListResponse(_message.Message):
    __slots__ = ("keys",)
    KEYS_FIELD_NUMBER: _ClassVar[int]
    keys: _containers.RepeatedCompositeFieldContainer[AiKey]
    def __init__(self, keys: _Optional[_Iterable[_Union[AiKey, _Mapping]]] = ...) -> None: ...

class RevokeRequest(_message.Message):
    __slots__ = ("customer_id", "project_id", "id")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    PROJECT_ID_FIELD_NUMBER: _ClassVar[int]
    ID_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    project_id: str
    id: str
    def __init__(self, customer_id: _Optional[str] = ..., project_id: _Optional[str] = ..., id: _Optional[str] = ...) -> None: ...

class RevokeResponse(_message.Message):
    __slots__ = ()
    def __init__(self) -> None: ...

class FetchRequest(_message.Message):
    __slots__ = ("id",)
    ID_FIELD_NUMBER: _ClassVar[int]
    id: str
    def __init__(self, id: _Optional[str] = ...) -> None: ...

class FetchResponse(_message.Message):
    __slots__ = ("provider", "secret", "display_suffix")
    PROVIDER_FIELD_NUMBER: _ClassVar[int]
    SECRET_FIELD_NUMBER: _ClassVar[int]
    DISPLAY_SUFFIX_FIELD_NUMBER: _ClassVar[int]
    provider: Provider
    secret: str
    display_suffix: str
    def __init__(self, provider: _Optional[_Union[Provider, str]] = ..., secret: _Optional[str] = ..., display_suffix: _Optional[str] = ...) -> None: ...
