"""
@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.message
import google.protobuf.wrappers_pb2
import typing

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class User(google.protobuf.message.Message):
    """A SPQR User resource. For more information, see the 
    [Developer's Guide](/docs/managed-spqr/concepts).
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    NAME_FIELD_NUMBER: builtins.int
    CLUSTER_ID_FIELD_NUMBER: builtins.int
    PERMISSIONS_FIELD_NUMBER: builtins.int
    SETTINGS_FIELD_NUMBER: builtins.int
    GRANTS_FIELD_NUMBER: builtins.int
    name: builtins.str
    """Name of the SPQR user."""
    cluster_id: builtins.str
    """ID of the SPQR cluster the user belongs to."""
    @property
    def permissions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Permission]:
        """Set of permissions granted to the user."""

    @property
    def settings(self) -> global___UserSettings:
        """SPQR Settings for this user"""

    @property
    def grants(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """User grants"""

    def __init__(
        self,
        *,
        name: builtins.str = ...,
        cluster_id: builtins.str = ...,
        permissions: collections.abc.Iterable[global___Permission] | None = ...,
        settings: global___UserSettings | None = ...,
        grants: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["settings", b"settings"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["cluster_id", b"cluster_id", "grants", b"grants", "name", b"name", "permissions", b"permissions", "settings", b"settings"]) -> None: ...

global___User = User

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

    DATABASE_NAME_FIELD_NUMBER: builtins.int
    database_name: builtins.str
    """Name of the database that the permission grants access to."""
    def __init__(
        self,
        *,
        database_name: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["database_name", b"database_name"]) -> None: ...

global___Permission = Permission

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

    NAME_FIELD_NUMBER: builtins.int
    PASSWORD_FIELD_NUMBER: builtins.int
    PERMISSIONS_FIELD_NUMBER: builtins.int
    SETTINGS_FIELD_NUMBER: builtins.int
    GRANTS_FIELD_NUMBER: builtins.int
    name: builtins.str
    """Name of the SPQR user."""
    password: builtins.str
    """Password of the SPQR user."""
    @property
    def permissions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Permission]:
        """Set of permissions to grant to the user."""

    @property
    def settings(self) -> global___UserSettings:
        """SPQR Settings for this user"""

    @property
    def grants(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """User grants"""

    def __init__(
        self,
        *,
        name: builtins.str = ...,
        password: builtins.str = ...,
        permissions: collections.abc.Iterable[global___Permission] | None = ...,
        settings: global___UserSettings | None = ...,
        grants: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["settings", b"settings"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["grants", b"grants", "name", b"name", "password", b"password", "permissions", b"permissions", "settings", b"settings"]) -> None: ...

global___UserSpec = UserSpec

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

    CONNECTION_LIMIT_FIELD_NUMBER: builtins.int
    CONNECTION_RETRIES_FIELD_NUMBER: builtins.int
    @property
    def connection_limit(self) -> google.protobuf.wrappers_pb2.Int64Value: ...
    @property
    def connection_retries(self) -> google.protobuf.wrappers_pb2.Int64Value: ...
    def __init__(
        self,
        *,
        connection_limit: google.protobuf.wrappers_pb2.Int64Value | None = ...,
        connection_retries: google.protobuf.wrappers_pb2.Int64Value | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["connection_limit", b"connection_limit", "connection_retries", b"connection_retries"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["connection_limit", b"connection_limit", "connection_retries", b"connection_retries"]) -> None: ...

global___UserSettings = UserSettings
