"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.timestamp_pb2
import google.protobuf.wrappers_pb2
import th2_grpc_common.common_pb2
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _TimeRelation:
    ValueType = typing.NewType('ValueType', builtins.int)
    V: typing_extensions.TypeAlias = ValueType
class _TimeRelationEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_TimeRelation.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    NEXT: _TimeRelation.ValueType  # 0
    PREVIOUS: _TimeRelation.ValueType  # 1
class TimeRelation(_TimeRelation, metaclass=_TimeRelationEnumTypeWrapper):
    pass

NEXT: TimeRelation.ValueType  # 0
PREVIOUS: TimeRelation.ValueType  # 1
global___TimeRelation = TimeRelation


class EventScope(google.protobuf.message.Message):
    """The scope for events to request"""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    NAME_FIELD_NUMBER: builtins.int
    name: typing.Text
    def __init__(self,
        *,
        name: typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["name",b"name"]) -> None: ...
global___EventScope = EventScope

class BookId(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    NAME_FIELD_NUMBER: builtins.int
    name: typing.Text
    """Name of the book to request data from"""

    def __init__(self,
        *,
        name: typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["name",b"name"]) -> None: ...
global___BookId = BookId

class MessageGroupsSearchRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    class Group(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        NAME_FIELD_NUMBER: builtins.int
        name: typing.Text
        def __init__(self,
            *,
            name: typing.Text = ...,
            ) -> None: ...
        def ClearField(self, field_name: typing_extensions.Literal["name",b"name"]) -> None: ...

    START_TIMESTAMP_FIELD_NUMBER: builtins.int
    END_TIMESTAMP_FIELD_NUMBER: builtins.int
    BOOK_ID_FIELD_NUMBER: builtins.int
    MESSAGE_GROUP_FIELD_NUMBER: builtins.int
    SORT_FIELD_NUMBER: builtins.int
    RAW_ONLY_FIELD_NUMBER: builtins.int
    KEEP_OPEN_FIELD_NUMBER: builtins.int
    @property
    def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def book_id(self) -> global___BookId: ...
    @property
    def message_group(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MessageGroupsSearchRequest.Group]: ...
    @property
    def sort(self) -> google.protobuf.wrappers_pb2.BoolValue: ...
    raw_only: builtins.bool
    keep_open: builtins.bool
    def __init__(self,
        *,
        start_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        end_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        book_id: typing.Optional[global___BookId] = ...,
        message_group: typing.Optional[typing.Iterable[global___MessageGroupsSearchRequest.Group]] = ...,
        sort: typing.Optional[google.protobuf.wrappers_pb2.BoolValue] = ...,
        raw_only: builtins.bool = ...,
        keep_open: builtins.bool = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["book_id",b"book_id","end_timestamp",b"end_timestamp","sort",b"sort","start_timestamp",b"start_timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["book_id",b"book_id","end_timestamp",b"end_timestamp","keep_open",b"keep_open","message_group",b"message_group","raw_only",b"raw_only","sort",b"sort","start_timestamp",b"start_timestamp"]) -> None: ...
global___MessageGroupsSearchRequest = MessageGroupsSearchRequest

class MessageStreamsRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    BOOK_ID_FIELD_NUMBER: builtins.int
    @property
    def book_id(self) -> global___BookId: ...
    def __init__(self,
        *,
        book_id: typing.Optional[global___BookId] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["book_id",b"book_id"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["book_id",b"book_id"]) -> None: ...
global___MessageStreamsRequest = MessageStreamsRequest

class EventResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    EVENT_ID_FIELD_NUMBER: builtins.int
    PARENT_EVENT_ID_FIELD_NUMBER: builtins.int
    BATCH_ID_FIELD_NUMBER: builtins.int
    IS_BATCHED_FIELD_NUMBER: builtins.int
    START_TIMESTAMP_FIELD_NUMBER: builtins.int
    END_TIMESTAMP_FIELD_NUMBER: builtins.int
    STATUS_FIELD_NUMBER: builtins.int
    EVENT_NAME_FIELD_NUMBER: builtins.int
    EVENT_TYPE_FIELD_NUMBER: builtins.int
    BODY_FIELD_NUMBER: builtins.int
    ATTACHED_MESSAGE_ID_FIELD_NUMBER: builtins.int
    @property
    def event_id(self) -> th2_grpc_common.common_pb2.EventID:
        """Current event id"""
        pass
    @property
    def parent_event_id(self) -> th2_grpc_common.common_pb2.EventID:
        """Event id of a parent event. It is absent for root event"""
        pass
    @property
    def batch_id(self) -> th2_grpc_common.common_pb2.EventID:
        """Event id of a parent event. It is absent for root event"""
        pass
    is_batched: builtins.bool
    """Flag indicating that the event is in batch"""

    @property
    def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """May be absent."""
        pass
    status: th2_grpc_common.common_pb2.EventStatus.ValueType
    """Aggregated status of current and children events which sync written."""

    event_name: typing.Text
    event_type: typing.Text
    """May be absent."""

    body: builtins.bytes
    """May be absent."""

    @property
    def attached_message_id(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[th2_grpc_common.common_pb2.MessageID]:
        """ids of messages linked to this event"""
        pass
    def __init__(self,
        *,
        event_id: typing.Optional[th2_grpc_common.common_pb2.EventID] = ...,
        parent_event_id: typing.Optional[th2_grpc_common.common_pb2.EventID] = ...,
        batch_id: typing.Optional[th2_grpc_common.common_pb2.EventID] = ...,
        is_batched: builtins.bool = ...,
        start_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        end_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        status: th2_grpc_common.common_pb2.EventStatus.ValueType = ...,
        event_name: typing.Text = ...,
        event_type: typing.Text = ...,
        body: builtins.bytes = ...,
        attached_message_id: typing.Optional[typing.Iterable[th2_grpc_common.common_pb2.MessageID]] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["batch_id",b"batch_id","end_timestamp",b"end_timestamp","event_id",b"event_id","parent_event_id",b"parent_event_id","start_timestamp",b"start_timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["attached_message_id",b"attached_message_id","batch_id",b"batch_id","body",b"body","end_timestamp",b"end_timestamp","event_id",b"event_id","event_name",b"event_name","event_type",b"event_type","is_batched",b"is_batched","parent_event_id",b"parent_event_id","start_timestamp",b"start_timestamp","status",b"status"]) -> None: ...
global___EventResponse = EventResponse

class MessageGroupItem(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    MESSAGE_FIELD_NUMBER: builtins.int
    MATCH_FIELD_NUMBER: builtins.int
    @property
    def message(self) -> th2_grpc_common.common_pb2.Message: ...
    match: builtins.bool
    def __init__(self,
        *,
        message: typing.Optional[th2_grpc_common.common_pb2.Message] = ...,
        match: builtins.bool = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["message",b"message"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["match",b"match","message",b"message"]) -> None: ...
global___MessageGroupItem = MessageGroupItem

class MessageGroupResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    class MessagePropertiesEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: typing.Text
        value: typing.Text
        def __init__(self,
            *,
            key: typing.Text = ...,
            value: typing.Text = ...,
            ) -> None: ...
        def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...

    MESSAGE_ID_FIELD_NUMBER: builtins.int
    TIMESTAMP_FIELD_NUMBER: builtins.int
    MESSAGE_PROPERTIES_FIELD_NUMBER: builtins.int
    BODY_RAW_FIELD_NUMBER: builtins.int
    ATTACHED_EVENT_ID_FIELD_NUMBER: builtins.int
    MESSAGE_ITEM_FIELD_NUMBER: builtins.int
    @property
    def message_id(self) -> th2_grpc_common.common_pb2.MessageID:
        """Message id should be unique in session"""
        pass
    @property
    def timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Message creation timestamp. Deprecated. Moved to MessageID"""
        pass
    @property
    def message_properties(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]:
        """Additional properties for the source raw message"""
        pass
    body_raw: builtins.bytes
    @property
    def attached_event_id(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[th2_grpc_common.common_pb2.EventID]:
        """ids of events linked to this message group"""
        pass
    @property
    def message_item(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MessageGroupItem]:
        """May be absent."""
        pass
    def __init__(self,
        *,
        message_id: typing.Optional[th2_grpc_common.common_pb2.MessageID] = ...,
        timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        message_properties: typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
        body_raw: builtins.bytes = ...,
        attached_event_id: typing.Optional[typing.Iterable[th2_grpc_common.common_pb2.EventID]] = ...,
        message_item: typing.Optional[typing.Iterable[global___MessageGroupItem]] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["message_id",b"message_id","timestamp",b"timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["attached_event_id",b"attached_event_id","body_raw",b"body_raw","message_id",b"message_id","message_item",b"message_item","message_properties",b"message_properties","timestamp",b"timestamp"]) -> None: ...
global___MessageGroupResponse = MessageGroupResponse

class FilterName(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    NAME_FIELD_NUMBER: builtins.int
    name: typing.Text
    def __init__(self,
        *,
        name: typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["name",b"name"]) -> None: ...
global___FilterName = FilterName

class Filter(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    NAME_FIELD_NUMBER: builtins.int
    NEGATIVE_FIELD_NUMBER: builtins.int
    VALUE_FIELD_NUMBER: builtins.int
    CONJUNCT_FIELD_NUMBER: builtins.int
    @property
    def name(self) -> global___FilterName: ...
    negative: builtins.bool
    @property
    def value(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
    conjunct: builtins.bool
    def __init__(self,
        *,
        name: typing.Optional[global___FilterName] = ...,
        negative: builtins.bool = ...,
        value: typing.Optional[typing.Iterable[typing.Text]] = ...,
        conjunct: builtins.bool = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["name",b"name"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["conjunct",b"conjunct","name",b"name","negative",b"negative","value",b"value"]) -> None: ...
global___Filter = Filter

class EventSearchRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    START_TIMESTAMP_FIELD_NUMBER: builtins.int
    END_TIMESTAMP_FIELD_NUMBER: builtins.int
    PARENT_EVENT_FIELD_NUMBER: builtins.int
    SEARCH_DIRECTION_FIELD_NUMBER: builtins.int
    RESULT_COUNT_LIMIT_FIELD_NUMBER: builtins.int
    FILTER_FIELD_NUMBER: builtins.int
    BOOK_ID_FIELD_NUMBER: builtins.int
    SCOPE_FIELD_NUMBER: builtins.int
    @property
    def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """unix timestamp - Sets the search starting point. One of the 'start_timestamp' or 'resume_from_id' must not absent"""
        pass
    @property
    def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """unix timestamp - Sets the timestamp to which the search will be performed, starting with 'start_timestamp'. When 'search_direction' is previous, end_timestamp must be less than start_timestamp. By default it is absent (the search is carried out endlessly into the past or into the future)."""
        pass
    @property
    def parent_event(self) -> th2_grpc_common.common_pb2.EventID:
        """Match events to the specified parent. Only the immediate children of the specified event will be returned."""
        pass
    search_direction: global___TimeRelation.ValueType
    """Sets the lookup direction. Can be used for pagination. Set by default to NEXT."""

    @property
    def result_count_limit(self) -> google.protobuf.wrappers_pb2.Int32Value:
        """Sets the maximum amount of events to return. By default it is absent (unlimited)."""
        pass
    @property
    def filter(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Filter]:
        """List of event search filters. (See 'search/sse/events' HTTP method https://github.com/th2-net/th2-rpt-data-provider)"""
        pass
    @property
    def book_id(self) -> global___BookId: ...
    @property
    def scope(self) -> global___EventScope: ...
    def __init__(self,
        *,
        start_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        end_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        parent_event: typing.Optional[th2_grpc_common.common_pb2.EventID] = ...,
        search_direction: global___TimeRelation.ValueType = ...,
        result_count_limit: typing.Optional[google.protobuf.wrappers_pb2.Int32Value] = ...,
        filter: typing.Optional[typing.Iterable[global___Filter]] = ...,
        book_id: typing.Optional[global___BookId] = ...,
        scope: typing.Optional[global___EventScope] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["book_id",b"book_id","end_timestamp",b"end_timestamp","parent_event",b"parent_event","result_count_limit",b"result_count_limit","scope",b"scope","start_timestamp",b"start_timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["book_id",b"book_id","end_timestamp",b"end_timestamp","filter",b"filter","parent_event",b"parent_event","result_count_limit",b"result_count_limit","scope",b"scope","search_direction",b"search_direction","start_timestamp",b"start_timestamp"]) -> None: ...
global___EventSearchRequest = EventSearchRequest

class EventSearchResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    EVENT_FIELD_NUMBER: builtins.int
    @property
    def event(self) -> global___EventResponse: ...
    def __init__(self,
        *,
        event: typing.Optional[global___EventResponse] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["data",b"data","event",b"event"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["data",b"data","event",b"event"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["data",b"data"]) -> typing.Optional[typing_extensions.Literal["event"]]: ...
global___EventSearchResponse = EventSearchResponse

class MessageSearchRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    START_TIMESTAMP_FIELD_NUMBER: builtins.int
    END_TIMESTAMP_FIELD_NUMBER: builtins.int
    SEARCH_DIRECTION_FIELD_NUMBER: builtins.int
    RESULT_COUNT_LIMIT_FIELD_NUMBER: builtins.int
    STREAM_FIELD_NUMBER: builtins.int
    KEEP_OPEN_FIELD_NUMBER: builtins.int
    STREAM_POINTER_FIELD_NUMBER: builtins.int
    RESPONSE_FORMATS_FIELD_NUMBER: builtins.int
    BOOK_ID_FIELD_NUMBER: builtins.int
    @property
    def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """unix timestamp - Sets the search starting point. One of the 'start_timestamp' or 'resume_from_id' or 'message_id' must not absent"""
        pass
    @property
    def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """unix timestamp - Sets the timestamp to which the search will be performed, starting with 'start_timestamp'. When search_direction is 'previous', 'end_timestamp' must be less than 'start_timestamp'. By default it is absent (the search is carried out endlessly into the past or into the future)."""
        pass
    search_direction: global___TimeRelation.ValueType
    """Sets the lookup direction. Can be used for pagination. Set by default to NEXT."""

    @property
    def result_count_limit(self) -> google.protobuf.wrappers_pb2.Int32Value:
        """Sets the maximum amount of messages to return. By default it is absent (unlimited)"""
        pass
    @property
    def stream(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MessageStream]:
        """Sets the stream names and directions to search in. Case-sensitive. Required."""
        pass
    @property
    def keep_open(self) -> google.protobuf.wrappers_pb2.BoolValue:
        """ If the search has reached the current moment, it is necessary to wait further for the appearance of new data. Set by default to false."""
        pass
    @property
    def stream_pointer(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MessageStreamPointer]:
        """List of stream pointers to restore the search from. start_timestamp will be ignored if this parameter is specified. By default it is absent."""
        pass
    @property
    def response_formats(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
        """List of possible response formats (e.g. PARSED or BASE_64)"""
        pass
    @property
    def book_id(self) -> global___BookId: ...
    def __init__(self,
        *,
        start_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        end_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        search_direction: global___TimeRelation.ValueType = ...,
        result_count_limit: typing.Optional[google.protobuf.wrappers_pb2.Int32Value] = ...,
        stream: typing.Optional[typing.Iterable[global___MessageStream]] = ...,
        keep_open: typing.Optional[google.protobuf.wrappers_pb2.BoolValue] = ...,
        stream_pointer: typing.Optional[typing.Iterable[global___MessageStreamPointer]] = ...,
        response_formats: typing.Optional[typing.Iterable[typing.Text]] = ...,
        book_id: typing.Optional[global___BookId] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["book_id",b"book_id","end_timestamp",b"end_timestamp","keep_open",b"keep_open","result_count_limit",b"result_count_limit","start_timestamp",b"start_timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["book_id",b"book_id","end_timestamp",b"end_timestamp","keep_open",b"keep_open","response_formats",b"response_formats","result_count_limit",b"result_count_limit","search_direction",b"search_direction","start_timestamp",b"start_timestamp","stream",b"stream","stream_pointer",b"stream_pointer"]) -> None: ...
global___MessageSearchRequest = MessageSearchRequest

class MessageSearchResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    MESSAGE_FIELD_NUMBER: builtins.int
    MESSAGE_STREAM_POINTERS_FIELD_NUMBER: builtins.int
    @property
    def message(self) -> global___MessageGroupResponse: ...
    @property
    def message_stream_pointers(self) -> global___MessageStreamPointers: ...
    def __init__(self,
        *,
        message: typing.Optional[global___MessageGroupResponse] = ...,
        message_stream_pointers: typing.Optional[global___MessageStreamPointers] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["data",b"data","message",b"message","message_stream_pointers",b"message_stream_pointers"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["data",b"data","message",b"message","message_stream_pointers",b"message_stream_pointers"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["data",b"data"]) -> typing.Optional[typing_extensions.Literal["message","message_stream_pointers"]]: ...
global___MessageSearchResponse = MessageSearchResponse

class MessageStreamPointers(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    MESSAGE_STREAM_POINTER_FIELD_NUMBER: builtins.int
    @property
    def message_stream_pointer(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MessageStreamPointer]: ...
    def __init__(self,
        *,
        message_stream_pointer: typing.Optional[typing.Iterable[global___MessageStreamPointer]] = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["message_stream_pointer",b"message_stream_pointer"]) -> None: ...
global___MessageStreamPointers = MessageStreamPointers

class MessageStreamPointer(google.protobuf.message.Message):
    """This object contains the data of the last message in the stream on which
    the search has stopped, it is necessary to continue the search from the same point
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    MESSAGE_STREAM_FIELD_NUMBER: builtins.int
    LAST_ID_FIELD_NUMBER: builtins.int
    @property
    def message_stream(self) -> global___MessageStream: ...
    @property
    def last_id(self) -> th2_grpc_common.common_pb2.MessageID:
        """Might be absent if the stream has no messages"""
        pass
    def __init__(self,
        *,
        message_stream: typing.Optional[global___MessageStream] = ...,
        last_id: typing.Optional[th2_grpc_common.common_pb2.MessageID] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["last_id",b"last_id","message_stream",b"message_stream"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["last_id",b"last_id","message_stream",b"message_stream"]) -> None: ...
global___MessageStreamPointer = MessageStreamPointer

class MessageStream(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    NAME_FIELD_NUMBER: builtins.int
    DIRECTION_FIELD_NUMBER: builtins.int
    name: typing.Text
    """Case sensitive. Required."""

    direction: th2_grpc_common.common_pb2.Direction.ValueType
    """Required."""

    def __init__(self,
        *,
        name: typing.Text = ...,
        direction: th2_grpc_common.common_pb2.Direction.ValueType = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["direction",b"direction","name",b"name"]) -> None: ...
global___MessageStream = MessageStream

class MessageStreamsResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    MESSAGE_STREAM_FIELD_NUMBER: builtins.int
    @property
    def message_stream(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MessageStream]: ...
    def __init__(self,
        *,
        message_stream: typing.Optional[typing.Iterable[global___MessageStream]] = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["message_stream",b"message_stream"]) -> None: ...
global___MessageStreamsResponse = MessageStreamsResponse

class BooksRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    def __init__(self,
        ) -> None: ...
global___BooksRequest = BooksRequest

class BooksResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    BOOK_IDS_FIELD_NUMBER: builtins.int
    @property
    def book_ids(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BookId]: ...
    def __init__(self,
        *,
        book_ids: typing.Optional[typing.Iterable[global___BookId]] = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["book_ids",b"book_ids"]) -> None: ...
global___BooksResponse = BooksResponse

class PageInfoRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    BOOK_ID_FIELD_NUMBER: builtins.int
    START_TIMESTAMP_FIELD_NUMBER: builtins.int
    END_TIMESTAMP_FIELD_NUMBER: builtins.int
    RESULT_LIMIT_FIELD_NUMBER: builtins.int
    @property
    def book_id(self) -> global___BookId: ...
    @property
    def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def result_limit(self) -> google.protobuf.wrappers_pb2.Int32Value: ...
    def __init__(self,
        *,
        book_id: typing.Optional[global___BookId] = ...,
        start_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        end_timestamp: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        result_limit: typing.Optional[google.protobuf.wrappers_pb2.Int32Value] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["book_id",b"book_id","end_timestamp",b"end_timestamp","result_limit",b"result_limit","start_timestamp",b"start_timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["book_id",b"book_id","end_timestamp",b"end_timestamp","result_limit",b"result_limit","start_timestamp",b"start_timestamp"]) -> None: ...
global___PageInfoRequest = PageInfoRequest

class PageInfoResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    ID_FIELD_NUMBER: builtins.int
    COMMENT_FIELD_NUMBER: builtins.int
    STARTED_FIELD_NUMBER: builtins.int
    ENDED_FIELD_NUMBER: builtins.int
    UPDATED_FIELD_NUMBER: builtins.int
    REMOVED_FIELD_NUMBER: builtins.int
    @property
    def id(self) -> global___PageId: ...
    @property
    def comment(self) -> google.protobuf.wrappers_pb2.StringValue: ...
    @property
    def started(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def ended(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def updated(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def removed(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    def __init__(self,
        *,
        id: typing.Optional[global___PageId] = ...,
        comment: typing.Optional[google.protobuf.wrappers_pb2.StringValue] = ...,
        started: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        ended: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        updated: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        removed: typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["comment",b"comment","ended",b"ended","id",b"id","removed",b"removed","started",b"started","updated",b"updated"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["comment",b"comment","ended",b"ended","id",b"id","removed",b"removed","started",b"started","updated",b"updated"]) -> None: ...
global___PageInfoResponse = PageInfoResponse

class PageId(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    BOOK_ID_FIELD_NUMBER: builtins.int
    NAME_FIELD_NUMBER: builtins.int
    @property
    def book_id(self) -> global___BookId: ...
    name: typing.Text
    def __init__(self,
        *,
        book_id: typing.Optional[global___BookId] = ...,
        name: typing.Text = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["book_id",b"book_id"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["book_id",b"book_id","name",b"name"]) -> None: ...
global___PageId = PageId
