"""
@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
import yandex.cloud.loadtesting.api.v1.common.quantiles_pb2

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

class _AggregationEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Aggregation.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    AGGREGATION_UNSPECIFIED: _Aggregation.ValueType  # 0
    """Unspecified."""
    AGGREGATION_MIN: _Aggregation.ValueType  # 1
    """Minimum."""
    AGGREGATION_MAX: _Aggregation.ValueType  # 2
    """Maximum."""
    AGGREGATION_AVG: _Aggregation.ValueType  # 4
    """Average."""
    AGGREGATION_MEDIAN: _Aggregation.ValueType  # 5
    """Median."""
    AGGREGATION_STD_DEV: _Aggregation.ValueType  # 6
    """Standard deviation."""

class Aggregation(_Aggregation, metaclass=_AggregationEnumTypeWrapper):
    """Aggregation function."""

AGGREGATION_UNSPECIFIED: Aggregation.ValueType  # 0
"""Unspecified."""
AGGREGATION_MIN: Aggregation.ValueType  # 1
"""Minimum."""
AGGREGATION_MAX: Aggregation.ValueType  # 2
"""Maximum."""
AGGREGATION_AVG: Aggregation.ValueType  # 4
"""Average."""
AGGREGATION_MEDIAN: Aggregation.ValueType  # 5
"""Median."""
AGGREGATION_STD_DEV: Aggregation.ValueType  # 6
"""Standard deviation."""
global___Aggregation = Aggregation

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

class _ComparisonEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Comparison.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    COMPARISON_UNSPECIFIED: _Comparison.ValueType  # 0
    """Unspecified."""
    COMPARISON_LT: _Comparison.ValueType  # 1
    """Less than the specified value."""
    COMPARISON_LTE: _Comparison.ValueType  # 2
    """Less than or equal to the specified value."""
    COMPARISON_GT: _Comparison.ValueType  # 3
    """Greater than the specified value."""
    COMPARISON_GTE: _Comparison.ValueType  # 4
    """Greater than or equal to the specified value."""

class Comparison(_Comparison, metaclass=_ComparisonEnumTypeWrapper):
    """Comparison operator."""

COMPARISON_UNSPECIFIED: Comparison.ValueType  # 0
"""Unspecified."""
COMPARISON_LT: Comparison.ValueType  # 1
"""Less than the specified value."""
COMPARISON_LTE: Comparison.ValueType  # 2
"""Less than or equal to the specified value."""
COMPARISON_GT: Comparison.ValueType  # 3
"""Greater than the specified value."""
COMPARISON_GTE: Comparison.ValueType  # 4
"""Greater than or equal to the specified value."""
global___Comparison = Comparison

@typing.final
class Kpi(google.protobuf.message.Message):
    """KPI (Key Performance Indicator) represents some integral indicator measured during test."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SELECTOR_FIELD_NUMBER: builtins.int
    THRESHOLD_FIELD_NUMBER: builtins.int
    @property
    def selector(self) -> global___KpiSelector:
        """Kind of KPI."""

    @property
    def threshold(self) -> global___KpiThreshold:
        """A condition that should be specified."""

    def __init__(
        self,
        *,
        selector: global___KpiSelector | None = ...,
        threshold: global___KpiThreshold | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["selector", b"selector", "threshold", b"threshold"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["selector", b"selector", "threshold", b"threshold"]) -> None: ...

global___Kpi = Kpi

@typing.final
class KpiThreshold(google.protobuf.message.Message):
    """KPI threshold represents a condition that an actual value of test's KPI should satisfy."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    VALUE_FIELD_NUMBER: builtins.int
    COMPARISON_FIELD_NUMBER: builtins.int
    value: builtins.float
    """Value for comparison with an actual KPI value."""
    comparison: global___Comparison.ValueType
    """Comparison operator for comparing actual with the threshold value.

    Rule: actual (</<=/>/>=) reference
    """
    def __init__(
        self,
        *,
        value: builtins.float = ...,
        comparison: global___Comparison.ValueType = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["comparison", b"comparison", "value", b"value"]) -> None: ...

global___KpiThreshold = KpiThreshold

@typing.final
class KpiSelector(google.protobuf.message.Message):
    """KPI selector."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class ResponseTime(google.protobuf.message.Message):
        """Response time."""

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        QUANTILE_FIELD_NUMBER: builtins.int
        quantile: yandex.cloud.loadtesting.api.v1.common.quantiles_pb2.QuantileType.ValueType
        """Cummulative quantile (percentile)."""
        def __init__(
            self,
            *,
            quantile: yandex.cloud.loadtesting.api.v1.common.quantiles_pb2.QuantileType.ValueType = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["quantile", b"quantile"]) -> None: ...

    @typing.final
    class Instances(google.protobuf.message.Message):
        """Aggregated number of instances."""

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        AGG_FIELD_NUMBER: builtins.int
        agg: global___Aggregation.ValueType
        """Aggregation function."""
        def __init__(
            self,
            *,
            agg: global___Aggregation.ValueType = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["agg", b"agg"]) -> None: ...

    @typing.final
    class ImbalanceRps(google.protobuf.message.Message):
        """Imbalance RPS."""

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        def __init__(
            self,
        ) -> None: ...

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

        CODES_PATTERNS_FIELD_NUMBER: builtins.int
        @property
        def codes_patterns(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
            """Protocol (HTTP, GRPC) code patterns to match.

            All successful HTTP responses: ['2xx', '3xx'].
            All failed HTTP responses: ['0', '4xx', '5xx'].
            """

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

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

        CODES_PATTERNS_FIELD_NUMBER: builtins.int
        @property
        def codes_patterns(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
            """Protocol (HTTP, GRPC) code patterns to match.

            All successful HTTP responses: ['2xx', '3xx'].
            All failed HTTP responses: ['0', '4xx', '5xx'].
            """

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

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

        CODES_PATTERNS_FIELD_NUMBER: builtins.int
        @property
        def codes_patterns(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
            """Network code patterns to match.

            All successful network responses: ['0'].
            All failed network responses: ['xx', 'xxx'].
            """

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

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

        CODES_PATTERNS_FIELD_NUMBER: builtins.int
        @property
        def codes_patterns(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
            """Network code patterns to match.

            All successful network responses: ['0'].
            All failed network responses: ['xx', 'xxx'].
            """

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

    RESPONSE_TIME_FIELD_NUMBER: builtins.int
    INSTANCES_FIELD_NUMBER: builtins.int
    IMBALANCE_RPS_FIELD_NUMBER: builtins.int
    PROTOCOL_CODES_ABSOLUTE_FIELD_NUMBER: builtins.int
    PROTOCOL_CODES_RELATIVE_FIELD_NUMBER: builtins.int
    NETWORK_CODES_ABSOLUTE_FIELD_NUMBER: builtins.int
    NETWORK_CODES_RELATIVE_FIELD_NUMBER: builtins.int
    @property
    def response_time(self) -> global___KpiSelector.ResponseTime:
        """Response time cummulative quantile (percentile)."""

    @property
    def instances(self) -> global___KpiSelector.Instances:
        """A number of instances throughout the test."""

    @property
    def imbalance_rps(self) -> global___KpiSelector.ImbalanceRps:
        """An RPS at the moment the test has been auto-stopped."""

    @property
    def protocol_codes_absolute(self) -> global___KpiSelector.ProtocolCodesAbsolute:
        """A total number of requests completed with certain protocol (HTTP, GRPC, etc.) codes."""

    @property
    def protocol_codes_relative(self) -> global___KpiSelector.ProtocolCodesRelative:
        """A percentage of requests completed with certain protocol (HTTP, GRPC, etc.) codes."""

    @property
    def network_codes_absolute(self) -> global___KpiSelector.NetworkCodesAbsolute:
        """A total number of requests completed with certain network codes."""

    @property
    def network_codes_relative(self) -> global___KpiSelector.NetworkCodesRelative:
        """A percentage of requests completed with certain network codes."""

    def __init__(
        self,
        *,
        response_time: global___KpiSelector.ResponseTime | None = ...,
        instances: global___KpiSelector.Instances | None = ...,
        imbalance_rps: global___KpiSelector.ImbalanceRps | None = ...,
        protocol_codes_absolute: global___KpiSelector.ProtocolCodesAbsolute | None = ...,
        protocol_codes_relative: global___KpiSelector.ProtocolCodesRelative | None = ...,
        network_codes_absolute: global___KpiSelector.NetworkCodesAbsolute | None = ...,
        network_codes_relative: global___KpiSelector.NetworkCodesRelative | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["imbalance_rps", b"imbalance_rps", "instances", b"instances", "kind", b"kind", "network_codes_absolute", b"network_codes_absolute", "network_codes_relative", b"network_codes_relative", "protocol_codes_absolute", b"protocol_codes_absolute", "protocol_codes_relative", b"protocol_codes_relative", "response_time", b"response_time"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["imbalance_rps", b"imbalance_rps", "instances", b"instances", "kind", b"kind", "network_codes_absolute", b"network_codes_absolute", "network_codes_relative", b"network_codes_relative", "protocol_codes_absolute", b"protocol_codes_absolute", "protocol_codes_relative", b"protocol_codes_relative", "response_time", b"response_time"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["kind", b"kind"]) -> typing.Literal["response_time", "instances", "imbalance_rps", "protocol_codes_absolute", "protocol_codes_relative", "network_codes_absolute", "network_codes_relative"] | None: ...

global___KpiSelector = KpiSelector
