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 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 Purpose(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
    __slots__ = ()
    PURPOSE_UNSPECIFIED: _ClassVar[Purpose]
    PURPOSE_AUDIT_SIGNING: _ClassVar[Purpose]
    PURPOSE_BYOK: _ClassVar[Purpose]
    PURPOSE_JWKS_SIGNING: _ClassVar[Purpose]
    PURPOSE_WEBHOOK_SECRET: _ClassVar[Purpose]
    PURPOSE_DATAPLANE_SA: _ClassVar[Purpose]
PURPOSE_UNSPECIFIED: Purpose
PURPOSE_AUDIT_SIGNING: Purpose
PURPOSE_BYOK: Purpose
PURPOSE_JWKS_SIGNING: Purpose
PURPOSE_WEBHOOK_SECRET: Purpose
PURPOSE_DATAPLANE_SA: Purpose

class SecretRef(_message.Message):
    __slots__ = ("id", "purpose", "kek_version", "label", "created_at", "updated_at")
    ID_FIELD_NUMBER: _ClassVar[int]
    PURPOSE_FIELD_NUMBER: _ClassVar[int]
    KEK_VERSION_FIELD_NUMBER: _ClassVar[int]
    LABEL_FIELD_NUMBER: _ClassVar[int]
    CREATED_AT_FIELD_NUMBER: _ClassVar[int]
    UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
    id: str
    purpose: Purpose
    kek_version: int
    label: str
    created_at: _timestamp_pb2.Timestamp
    updated_at: _timestamp_pb2.Timestamp
    def __init__(self, id: _Optional[str] = ..., purpose: _Optional[_Union[Purpose, str]] = ..., kek_version: _Optional[int] = ..., label: _Optional[str] = ..., created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...

class PutSecretRequest(_message.Message):
    __slots__ = ("purpose", "plaintext", "label")
    PURPOSE_FIELD_NUMBER: _ClassVar[int]
    PLAINTEXT_FIELD_NUMBER: _ClassVar[int]
    LABEL_FIELD_NUMBER: _ClassVar[int]
    purpose: Purpose
    plaintext: str
    label: str
    def __init__(self, purpose: _Optional[_Union[Purpose, str]] = ..., plaintext: _Optional[str] = ..., label: _Optional[str] = ...) -> None: ...

class PutSecretResponse(_message.Message):
    __slots__ = ("ref",)
    REF_FIELD_NUMBER: _ClassVar[int]
    ref: SecretRef
    def __init__(self, ref: _Optional[_Union[SecretRef, _Mapping]] = ...) -> None: ...

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

class GetSecretResponse(_message.Message):
    __slots__ = ("ref", "plaintext")
    REF_FIELD_NUMBER: _ClassVar[int]
    PLAINTEXT_FIELD_NUMBER: _ClassVar[int]
    ref: SecretRef
    plaintext: str
    def __init__(self, ref: _Optional[_Union[SecretRef, _Mapping]] = ..., plaintext: _Optional[str] = ...) -> None: ...

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

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

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

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

class RotatePurposeKekRequest(_message.Message):
    __slots__ = ("purpose",)
    PURPOSE_FIELD_NUMBER: _ClassVar[int]
    purpose: Purpose
    def __init__(self, purpose: _Optional[_Union[Purpose, str]] = ...) -> None: ...

class RotatePurposeKekResponse(_message.Message):
    __slots__ = ("operation_id",)
    OPERATION_ID_FIELD_NUMBER: _ClassVar[int]
    operation_id: str
    def __init__(self, operation_id: _Optional[str] = ...) -> None: ...

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

class RotateMasterKekResponse(_message.Message):
    __slots__ = ("operation_id",)
    OPERATION_ID_FIELD_NUMBER: _ClassVar[int]
    operation_id: str
    def __init__(self, operation_id: _Optional[str] = ...) -> None: ...

class SignRequest(_message.Message):
    __slots__ = ("purpose", "payload")
    PURPOSE_FIELD_NUMBER: _ClassVar[int]
    PAYLOAD_FIELD_NUMBER: _ClassVar[int]
    purpose: Purpose
    payload: bytes
    def __init__(self, purpose: _Optional[_Union[Purpose, str]] = ..., payload: _Optional[bytes] = ...) -> None: ...

class SignResponse(_message.Message):
    __slots__ = ("signature", "kek_version")
    SIGNATURE_FIELD_NUMBER: _ClassVar[int]
    KEK_VERSION_FIELD_NUMBER: _ClassVar[int]
    signature: bytes
    kek_version: int
    def __init__(self, signature: _Optional[bytes] = ..., kek_version: _Optional[int] = ...) -> None: ...

class VerifyRequest(_message.Message):
    __slots__ = ("purpose", "payload", "signature")
    PURPOSE_FIELD_NUMBER: _ClassVar[int]
    PAYLOAD_FIELD_NUMBER: _ClassVar[int]
    SIGNATURE_FIELD_NUMBER: _ClassVar[int]
    purpose: Purpose
    payload: bytes
    signature: bytes
    def __init__(self, purpose: _Optional[_Union[Purpose, str]] = ..., payload: _Optional[bytes] = ..., signature: _Optional[bytes] = ...) -> None: ...

class VerifyResponse(_message.Message):
    __slots__ = ("valid", "kek_version")
    VALID_FIELD_NUMBER: _ClassVar[int]
    KEK_VERSION_FIELD_NUMBER: _ClassVar[int]
    valid: bool
    kek_version: int
    def __init__(self, valid: _Optional[bool] = ..., kek_version: _Optional[int] = ...) -> None: ...
