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

import builtins
import google.protobuf.descriptor
import google.protobuf.descriptor_pb2
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.internal.extension_dict
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 _AuthLevel:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _AuthLevelEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_AuthLevel.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    AUTH_LEVEL_UNKNOWN: _AuthLevel.ValueType  # 0
    """error"""
    AUTH_LEVEL_OPEN: _AuthLevel.ValueType  # 1
    """accessible to all"""
    AUTH_LEVEL_JAILED: _AuthLevel.ValueType  # 2
    """accessible to users who need to finish some things to get into the app"""
    AUTH_LEVEL_SECURE: _AuthLevel.ValueType  # 3
    """accessible to all signed in users"""
    AUTH_LEVEL_EDITOR: _AuthLevel.ValueType  # 5
    """accessible to editors (admin-lite: can create communities, modify volunteer data)"""
    AUTH_LEVEL_ADMIN: _AuthLevel.ValueType  # 4
    """accessible only by the Couchers organization"""

class AuthLevel(_AuthLevel, metaclass=_AuthLevelEnumTypeWrapper): ...

AUTH_LEVEL_UNKNOWN: AuthLevel.ValueType  # 0
"""error"""
AUTH_LEVEL_OPEN: AuthLevel.ValueType  # 1
"""accessible to all"""
AUTH_LEVEL_JAILED: AuthLevel.ValueType  # 2
"""accessible to users who need to finish some things to get into the app"""
AUTH_LEVEL_SECURE: AuthLevel.ValueType  # 3
"""accessible to all signed in users"""
AUTH_LEVEL_EDITOR: AuthLevel.ValueType  # 5
"""accessible to editors (admin-lite: can create communities, modify volunteer data)"""
AUTH_LEVEL_ADMIN: AuthLevel.ValueType  # 4
"""accessible only by the Couchers organization"""
Global___AuthLevel: typing_extensions.TypeAlias = AuthLevel

@typing.final
class RateLimit(google.protobuf.message.Message):
    """A rate limit, in requests per minute, with one optional count per dimension. Unset fields fall back
    to the service default (per-RPC) or a global default constant. See docs/rate-limit-design.md.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PER_IP_FIELD_NUMBER: builtins.int
    PER_USER_FIELD_NUMBER: builtins.int
    GLOBAL_FIELD_NUMBER: builtins.int
    per_ip: builtins.int
    per_user: builtins.int
    def __init__(
        self,
        *,
        per_ip: builtins.int | None = ...,
        per_user: builtins.int | None = ...,
    ) -> None: ...
    _HasFieldArgType: typing_extensions.TypeAlias = typing.Literal["_global", b"_global", "_per_ip", b"_per_ip", "_per_user", b"_per_user", "global", b"global", "per_ip", b"per_ip", "per_user", b"per_user"]
    def HasField(self, field_name: _HasFieldArgType) -> builtins.bool: ...
    _ClearFieldArgType: typing_extensions.TypeAlias = typing.Literal["_global", b"_global", "_per_ip", b"_per_ip", "_per_user", b"_per_user", "global", b"global", "per_ip", b"per_ip", "per_user", b"per_user"]
    def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
    _WhichOneofReturnType__global: typing_extensions.TypeAlias = typing.Literal["global"]
    _WhichOneofArgType__global: typing_extensions.TypeAlias = typing.Literal["_global", b"_global"]
    _WhichOneofReturnType__per_ip: typing_extensions.TypeAlias = typing.Literal["per_ip"]
    _WhichOneofArgType__per_ip: typing_extensions.TypeAlias = typing.Literal["_per_ip", b"_per_ip"]
    _WhichOneofReturnType__per_user: typing_extensions.TypeAlias = typing.Literal["per_user"]
    _WhichOneofArgType__per_user: typing_extensions.TypeAlias = typing.Literal["_per_user", b"_per_user"]
    @typing.overload
    def WhichOneof(self, oneof_group: _WhichOneofArgType__global) -> _WhichOneofReturnType__global | None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: _WhichOneofArgType__per_ip) -> _WhichOneofReturnType__per_ip | None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: _WhichOneofArgType__per_user) -> _WhichOneofReturnType__per_user | None: ...

Global___RateLimit: typing_extensions.TypeAlias = RateLimit

SENSITIVE_FIELD_NUMBER: builtins.int
IS_TOKEN_FIELD_NUMBER: builtins.int
AUTH_LEVEL_FIELD_NUMBER: builtins.int
RATE_LIMIT_DEFAULT_FIELD_NUMBER: builtins.int
RATE_LIMIT_AGGREGATE_FIELD_NUMBER: builtins.int
RATE_LIMIT_FIELD_NUMBER: builtins.int
sensitive: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.FieldOptions, builtins.bool]
"""whether the field is sensitive and should not be logged"""
is_token: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.FieldOptions, builtins.bool]
"""this is a token"""
auth_level: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.ServiceOptions, Global___AuthLevel.ValueType]
"""the auth level required to access this service, one of"""
rate_limit_default: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.ServiceOptions, Global___RateLimit]
"""default per-RPC rate limit applied to every method in this service"""
rate_limit_aggregate: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.ServiceOptions, Global___RateLimit]
"""per-servicer aggregate rate limit, counting all methods in this service together"""
rate_limit: google.protobuf.internal.extension_dict._ExtensionFieldDescriptor[google.protobuf.descriptor_pb2.MethodOptions, Global___RateLimit]
"""this method's per-RPC rate limit, overriding the service default"""
