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

import builtins
import google.protobuf.descriptor
import google.protobuf.message
import typing

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class RateLimit(google.protobuf.message.Message):
    """RateLimit is a set of settings for global rate limiting."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class Limit(google.protobuf.message.Message):
        """Limit is a rate limit value settings."""

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        PER_SECOND_FIELD_NUMBER: builtins.int
        PER_MINUTE_FIELD_NUMBER: builtins.int
        per_second: builtins.int
        """PerSecond is a limit value specified with per second time unit."""
        per_minute: builtins.int
        """PerMinute is a limit value specified with per minute time unit."""
        def __init__(
            self,
            *,
            per_second: builtins.int = ...,
            per_minute: builtins.int = ...,
        ) -> None: ...
        def HasField(self, field_name: typing.Literal["per_minute", b"per_minute", "per_second", b"per_second", "rate", b"rate"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing.Literal["per_minute", b"per_minute", "per_second", b"per_second", "rate", b"rate"]) -> None: ...
        def WhichOneof(self, oneof_group: typing.Literal["rate", b"rate"]) -> typing.Literal["per_second", "per_minute"] | None: ...

    ALL_REQUESTS_FIELD_NUMBER: builtins.int
    REQUESTS_PER_IP_FIELD_NUMBER: builtins.int
    @property
    def all_requests(self) -> global___RateLimit.Limit:
        """AllRequests is a rate limit configuration applied to all incoming requests."""

    @property
    def requests_per_ip(self) -> global___RateLimit.Limit:
        """RequestsPerIp is a rate limit configuration applied separately for each set of requests
        grouped by client IP address.
        """

    def __init__(
        self,
        *,
        all_requests: global___RateLimit.Limit | None = ...,
        requests_per_ip: global___RateLimit.Limit | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["all_requests", b"all_requests", "requests_per_ip", b"requests_per_ip"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["all_requests", b"all_requests", "requests_per_ip", b"requests_per_ip"]) -> None: ...

global___RateLimit = RateLimit
