"""
@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.connectionmanager.v1.common_pb2

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

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

        USER_FIELD_NUMBER: builtins.int
        PASSWORD_FIELD_NUMBER: builtins.int
        user: builtins.str
        @property
        def password(self) -> yandex.cloud.connectionmanager.v1.common_pb2.Password: ...
        def __init__(
            self,
            *,
            user: builtins.str = ...,
            password: yandex.cloud.connectionmanager.v1.common_pb2.Password | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing.Literal["password", b"password"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing.Literal["password", b"password", "user", b"user"]) -> None: ...

    USER_PASSWORD_FIELD_NUMBER: builtins.int
    @property
    def user_password(self) -> global___RedisAuth.UserPasswordAuth: ...
    def __init__(
        self,
        *,
        user_password: global___RedisAuth.UserPasswordAuth | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["security", b"security", "user_password", b"user_password"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["security", b"security", "user_password", b"user_password"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["security", b"security"]) -> typing.Literal["user_password"] | None: ...

global___RedisAuth = RedisAuth

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

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

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

        class _RoleEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[RedisCluster.Host._Role.ValueType], builtins.type):
            DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
            ROLE_UNSPECIFIED: RedisCluster.Host._Role.ValueType  # 0
            MASTER: RedisCluster.Host._Role.ValueType  # 1
            REPLICA: RedisCluster.Host._Role.ValueType  # 2

        class Role(_Role, metaclass=_RoleEnumTypeWrapper): ...
        ROLE_UNSPECIFIED: RedisCluster.Host.Role.ValueType  # 0
        MASTER: RedisCluster.Host.Role.ValueType  # 1
        REPLICA: RedisCluster.Host.Role.ValueType  # 2

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

        class _HealthEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[RedisCluster.Host._Health.ValueType], builtins.type):
            DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
            HEALTH_UNSPECIFIED: RedisCluster.Host._Health.ValueType  # 0
            ALIVE: RedisCluster.Host._Health.ValueType  # 1
            DEAD: RedisCluster.Host._Health.ValueType  # 2
            DEGRADED: RedisCluster.Host._Health.ValueType  # 3

        class Health(_Health, metaclass=_HealthEnumTypeWrapper): ...
        HEALTH_UNSPECIFIED: RedisCluster.Host.Health.ValueType  # 0
        ALIVE: RedisCluster.Host.Health.ValueType  # 1
        DEAD: RedisCluster.Host.Health.ValueType  # 2
        DEGRADED: RedisCluster.Host.Health.ValueType  # 3

        HOST_FIELD_NUMBER: builtins.int
        PORT_FIELD_NUMBER: builtins.int
        ROLE_FIELD_NUMBER: builtins.int
        HEALTH_FIELD_NUMBER: builtins.int
        SHARD_NAME_FIELD_NUMBER: builtins.int
        host: builtins.str
        port: builtins.int
        role: global___RedisCluster.Host.Role.ValueType
        health: global___RedisCluster.Host.Health.ValueType
        shard_name: builtins.str
        def __init__(
            self,
            *,
            host: builtins.str = ...,
            port: builtins.int = ...,
            role: global___RedisCluster.Host.Role.ValueType = ...,
            health: global___RedisCluster.Host.Health.ValueType = ...,
            shard_name: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["health", b"health", "host", b"host", "port", b"port", "role", b"role", "shard_name", b"shard_name"]) -> None: ...

    HOSTS_FIELD_NUMBER: builtins.int
    SENTINEL_PORT_FIELD_NUMBER: builtins.int
    TLS_PARAMS_FIELD_NUMBER: builtins.int
    sentinel_port: builtins.int
    @property
    def hosts(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RedisCluster.Host]: ...
    @property
    def tls_params(self) -> yandex.cloud.connectionmanager.v1.common_pb2.TLSParams: ...
    def __init__(
        self,
        *,
        hosts: collections.abc.Iterable[global___RedisCluster.Host] | None = ...,
        sentinel_port: builtins.int = ...,
        tls_params: yandex.cloud.connectionmanager.v1.common_pb2.TLSParams | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["tls_params", b"tls_params"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["hosts", b"hosts", "sentinel_port", b"sentinel_port", "tls_params", b"tls_params"]) -> None: ...

global___RedisCluster = RedisCluster

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

    CLUSTER_FIELD_NUMBER: builtins.int
    AUTH_FIELD_NUMBER: builtins.int
    DATABASES_FIELD_NUMBER: builtins.int
    @property
    def cluster(self) -> global___RedisCluster: ...
    @property
    def auth(self) -> global___RedisAuth: ...
    @property
    def databases(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
    def __init__(
        self,
        *,
        cluster: global___RedisCluster | None = ...,
        auth: global___RedisAuth | None = ...,
        databases: collections.abc.Iterable[builtins.int] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["auth", b"auth", "cluster", b"cluster"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["auth", b"auth", "cluster", b"cluster", "databases", b"databases"]) -> None: ...

global___RedisConnection = RedisConnection
