"""
@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.request_common_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 _TraceOrderBy:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _TraceOrderByEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_TraceOrderBy.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    TRACE_ORDER_BY_UNSPECIFIED: _TraceOrderBy.ValueType  # 0
    TRACE_ORDER_BY_END_TIME: _TraceOrderBy.ValueType  # 1
    TRACE_ORDER_BY_TRACE_DURATION: _TraceOrderBy.ValueType  # 2

class TraceOrderBy(_TraceOrderBy, metaclass=_TraceOrderByEnumTypeWrapper): ...

TRACE_ORDER_BY_UNSPECIFIED: TraceOrderBy.ValueType  # 0
TRACE_ORDER_BY_END_TIME: TraceOrderBy.ValueType  # 1
TRACE_ORDER_BY_TRACE_DURATION: TraceOrderBy.ValueType  # 2
global___TraceOrderBy = TraceOrderBy

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

    OFFSET_FIELD_NUMBER: builtins.int
    EVENT_FILTER_FIELD_NUMBER: builtins.int
    TRACE_FILTER_FIELD_NUMBER: builtins.int
    offset: builtins.int
    @property
    def event_filter(self) -> global___EventFilter:
        """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
        """

    @property
    def trace_filter(self) -> global___TraceFilter: ...
    def __init__(
        self,
        *,
        offset: builtins.int = ...,
        event_filter: global___EventFilter | None = ...,
        trace_filter: global___TraceFilter | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["event_filter", b"event_filter", "offset", b"offset", "trace_filter", b"trace_filter", "value", b"value"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["event_filter", b"event_filter", "offset", b"offset", "trace_filter", b"trace_filter", "value", b"value"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["offset", "event_filter", "trace_filter"] | None: ...

global___TracePageToken = TracePageToken

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

    META_FIELD_NUMBER: builtins.int
    FILTER_FIELD_NUMBER: builtins.int
    PAGE_TOKEN_FIELD_NUMBER: builtins.int
    ORDER_BY_FIELD_NUMBER: builtins.int
    order_by: global___TraceOrderBy.ValueType
    @property
    def meta(self) -> sentry_protos.snuba.v1.request_common_pb2.RequestMeta: ...
    @property
    def filter(self) -> global___TraceFilter: ...
    @property
    def page_token(self) -> global___TracePageToken: ...
    def __init__(
        self,
        *,
        meta: sentry_protos.snuba.v1.request_common_pb2.RequestMeta | None = ...,
        filter: global___TraceFilter | None = ...,
        page_token: global___TracePageToken | None = ...,
        order_by: global___TraceOrderBy.ValueType = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["filter", b"filter", "meta", b"meta", "page_token", b"page_token"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["filter", b"filter", "meta", b"meta", "order_by", b"order_by", "page_token", b"page_token"]) -> None: ...

global___FindTracesRequest = FindTracesRequest

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

    TRACE_ID_FIELD_NUMBER: builtins.int
    START_TIMESTAMP_FIELD_NUMBER: builtins.int
    END_TIMESTAMP_FIELD_NUMBER: builtins.int
    trace_id: builtins.str
    @property
    def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    @property
    def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    def __init__(
        self,
        *,
        trace_id: builtins.str = ...,
        start_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        end_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
    ) -> 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["end_timestamp", b"end_timestamp", "start_timestamp", b"start_timestamp", "trace_id", b"trace_id"]) -> None: ...

global___TraceResponse = TraceResponse

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

    TRACES_FIELD_NUMBER: builtins.int
    PAGE_TOKEN_FIELD_NUMBER: builtins.int
    @property
    def traces(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TraceResponse]: ...
    @property
    def page_token(self) -> global___TracePageToken: ...
    def __init__(
        self,
        *,
        traces: collections.abc.Iterable[global___TraceResponse] | None = ...,
        page_token: global___TracePageToken | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["page_token", b"page_token"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["page_token", b"page_token", "traces", b"traces"]) -> None: ...

global___FindTracesResponse = FindTracesResponse

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

    TRACE_ITEM_NAME_FIELD_NUMBER: builtins.int
    FILTER_FIELD_NUMBER: builtins.int
    trace_item_name: sentry_protos.snuba.v1.request_common_pb2.TraceItemName.ValueType
    @property
    def filter(self) -> sentry_protos.snuba.v1.trace_item_filter_pb2.TraceItemFilter: ...
    def __init__(
        self,
        *,
        trace_item_name: sentry_protos.snuba.v1.request_common_pb2.TraceItemName.ValueType = ...,
        filter: sentry_protos.snuba.v1.trace_item_filter_pb2.TraceItemFilter | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["filter", b"filter"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["filter", b"filter", "trace_item_name", b"trace_item_name"]) -> None: ...

global___EventFilter = EventFilter

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

    FILTERS_FIELD_NUMBER: builtins.int
    @property
    def filters(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TraceFilter]: ...
    def __init__(
        self,
        *,
        filters: collections.abc.Iterable[global___TraceFilter] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["filters", b"filters"]) -> None: ...

global___AndTraceFilter = AndTraceFilter

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

    FILTERS_FIELD_NUMBER: builtins.int
    @property
    def filters(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TraceFilter]: ...
    def __init__(
        self,
        *,
        filters: collections.abc.Iterable[global___TraceFilter] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["filters", b"filters"]) -> None: ...

global___OrTraceFilter = OrTraceFilter

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

    FILTERS_FIELD_NUMBER: builtins.int
    @property
    def filters(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TraceFilter]: ...
    def __init__(
        self,
        *,
        filters: collections.abc.Iterable[global___TraceFilter] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["filters", b"filters"]) -> None: ...

global___NotTraceFilter = NotTraceFilter

@typing.final
class TraceFilter(google.protobuf.message.Message):
    """Represents a set of conditions for finding particular events
    in a trace. Each EventFilter is meant to find one particular
    type of event. Those can then be combined to find traces that
    contain different combinations of events.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    AND_FILTER_FIELD_NUMBER: builtins.int
    OR_FILTER_FIELD_NUMBER: builtins.int
    NOT_FILTER_FIELD_NUMBER: builtins.int
    EVENT_FILTER_FIELD_NUMBER: builtins.int
    @property
    def and_filter(self) -> global___AndTraceFilter: ...
    @property
    def or_filter(self) -> global___OrTraceFilter: ...
    @property
    def not_filter(self) -> global___NotTraceFilter: ...
    @property
    def event_filter(self) -> global___EventFilter: ...
    def __init__(
        self,
        *,
        and_filter: global___AndTraceFilter | None = ...,
        or_filter: global___OrTraceFilter | None = ...,
        not_filter: global___NotTraceFilter | None = ...,
        event_filter: global___EventFilter | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["and_filter", b"and_filter", "event_filter", b"event_filter", "filter", b"filter", "not_filter", b"not_filter", "or_filter", b"or_filter"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["and_filter", b"and_filter", "event_filter", b"event_filter", "filter", b"filter", "not_filter", b"not_filter", "or_filter", b"or_filter"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["filter", b"filter"]) -> typing.Literal["and_filter", "or_filter", "not_filter", "event_filter"] | None: ...

global___TraceFilter = TraceFilter
