"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import collections.abc
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 sentry_protos.snuba.v1.trace_item_filter_pb2
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _TraceItemName:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _TraceItemNameEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_TraceItemName.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    TRACE_ITEM_NAME_UNSPECIFIED: _TraceItemName.ValueType  # 0
    TRACE_ITEM_NAME_EAP_SPANS: _TraceItemName.ValueType  # 1
    TRACE_ITEM_NAME_EAP_ERRORS: _TraceItemName.ValueType  # 2

class TraceItemName(_TraceItemName, metaclass=_TraceItemNameEnumTypeWrapper): ...

TRACE_ITEM_NAME_UNSPECIFIED: TraceItemName.ValueType  # 0
TRACE_ITEM_NAME_EAP_SPANS: TraceItemName.ValueType  # 1
TRACE_ITEM_NAME_EAP_ERRORS: TraceItemName.ValueType  # 2
global___TraceItemName = TraceItemName

@typing.final
class RequestMeta(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ORGANIZATION_ID_FIELD_NUMBER: builtins.int
    COGS_CATEGORY_FIELD_NUMBER: builtins.int
    REFERRER_FIELD_NUMBER: builtins.int
    PROJECT_IDS_FIELD_NUMBER: builtins.int
    START_TIMESTAMP_FIELD_NUMBER: builtins.int
    END_TIMESTAMP_FIELD_NUMBER: builtins.int
    TRACE_ITEM_NAME_FIELD_NUMBER: builtins.int
    DEBUG_FIELD_NUMBER: builtins.int
    REQUEST_ID_FIELD_NUMBER: builtins.int
    organization_id: builtins.int
    cogs_category: builtins.str
    referrer: builtins.str
    trace_item_name: global___TraceItemName.ValueType
    debug: builtins.bool
    request_id: builtins.str
    @property
    def project_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
        """can be empty"""

    @property
    def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    def __init__(
        self,
        *,
        organization_id: builtins.int = ...,
        cogs_category: builtins.str = ...,
        referrer: builtins.str = ...,
        project_ids: collections.abc.Iterable[builtins.int] | None = ...,
        start_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        end_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        trace_item_name: global___TraceItemName.ValueType = ...,
        debug: builtins.bool = ...,
        request_id: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["end_timestamp", b"end_timestamp", "start_timestamp", b"start_timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["cogs_category", b"cogs_category", "debug", b"debug", "end_timestamp", b"end_timestamp", "organization_id", b"organization_id", "project_ids", b"project_ids", "referrer", b"referrer", "request_id", b"request_id", "start_timestamp", b"start_timestamp", "trace_item_name", b"trace_item_name"]) -> None: ...

global___RequestMeta = RequestMeta

@typing.final
class ResponseMeta(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    REQUEST_ID_FIELD_NUMBER: builtins.int
    QUERY_INFO_FIELD_NUMBER: builtins.int
    request_id: builtins.str
    @property
    def query_info(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___QueryInfo]:
        """Optional field that is included only if debug is true"""

    def __init__(
        self,
        *,
        request_id: builtins.str = ...,
        query_info: collections.abc.Iterable[global___QueryInfo] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["query_info", b"query_info", "request_id", b"request_id"]) -> None: ...

global___ResponseMeta = ResponseMeta

@typing.final
class PageToken(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    OFFSET_FIELD_NUMBER: builtins.int
    FILTER_OFFSET_FIELD_NUMBER: builtins.int
    offset: builtins.int
    @property
    def filter_offset(self) -> sentry_protos.snuba.v1.trace_item_filter_pb2.TraceItemFilter:
        """Instead of using offset (which requires all the scanning and ordering),
        the server sends back a filter clause to be added on to the filter conditions
        which skips the previous results altogether, avoiding extra scanning and sorting
        """

    def __init__(
        self,
        *,
        offset: builtins.int = ...,
        filter_offset: sentry_protos.snuba.v1.trace_item_filter_pb2.TraceItemFilter | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["filter_offset", b"filter_offset", "offset", b"offset", "value", b"value"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["filter_offset", b"filter_offset", "offset", b"offset", "value", b"value"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["offset", "filter_offset"] | None: ...

global___PageToken = PageToken

@typing.final
class QueryStats(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ROWS_READ_FIELD_NUMBER: builtins.int
    COLUMNS_READ_FIELD_NUMBER: builtins.int
    BLOCKS_FIELD_NUMBER: builtins.int
    PROGRESS_BYTES_FIELD_NUMBER: builtins.int
    MAX_THREADS_FIELD_NUMBER: builtins.int
    TIMING_MARKS_FIELD_NUMBER: builtins.int
    rows_read: builtins.int
    columns_read: builtins.int
    blocks: builtins.int
    progress_bytes: builtins.int
    max_threads: builtins.int
    @property
    def timing_marks(self) -> global___TimingMarks: ...
    def __init__(
        self,
        *,
        rows_read: builtins.int = ...,
        columns_read: builtins.int = ...,
        blocks: builtins.int = ...,
        progress_bytes: builtins.int = ...,
        max_threads: builtins.int = ...,
        timing_marks: global___TimingMarks | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["timing_marks", b"timing_marks"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["blocks", b"blocks", "columns_read", b"columns_read", "max_threads", b"max_threads", "progress_bytes", b"progress_bytes", "rows_read", b"rows_read", "timing_marks", b"timing_marks"]) -> None: ...

global___QueryStats = QueryStats

@typing.final
class QueryMetadata(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SQL_FIELD_NUMBER: builtins.int
    STATUS_FIELD_NUMBER: builtins.int
    CLICKHOUSE_TABLE_FIELD_NUMBER: builtins.int
    FINAL_FIELD_NUMBER: builtins.int
    QUERY_ID_FIELD_NUMBER: builtins.int
    CONSISTENT_FIELD_NUMBER: builtins.int
    CACHE_HIT_FIELD_NUMBER: builtins.int
    CLUSTER_NAME_FIELD_NUMBER: builtins.int
    sql: builtins.str
    status: builtins.str
    clickhouse_table: builtins.str
    final: builtins.bool
    query_id: builtins.str
    consistent: builtins.bool
    cache_hit: builtins.bool
    cluster_name: builtins.str
    def __init__(
        self,
        *,
        sql: builtins.str = ...,
        status: builtins.str = ...,
        clickhouse_table: builtins.str = ...,
        final: builtins.bool = ...,
        query_id: builtins.str = ...,
        consistent: builtins.bool = ...,
        cache_hit: builtins.bool = ...,
        cluster_name: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["cache_hit", b"cache_hit", "clickhouse_table", b"clickhouse_table", "cluster_name", b"cluster_name", "consistent", b"consistent", "final", b"final", "query_id", b"query_id", "sql", b"sql", "status", b"status"]) -> None: ...

global___QueryMetadata = QueryMetadata

@typing.final
class TimingMarks(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class MarksMsEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: builtins.str
        value: builtins.int
        def __init__(
            self,
            *,
            key: builtins.str = ...,
            value: builtins.int = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...

    @typing.final
    class TagsEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: builtins.str
        value: builtins.str
        def __init__(
            self,
            *,
            key: builtins.str = ...,
            value: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...

    DURATION_MS_FIELD_NUMBER: builtins.int
    MARKS_MS_FIELD_NUMBER: builtins.int
    TAGS_FIELD_NUMBER: builtins.int
    TIMESTAMP_FIELD_NUMBER: builtins.int
    duration_ms: builtins.int
    timestamp: builtins.int
    @property
    def marks_ms(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.int]: ...
    @property
    def tags(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ...
    def __init__(
        self,
        *,
        duration_ms: builtins.int = ...,
        marks_ms: collections.abc.Mapping[builtins.str, builtins.int] | None = ...,
        tags: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
        timestamp: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["duration_ms", b"duration_ms", "marks_ms", b"marks_ms", "tags", b"tags", "timestamp", b"timestamp"]) -> None: ...

global___TimingMarks = TimingMarks

@typing.final
class QueryInfo(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    STATS_FIELD_NUMBER: builtins.int
    METADATA_FIELD_NUMBER: builtins.int
    TRACE_LOGS_FIELD_NUMBER: builtins.int
    trace_logs: builtins.str
    @property
    def stats(self) -> global___QueryStats: ...
    @property
    def metadata(self) -> global___QueryMetadata: ...
    def __init__(
        self,
        *,
        stats: global___QueryStats | None = ...,
        metadata: global___QueryMetadata | None = ...,
        trace_logs: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["metadata", b"metadata", "stats", b"stats"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "stats", b"stats", "trace_logs", b"trace_logs"]) -> None: ...

global___QueryInfo = QueryInfo
