"""
@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 sys
import typing

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

class _UnaryOperatorTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_UnaryOperatorType.ValueType], builtins.type):  # noqa: F821
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    UNARY_OPERATOR_TYPE_INVALID: _UnaryOperatorType.ValueType  # 0
    UNARY_OPERATOR_TYPE_EXACT_MATCH: _UnaryOperatorType.ValueType  # 1
    UNARY_OPERATOR_TYPE_SAFE_REGEX_MATCH: _UnaryOperatorType.ValueType  # 2
    UNARY_OPERATOR_TYPE_PRESENT_MATCH: _UnaryOperatorType.ValueType  # 3
    UNARY_OPERATOR_TYPE_PREFIX_MATCH: _UnaryOperatorType.ValueType  # 4
    UNARY_OPERATOR_TYPE_SUFFIX_MATCH: _UnaryOperatorType.ValueType  # 5
    UNARY_OPERATOR_TYPE_CONTAINS_MATCH: _UnaryOperatorType.ValueType  # 6
    UNARY_OPERATOR_TYPE_STRING_MATCH: _UnaryOperatorType.ValueType  # 7

class UnaryOperatorType(_UnaryOperatorType, metaclass=_UnaryOperatorTypeEnumTypeWrapper):
    """Unary operators available types"""

UNARY_OPERATOR_TYPE_INVALID: UnaryOperatorType.ValueType  # 0
UNARY_OPERATOR_TYPE_EXACT_MATCH: UnaryOperatorType.ValueType  # 1
UNARY_OPERATOR_TYPE_SAFE_REGEX_MATCH: UnaryOperatorType.ValueType  # 2
UNARY_OPERATOR_TYPE_PRESENT_MATCH: UnaryOperatorType.ValueType  # 3
UNARY_OPERATOR_TYPE_PREFIX_MATCH: UnaryOperatorType.ValueType  # 4
UNARY_OPERATOR_TYPE_SUFFIX_MATCH: UnaryOperatorType.ValueType  # 5
UNARY_OPERATOR_TYPE_CONTAINS_MATCH: UnaryOperatorType.ValueType  # 6
UNARY_OPERATOR_TYPE_STRING_MATCH: UnaryOperatorType.ValueType  # 7
global___UnaryOperatorType = UnaryOperatorType

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

class _BinaryOperatorTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_BinaryOperatorType.ValueType], builtins.type):  # noqa: F821
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    BINARY_OPERATOR_TYPE_INVALID: _BinaryOperatorType.ValueType  # 0
    BINARY_OPERATOR_TYPE_RANGE_MATCH: _BinaryOperatorType.ValueType  # 1

class BinaryOperatorType(_BinaryOperatorType, metaclass=_BinaryOperatorTypeEnumTypeWrapper):
    """Binary operators available types"""

BINARY_OPERATOR_TYPE_INVALID: BinaryOperatorType.ValueType  # 0
BINARY_OPERATOR_TYPE_RANGE_MATCH: BinaryOperatorType.ValueType  # 1
global___BinaryOperatorType = BinaryOperatorType

class MultipleHttpTraffic(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

global___MultipleHttpTraffic = MultipleHttpTraffic

class HttpTraffic(google.protobuf.message.Message):
    """Http traffic configuration"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ID_FIELD_NUMBER: builtins.int
    ROUTE_MATCH_FIELD_NUMBER: builtins.int
    ORDER_FIELD_NUMBER: builtins.int
    GROUP_ID_FIELD_NUMBER: builtins.int
    id: builtins.str
    """Id that will be used to modify the config by core services"""
    @property
    def route_match(self) -> global___RouteMatch: ...
    order: builtins.int
    """order"""
    group_id: builtins.str
    """owner of the traffic."""
    def __init__(
        self,
        *,
        id: builtins.str = ...,
        route_match: global___RouteMatch | None = ...,
        order: builtins.int = ...,
        group_id: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["http_traffic", b"http_traffic", "route_match", b"route_match"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["group_id", b"group_id", "http_traffic", b"http_traffic", "id", b"id", "order", b"order", "route_match", b"route_match"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["http_traffic", b"http_traffic"]) -> typing_extensions.Literal["route_match"] | None: ...

global___HttpTraffic = HttpTraffic

class RouteMatch(google.protobuf.message.Message):
    """Route that base on match of rules"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PATH_FIELD_NUMBER: builtins.int
    MATCHES_FIELD_NUMBER: builtins.int
    ROUTES_FIELD_NUMBER: builtins.int
    path: builtins.str
    """URL path to match for exampel /v1/predict/path"""
    @property
    def matches(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Match]:
        """Matches which should evaluate"""
    @property
    def routes(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Route]:
        """Route that will apply incase that all matches evaluated to true"""
    def __init__(
        self,
        *,
        path: builtins.str = ...,
        matches: collections.abc.Iterable[global___Match] | None = ...,
        routes: collections.abc.Iterable[global___Route] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["matches", b"matches", "path", b"path", "routes", b"routes"]) -> None: ...

global___RouteMatch = RouteMatch

class Match(google.protobuf.message.Message):
    """Match rule"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    HEADER_MATCH_FIELD_NUMBER: builtins.int
    @property
    def header_match(self) -> global___HeaderMatch: ...
    def __init__(
        self,
        *,
        header_match: global___HeaderMatch | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["header_match", b"header_match", "rule", b"rule"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["header_match", b"header_match", "rule", b"rule"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["rule", b"rule"]) -> typing_extensions.Literal["header_match"] | None: ...

global___Match = Match

class HeaderMatch(google.protobuf.message.Message):
    """Header match rule"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    KEY_FIELD_NUMBER: builtins.int
    CONDITION_FIELD_NUMBER: builtins.int
    INVERT_FIELD_NUMBER: builtins.int
    key: builtins.str
    """Header key"""
    @property
    def condition(self) -> global___HeaderCondition:
        """Header condition"""
    invert: builtins.bool
    """Condition evaluation should be inverted (For example False will be True)"""
    def __init__(
        self,
        *,
        key: builtins.str = ...,
        condition: global___HeaderCondition | None = ...,
        invert: builtins.bool = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["condition", b"condition"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["condition", b"condition", "invert", b"invert", "key", b"key"]) -> None: ...

global___HeaderMatch = HeaderMatch

class HeaderCondition(google.protobuf.message.Message):
    """Header condition type - Unary/Binary condition"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    BINARY_CONDITION_FIELD_NUMBER: builtins.int
    UNARY_CONDITION_FIELD_NUMBER: builtins.int
    @property
    def binary_condition(self) -> global___HeaderBinaryCondition: ...
    @property
    def unary_condition(self) -> global___HeaderUnaryCondition: ...
    def __init__(
        self,
        *,
        binary_condition: global___HeaderBinaryCondition | None = ...,
        unary_condition: global___HeaderUnaryCondition | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["binary_condition", b"binary_condition", "condition", b"condition", "unary_condition", b"unary_condition"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["binary_condition", b"binary_condition", "condition", b"condition", "unary_condition", b"unary_condition"]) -> None: ...
    def WhichOneof(self, oneof_group: typing_extensions.Literal["condition", b"condition"]) -> typing_extensions.Literal["binary_condition", "unary_condition"] | None: ...

global___HeaderCondition = HeaderCondition

class HeaderUnaryCondition(google.protobuf.message.Message):
    """Unary condition definition
    For example: unary_operator UnaryOperator.UNARY_OPERATOR_EXACT_MATCH with operand hello,
                 will check that header value will be exactly hello.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    OPERATOR_FIELD_NUMBER: builtins.int
    OPERAND_FIELD_NUMBER: builtins.int
    operator: global___UnaryOperatorType.ValueType
    operand: builtins.str
    def __init__(
        self,
        *,
        operator: global___UnaryOperatorType.ValueType = ...,
        operand: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["operand", b"operand", "operator", b"operator"]) -> None: ...

global___HeaderUnaryCondition = HeaderUnaryCondition

class HeaderBinaryCondition(google.protobuf.message.Message):
    """Binary condition definition
    For example: unary_operator BinaryOperatorType.BINARY_OPERATOR_TYPE_RANGE_MATCH with first_operand 1,
                 and second operand 3 will check that header value will be in range of 1-3 included)
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    OPERATOR_FIELD_NUMBER: builtins.int
    FIRST_OPERAND_FIELD_NUMBER: builtins.int
    SECOND_OPERAND_FIELD_NUMBER: builtins.int
    operator: global___BinaryOperatorType.ValueType
    first_operand: builtins.str
    second_operand: builtins.str
    def __init__(
        self,
        *,
        operator: global___BinaryOperatorType.ValueType = ...,
        first_operand: builtins.str = ...,
        second_operand: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["first_operand", b"first_operand", "operator", b"operator", "second_operand", b"second_operand"]) -> None: ...

global___HeaderBinaryCondition = HeaderBinaryCondition

class Route(google.protobuf.message.Message):
    """Route configuration to apply on specific endpoint if all conditions evaluated to true."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ENDPOINT_FIELD_NUMBER: builtins.int
    WEIGHT_FIELD_NUMBER: builtins.int
    SHADOW_FIELD_NUMBER: builtins.int
    VARIATION_FIELD_NUMBER: builtins.int
    REQUEST_TIMEOUT_MS_FIELD_NUMBER: builtins.int
    endpoint: builtins.str
    """Endpoint weight"""
    weight: builtins.int
    """Weight of endpoint on splitting between other endpoints (Not percentage)"""
    shadow: builtins.bool
    """Shadow all traffic to this endpoint (All response from this endpoint will be ignored)"""
    variation: builtins.str
    """The variation of the specific endpoint"""
    request_timeout_ms: builtins.int
    """Timeout of the request in ms"""
    def __init__(
        self,
        *,
        endpoint: builtins.str = ...,
        weight: builtins.int = ...,
        shadow: builtins.bool = ...,
        variation: builtins.str = ...,
        request_timeout_ms: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["endpoint", b"endpoint", "request_timeout_ms", b"request_timeout_ms", "shadow", b"shadow", "variation", b"variation", "weight", b"weight"]) -> None: ...

global___Route = Route
