import datetime

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.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 SecretStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
    __slots__ = ()
    SECRET_STATUS_UNSPECIFIED: _ClassVar[SecretStatus]
    SECRET_STATUS_ACTIVE: _ClassVar[SecretStatus]
    SECRET_STATUS_REVOKED: _ClassVar[SecretStatus]
    SECRET_STATUS_ROTATED_PENDING: _ClassVar[SecretStatus]
SECRET_STATUS_UNSPECIFIED: SecretStatus
SECRET_STATUS_ACTIVE: SecretStatus
SECRET_STATUS_REVOKED: SecretStatus
SECRET_STATUS_ROTATED_PENDING: SecretStatus

class CreateSecretRequest(_message.Message):
    __slots__ = ("name", "realm", "description", "value", "tags", "user_id")
    class TagsEntry(_message.Message):
        __slots__ = ("key", "value")
        KEY_FIELD_NUMBER: _ClassVar[int]
        VALUE_FIELD_NUMBER: _ClassVar[int]
        key: str
        value: str
        def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
    NAME_FIELD_NUMBER: _ClassVar[int]
    REALM_FIELD_NUMBER: _ClassVar[int]
    DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
    VALUE_FIELD_NUMBER: _ClassVar[int]
    TAGS_FIELD_NUMBER: _ClassVar[int]
    USER_ID_FIELD_NUMBER: _ClassVar[int]
    name: str
    realm: str
    description: str
    value: str
    tags: _containers.ScalarMap[str, str]
    user_id: str
    def __init__(self, name: _Optional[str] = ..., realm: _Optional[str] = ..., description: _Optional[str] = ..., value: _Optional[str] = ..., tags: _Optional[_Mapping[str, str]] = ..., user_id: _Optional[str] = ...) -> None: ...

class CreateSecretResponse(_message.Message):
    __slots__ = ("secret",)
    SECRET_FIELD_NUMBER: _ClassVar[int]
    secret: Secret
    def __init__(self, secret: _Optional[_Union[Secret, _Mapping]] = ...) -> None: ...

class GetSecretRequest(_message.Message):
    __slots__ = ("name", "realm")
    NAME_FIELD_NUMBER: _ClassVar[int]
    REALM_FIELD_NUMBER: _ClassVar[int]
    name: str
    realm: str
    def __init__(self, name: _Optional[str] = ..., realm: _Optional[str] = ...) -> None: ...

class GetSecretResponse(_message.Message):
    __slots__ = ("secret",)
    SECRET_FIELD_NUMBER: _ClassVar[int]
    secret: Secret
    def __init__(self, secret: _Optional[_Union[Secret, _Mapping]] = ...) -> None: ...

class ListSecretsRequest(_message.Message):
    __slots__ = ("realm", "status", "tags", "page_size", "page_token")
    class TagsEntry(_message.Message):
        __slots__ = ("key", "value")
        KEY_FIELD_NUMBER: _ClassVar[int]
        VALUE_FIELD_NUMBER: _ClassVar[int]
        key: str
        value: str
        def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
    REALM_FIELD_NUMBER: _ClassVar[int]
    STATUS_FIELD_NUMBER: _ClassVar[int]
    TAGS_FIELD_NUMBER: _ClassVar[int]
    PAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
    PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int]
    realm: str
    status: SecretStatus
    tags: _containers.ScalarMap[str, str]
    page_size: int
    page_token: str
    def __init__(self, realm: _Optional[str] = ..., status: _Optional[_Union[SecretStatus, str]] = ..., tags: _Optional[_Mapping[str, str]] = ..., page_size: _Optional[int] = ..., page_token: _Optional[str] = ...) -> None: ...

class ListSecretsResponse(_message.Message):
    __slots__ = ("secrets", "next_page_token")
    SECRETS_FIELD_NUMBER: _ClassVar[int]
    NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int]
    secrets: _containers.RepeatedCompositeFieldContainer[Secret]
    next_page_token: str
    def __init__(self, secrets: _Optional[_Iterable[_Union[Secret, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ...

class DeleteSecretRequest(_message.Message):
    __slots__ = ("name", "realm")
    NAME_FIELD_NUMBER: _ClassVar[int]
    REALM_FIELD_NUMBER: _ClassVar[int]
    name: str
    realm: str
    def __init__(self, name: _Optional[str] = ..., realm: _Optional[str] = ...) -> None: ...

class DeleteSecretResponse(_message.Message):
    __slots__ = ("success",)
    SUCCESS_FIELD_NUMBER: _ClassVar[int]
    success: bool
    def __init__(self, success: _Optional[bool] = ...) -> None: ...

class RotateSecretRequest(_message.Message):
    __slots__ = ("name", "realm", "new_value")
    NAME_FIELD_NUMBER: _ClassVar[int]
    REALM_FIELD_NUMBER: _ClassVar[int]
    NEW_VALUE_FIELD_NUMBER: _ClassVar[int]
    name: str
    realm: str
    new_value: str
    def __init__(self, name: _Optional[str] = ..., realm: _Optional[str] = ..., new_value: _Optional[str] = ...) -> None: ...

class RotateSecretResponse(_message.Message):
    __slots__ = ("secret",)
    SECRET_FIELD_NUMBER: _ClassVar[int]
    secret: Secret
    def __init__(self, secret: _Optional[_Union[Secret, _Mapping]] = ...) -> None: ...

class ValidateSecretRequest(_message.Message):
    __slots__ = ("name", "realm")
    NAME_FIELD_NUMBER: _ClassVar[int]
    REALM_FIELD_NUMBER: _ClassVar[int]
    name: str
    realm: str
    def __init__(self, name: _Optional[str] = ..., realm: _Optional[str] = ...) -> None: ...

class ValidateSecretResponse(_message.Message):
    __slots__ = ("valid", "error")
    VALID_FIELD_NUMBER: _ClassVar[int]
    ERROR_FIELD_NUMBER: _ClassVar[int]
    valid: bool
    error: str
    def __init__(self, valid: _Optional[bool] = ..., error: _Optional[str] = ...) -> None: ...

class GetSecretValueRequest(_message.Message):
    __slots__ = ("name", "realm", "user_id")
    NAME_FIELD_NUMBER: _ClassVar[int]
    REALM_FIELD_NUMBER: _ClassVar[int]
    USER_ID_FIELD_NUMBER: _ClassVar[int]
    name: str
    realm: str
    user_id: str
    def __init__(self, name: _Optional[str] = ..., realm: _Optional[str] = ..., user_id: _Optional[str] = ...) -> None: ...

class GetSecretValueResponse(_message.Message):
    __slots__ = ("value", "secret")
    VALUE_FIELD_NUMBER: _ClassVar[int]
    SECRET_FIELD_NUMBER: _ClassVar[int]
    value: str
    secret: Secret
    def __init__(self, value: _Optional[str] = ..., secret: _Optional[_Union[Secret, _Mapping]] = ...) -> None: ...

class Secret(_message.Message):
    __slots__ = ("id", "user_id", "name", "realm", "description", "kek_version", "status", "tags", "created_at", "updated_at")
    class TagsEntry(_message.Message):
        __slots__ = ("key", "value")
        KEY_FIELD_NUMBER: _ClassVar[int]
        VALUE_FIELD_NUMBER: _ClassVar[int]
        key: str
        value: str
        def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
    ID_FIELD_NUMBER: _ClassVar[int]
    USER_ID_FIELD_NUMBER: _ClassVar[int]
    NAME_FIELD_NUMBER: _ClassVar[int]
    REALM_FIELD_NUMBER: _ClassVar[int]
    DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
    KEK_VERSION_FIELD_NUMBER: _ClassVar[int]
    STATUS_FIELD_NUMBER: _ClassVar[int]
    TAGS_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
    id: str
    user_id: str
    name: str
    realm: str
    description: str
    kek_version: str
    status: SecretStatus
    tags: _containers.ScalarMap[str, str]
    created_at: _timestamp_pb2.Timestamp
    updated_at: _timestamp_pb2.Timestamp
    def __init__(self, id: _Optional[str] = ..., user_id: _Optional[str] = ..., name: _Optional[str] = ..., realm: _Optional[str] = ..., description: _Optional[str] = ..., kek_version: _Optional[str] = ..., status: _Optional[_Union[SecretStatus, str]] = ..., tags: _Optional[_Mapping[str, str]] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
