import datetime

from buf.validate import validate_pb2 as _validate_pb2
from google.api import annotations_pb2 as _annotations_pb2
from google.protobuf import timestamp_pb2 as _timestamp_pb2
from tars.auth.v1 import auth_options_pb2 as _auth_options_pb2
from tars.docs.v1 import docs_pb2 as _docs_pb2
from google.protobuf.internal import containers as _containers
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 RegisterServiceAccountRequest(_message.Message):
    __slots__ = ("customer_id", "workspace_id", "client_email", "private_key_id", "issuer", "audience", "jwks_uri", "scopes", "expires_at", "public_keys", "checksum", "checksum_algorithm")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    WORKSPACE_ID_FIELD_NUMBER: _ClassVar[int]
    CLIENT_EMAIL_FIELD_NUMBER: _ClassVar[int]
    PRIVATE_KEY_ID_FIELD_NUMBER: _ClassVar[int]
    ISSUER_FIELD_NUMBER: _ClassVar[int]
    AUDIENCE_FIELD_NUMBER: _ClassVar[int]
    JWKS_URI_FIELD_NUMBER: _ClassVar[int]
    SCOPES_FIELD_NUMBER: _ClassVar[int]
    EXPIRES_AT_FIELD_NUMBER: _ClassVar[int]
    PUBLIC_KEYS_FIELD_NUMBER: _ClassVar[int]
    CHECKSUM_FIELD_NUMBER: _ClassVar[int]
    CHECKSUM_ALGORITHM_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    workspace_id: str
    client_email: str
    private_key_id: str
    issuer: str
    audience: str
    jwks_uri: str
    scopes: _containers.RepeatedScalarFieldContainer[str]
    expires_at: _timestamp_pb2.Timestamp
    public_keys: _containers.RepeatedCompositeFieldContainer[PublicKey]
    checksum: str
    checksum_algorithm: str
    def __init__(self, customer_id: _Optional[str] = ..., workspace_id: _Optional[str] = ..., client_email: _Optional[str] = ..., private_key_id: _Optional[str] = ..., issuer: _Optional[str] = ..., audience: _Optional[str] = ..., jwks_uri: _Optional[str] = ..., scopes: _Optional[_Iterable[str]] = ..., expires_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., public_keys: _Optional[_Iterable[_Union[PublicKey, _Mapping]]] = ..., checksum: _Optional[str] = ..., checksum_algorithm: _Optional[str] = ...) -> None: ...

class RegisterServiceAccountResponse(_message.Message):
    __slots__ = ("id", "created_at", "message")
    ID_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    MESSAGE_FIELD_NUMBER: _ClassVar[int]
    id: str
    created_at: _timestamp_pb2.Timestamp
    message: str
    def __init__(self, id: _Optional[str] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., message: _Optional[str] = ...) -> None: ...

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

class RevokeServiceAccountResponse(_message.Message):
    __slots__ = ("id", "revoked_at", "message")
    ID_FIELD_NUMBER: _ClassVar[int]
    REVOKED_AT_FIELD_NUMBER: _ClassVar[int]
    MESSAGE_FIELD_NUMBER: _ClassVar[int]
    id: str
    revoked_at: _timestamp_pb2.Timestamp
    message: str
    def __init__(self, id: _Optional[str] = ..., revoked_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., message: _Optional[str] = ...) -> None: ...

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

class GetServiceAccountResponse(_message.Message):
    __slots__ = ("service_account",)
    SERVICE_ACCOUNT_FIELD_NUMBER: _ClassVar[int]
    service_account: ServiceAccountInfo
    def __init__(self, service_account: _Optional[_Union[ServiceAccountInfo, _Mapping]] = ...) -> None: ...

class LookupServiceAccountRequest(_message.Message):
    __slots__ = ("customer_id", "workspace_id", "private_key_id")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    WORKSPACE_ID_FIELD_NUMBER: _ClassVar[int]
    PRIVATE_KEY_ID_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    workspace_id: str
    private_key_id: str
    def __init__(self, customer_id: _Optional[str] = ..., workspace_id: _Optional[str] = ..., private_key_id: _Optional[str] = ...) -> None: ...

class LookupServiceAccountResponse(_message.Message):
    __slots__ = ("service_account",)
    SERVICE_ACCOUNT_FIELD_NUMBER: _ClassVar[int]
    service_account: ServiceAccountInfo
    def __init__(self, service_account: _Optional[_Union[ServiceAccountInfo, _Mapping]] = ...) -> None: ...

class ListServiceAccountsRequest(_message.Message):
    __slots__ = ("customer_id", "workspace_id", "include_revoked", "page_size", "page_token")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    WORKSPACE_ID_FIELD_NUMBER: _ClassVar[int]
    INCLUDE_REVOKED_FIELD_NUMBER: _ClassVar[int]
    PAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
    PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    workspace_id: str
    include_revoked: bool
    page_size: int
    page_token: str
    def __init__(self, customer_id: _Optional[str] = ..., workspace_id: _Optional[str] = ..., include_revoked: _Optional[bool] = ..., page_size: _Optional[int] = ..., page_token: _Optional[str] = ...) -> None: ...

class ListServiceAccountsResponse(_message.Message):
    __slots__ = ("service_accounts", "next_page_token", "total_count")
    SERVICE_ACCOUNTS_FIELD_NUMBER: _ClassVar[int]
    NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int]
    TOTAL_COUNT_FIELD_NUMBER: _ClassVar[int]
    service_accounts: _containers.RepeatedCompositeFieldContainer[ServiceAccountInfo]
    next_page_token: str
    total_count: int
    def __init__(self, service_accounts: _Optional[_Iterable[_Union[ServiceAccountInfo, _Mapping]]] = ..., next_page_token: _Optional[str] = ..., total_count: _Optional[int] = ...) -> None: ...

class GetServiceAccountPublicKeysRequest(_message.Message):
    __slots__ = ("service_account_id",)
    SERVICE_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int]
    service_account_id: str
    def __init__(self, service_account_id: _Optional[str] = ...) -> None: ...

class GetServiceAccountPublicKeysResponse(_message.Message):
    __slots__ = ("public_keys",)
    PUBLIC_KEYS_FIELD_NUMBER: _ClassVar[int]
    public_keys: _containers.RepeatedCompositeFieldContainer[PublicKey]
    def __init__(self, public_keys: _Optional[_Iterable[_Union[PublicKey, _Mapping]]] = ...) -> None: ...

class ServiceAccountInfo(_message.Message):
    __slots__ = ("id", "customer_id", "workspace_id", "client_email", "private_key_id", "issuer", "audience", "jwks_uri", "scopes", "created_at", "expires_at", "revoked_at", "revoked_reason", "checksum", "checksum_algorithm")
    ID_FIELD_NUMBER: _ClassVar[int]
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    WORKSPACE_ID_FIELD_NUMBER: _ClassVar[int]
    CLIENT_EMAIL_FIELD_NUMBER: _ClassVar[int]
    PRIVATE_KEY_ID_FIELD_NUMBER: _ClassVar[int]
    ISSUER_FIELD_NUMBER: _ClassVar[int]
    AUDIENCE_FIELD_NUMBER: _ClassVar[int]
    JWKS_URI_FIELD_NUMBER: _ClassVar[int]
    SCOPES_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    EXPIRES_AT_FIELD_NUMBER: _ClassVar[int]
    REVOKED_AT_FIELD_NUMBER: _ClassVar[int]
    REVOKED_REASON_FIELD_NUMBER: _ClassVar[int]
    CHECKSUM_FIELD_NUMBER: _ClassVar[int]
    CHECKSUM_ALGORITHM_FIELD_NUMBER: _ClassVar[int]
    id: str
    customer_id: str
    workspace_id: str
    client_email: str
    private_key_id: str
    issuer: str
    audience: str
    jwks_uri: str
    scopes: _containers.RepeatedScalarFieldContainer[str]
    created_at: _timestamp_pb2.Timestamp
    expires_at: _timestamp_pb2.Timestamp
    revoked_at: _timestamp_pb2.Timestamp
    revoked_reason: str
    checksum: str
    checksum_algorithm: str
    def __init__(self, id: _Optional[str] = ..., customer_id: _Optional[str] = ..., workspace_id: _Optional[str] = ..., client_email: _Optional[str] = ..., private_key_id: _Optional[str] = ..., issuer: _Optional[str] = ..., audience: _Optional[str] = ..., jwks_uri: _Optional[str] = ..., scopes: _Optional[_Iterable[str]] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., expires_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., revoked_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., revoked_reason: _Optional[str] = ..., checksum: _Optional[str] = ..., checksum_algorithm: _Optional[str] = ...) -> None: ...

class PublicKey(_message.Message):
    __slots__ = ("kid", "alg", "use", "key_pem", "created_at")
    KID_FIELD_NUMBER: _ClassVar[int]
    ALG_FIELD_NUMBER: _ClassVar[int]
    USE_FIELD_NUMBER: _ClassVar[int]
    KEY_PEM_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    kid: str
    alg: str
    use: str
    key_pem: str
    created_at: _timestamp_pb2.Timestamp
    def __init__(self, kid: _Optional[str] = ..., alg: _Optional[str] = ..., use: _Optional[str] = ..., key_pem: _Optional[str] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...

class CreateRegistryCredentialRequest(_message.Message):
    __slots__ = ("customer_id", "workspace_id", "description", "expires_at", "scopes")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    WORKSPACE_ID_FIELD_NUMBER: _ClassVar[int]
    DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
    EXPIRES_AT_FIELD_NUMBER: _ClassVar[int]
    SCOPES_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    workspace_id: str
    description: str
    expires_at: _timestamp_pb2.Timestamp
    scopes: _containers.RepeatedScalarFieldContainer[str]
    def __init__(self, customer_id: _Optional[str] = ..., workspace_id: _Optional[str] = ..., description: _Optional[str] = ..., expires_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., scopes: _Optional[_Iterable[str]] = ...) -> None: ...

class CreateRegistryCredentialResponse(_message.Message):
    __slots__ = ("id", "username", "password", "created_at", "message")
    ID_FIELD_NUMBER: _ClassVar[int]
    USERNAME_FIELD_NUMBER: _ClassVar[int]
    PASSWORD_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    MESSAGE_FIELD_NUMBER: _ClassVar[int]
    id: str
    username: str
    password: str
    created_at: _timestamp_pb2.Timestamp
    message: str
    def __init__(self, id: _Optional[str] = ..., username: _Optional[str] = ..., password: _Optional[str] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., message: _Optional[str] = ...) -> None: ...

class ListRegistryCredentialsRequest(_message.Message):
    __slots__ = ("customer_id", "workspace_id", "include_revoked", "page_size", "page_token")
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    WORKSPACE_ID_FIELD_NUMBER: _ClassVar[int]
    INCLUDE_REVOKED_FIELD_NUMBER: _ClassVar[int]
    PAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
    PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int]
    customer_id: str
    workspace_id: str
    include_revoked: bool
    page_size: int
    page_token: str
    def __init__(self, customer_id: _Optional[str] = ..., workspace_id: _Optional[str] = ..., include_revoked: _Optional[bool] = ..., page_size: _Optional[int] = ..., page_token: _Optional[str] = ...) -> None: ...

class ListRegistryCredentialsResponse(_message.Message):
    __slots__ = ("credentials", "next_page_token", "total_count")
    CREDENTIALS_FIELD_NUMBER: _ClassVar[int]
    NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int]
    TOTAL_COUNT_FIELD_NUMBER: _ClassVar[int]
    credentials: _containers.RepeatedCompositeFieldContainer[RegistryCredentialInfo]
    next_page_token: str
    total_count: int
    def __init__(self, credentials: _Optional[_Iterable[_Union[RegistryCredentialInfo, _Mapping]]] = ..., next_page_token: _Optional[str] = ..., total_count: _Optional[int] = ...) -> None: ...

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

class RevokeRegistryCredentialResponse(_message.Message):
    __slots__ = ("id", "revoked_at", "message")
    ID_FIELD_NUMBER: _ClassVar[int]
    REVOKED_AT_FIELD_NUMBER: _ClassVar[int]
    MESSAGE_FIELD_NUMBER: _ClassVar[int]
    id: str
    revoked_at: _timestamp_pb2.Timestamp
    message: str
    def __init__(self, id: _Optional[str] = ..., revoked_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., message: _Optional[str] = ...) -> None: ...

class RegistryCredentialInfo(_message.Message):
    __slots__ = ("id", "customer_id", "workspace_id", "username", "description", "scopes", "created_at", "created_by", "expires_at", "last_used_at", "revoked_at", "revoked_reason", "revoked_by")
    ID_FIELD_NUMBER: _ClassVar[int]
    CUSTOMER_ID_FIELD_NUMBER: _ClassVar[int]
    WORKSPACE_ID_FIELD_NUMBER: _ClassVar[int]
    USERNAME_FIELD_NUMBER: _ClassVar[int]
    DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
    SCOPES_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    CREATED_BY_FIELD_NUMBER: _ClassVar[int]
    EXPIRES_AT_FIELD_NUMBER: _ClassVar[int]
    LAST_USED_AT_FIELD_NUMBER: _ClassVar[int]
    REVOKED_AT_FIELD_NUMBER: _ClassVar[int]
    REVOKED_REASON_FIELD_NUMBER: _ClassVar[int]
    REVOKED_BY_FIELD_NUMBER: _ClassVar[int]
    id: str
    customer_id: str
    workspace_id: str
    username: str
    description: str
    scopes: _containers.RepeatedScalarFieldContainer[str]
    created_at: _timestamp_pb2.Timestamp
    created_by: str
    expires_at: _timestamp_pb2.Timestamp
    last_used_at: _timestamp_pb2.Timestamp
    revoked_at: _timestamp_pb2.Timestamp
    revoked_reason: str
    revoked_by: str
    def __init__(self, id: _Optional[str] = ..., customer_id: _Optional[str] = ..., workspace_id: _Optional[str] = ..., username: _Optional[str] = ..., description: _Optional[str] = ..., scopes: _Optional[_Iterable[str]] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., created_by: _Optional[str] = ..., expires_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., last_used_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., revoked_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., revoked_reason: _Optional[str] = ..., revoked_by: _Optional[str] = ...) -> None: ...

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

class PingResponse(_message.Message):
    __slots__ = ("message", "timestamp")
    MESSAGE_FIELD_NUMBER: _ClassVar[int]
    TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
    message: str
    timestamp: _timestamp_pb2.Timestamp
    def __init__(self, message: _Optional[str] = ..., timestamp: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
