"""
@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 typing
import yandex.cloud.iam.v1.resource_pb2

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

    SUBJECT_ID_FIELD_NUMBER: builtins.int
    ORGANIZATION_ID_FIELD_NUMBER: builtins.int
    PAGE_SIZE_FIELD_NUMBER: builtins.int
    PAGE_TOKEN_FIELD_NUMBER: builtins.int
    subject_id: builtins.str
    """SubjectId to list access bindings for."""
    organization_id: builtins.str
    """OrganizationId to search access bindings in."""
    page_size: builtins.int
    """The maximum number of results per page to return. If the number of available
    results is larger than [page_size],
    the service returns a [ListSubjectAccessBindingsResponse.next_page_token]
    that can be used to get the next page of results in subsequent list requests.
    Default value: 100
    """
    page_token: builtins.str
    """Page token. To get the next page of results, set [page_token]
    to the [ListSubjectAccessBindingsResponse.next_page_token]
    returned by a previous list request.
    """
    def __init__(
        self,
        *,
        subject_id: builtins.str = ...,
        organization_id: builtins.str = ...,
        page_size: builtins.int = ...,
        page_token: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["organization_id", b"organization_id", "page_size", b"page_size", "page_token", b"page_token", "subject_id", b"subject_id"]) -> None: ...

global___ListSubjectAccessBindingsRequest = ListSubjectAccessBindingsRequest

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

    SUBJECT_ACCESS_BINDINGS_FIELD_NUMBER: builtins.int
    NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int
    next_page_token: builtins.str
    """This token allows you to get the next page of results for list requests. If the number of results
    is larger than [ListSubjectAccessBindingsRequest.page_size], use
    the [next_page_token] as the value
    for the [ListSubjectAccessBindingsRequest.page_token] query parameter
    in the next list request. Each subsequent list request will have its own
    [next_page_token] to continue paging through the results.
    """
    @property
    def subject_access_bindings(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SubjectAccessBinding]:
        """List of access bindings for the specified subject."""

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

global___ListSubjectAccessBindingsResponse = ListSubjectAccessBindingsResponse

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

    ROLE_ID_FIELD_NUMBER: builtins.int
    RESOURCE_FIELD_NUMBER: builtins.int
    SUBJECT_ID_FIELD_NUMBER: builtins.int
    role_id: builtins.str
    """Role assigned to the subject."""
    subject_id: builtins.str
    """Identifier of the subject to which this role is granted."""
    @property
    def resource(self) -> yandex.cloud.iam.v1.resource_pb2.Resource:
        """Resource to which the access binding applies."""

    def __init__(
        self,
        *,
        role_id: builtins.str = ...,
        resource: yandex.cloud.iam.v1.resource_pb2.Resource | None = ...,
        subject_id: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["resource", b"resource"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["resource", b"resource", "role_id", b"role_id", "subject_id", b"subject_id"]) -> None: ...

global___SubjectAccessBinding = SubjectAccessBinding
