"""
@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.refresh_token_pb2

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

    SUBJECT_ID_FIELD_NUMBER: builtins.int
    REFRESH_TOKEN_IDS_FIELD_NUMBER: builtins.int
    subject_id: builtins.str
    @property
    def refresh_token_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Id of revoked Refresh Tokens."""

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

global___RevokeRefreshTokenMetadata = RevokeRefreshTokenMetadata

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

    SUBJECT_ID_FIELD_NUMBER: builtins.int
    PAGE_SIZE_FIELD_NUMBER: builtins.int
    PAGE_TOKEN_FIELD_NUMBER: builtins.int
    FILTER_FIELD_NUMBER: builtins.int
    subject_id: builtins.str
    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 [ListRefreshTokensResponse.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 [ListRefreshTokensResponse.next_page_token]
    returned by a previous list request.
    """
    filter: builtins.str
    """A filter expression that filters refresh tokens listed in the response.

    The expression must specify:
    1. The field name. Currently you can use filtering only on [RefreshToken.client_instance_info], [RefreshToken.client_id] or [RefreshToken.protection_level] fields.
    2. The operator. An `=` operator can be used for all fields. An 'IN' operator can be used for [RefreshToken.protection_level].
    3. The value. The value must be in double quotes (`"`). Must be 3-63 characters long and match the regular expression `[a-zA-Z][_-a-zA-Z0-9]{1,61}[a-z0-9]`.
    Example of a filter: `client_instance_info="clientInstanceInfo" AND protection_level IN ("INSECURE_KEY_DPOP", "SECURE_KEY_DPOP")`.
    """
    def __init__(
        self,
        *,
        subject_id: builtins.str = ...,
        page_size: builtins.int = ...,
        page_token: builtins.str = ...,
        filter: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["filter", b"filter", "page_size", b"page_size", "page_token", b"page_token", "subject_id", b"subject_id"]) -> None: ...

global___ListRefreshTokensRequest = ListRefreshTokensRequest

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

    REFRESH_TOKENS_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 [ListRefreshTokensForSubjectRequest.page_size], use
    the [next_page_token] as the value
    for the [ListRefreshTokensForSubjectRequest.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 refresh_tokens(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[yandex.cloud.iam.v1.refresh_token_pb2.RefreshToken]:
        """List of Refresh Tokens"""

    def __init__(
        self,
        *,
        refresh_tokens: collections.abc.Iterable[yandex.cloud.iam.v1.refresh_token_pb2.RefreshToken] | None = ...,
        next_page_token: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["next_page_token", b"next_page_token", "refresh_tokens", b"refresh_tokens"]) -> None: ...

global___ListRefreshTokensResponse = ListRefreshTokensResponse

@typing.final
class RevokeRefreshTokenRequest(google.protobuf.message.Message):
    """Revoke Refresh Token request.
    If none of the parameters refresh_token_id, refresh_token, or revoke_filter are provided, all Refresh Tokens for the current subject will be revoked.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    REFRESH_TOKEN_ID_FIELD_NUMBER: builtins.int
    REFRESH_TOKEN_FIELD_NUMBER: builtins.int
    REVOKE_FILTER_FIELD_NUMBER: builtins.int
    refresh_token_id: builtins.str
    """Identifier of the Refresh Token to be revoked."""
    refresh_token: builtins.str
    """The Refresh Token to be revoked."""
    @property
    def revoke_filter(self) -> global___RevokeFilter:
        """The filter for revoking Refresh Token"""

    def __init__(
        self,
        *,
        refresh_token_id: builtins.str = ...,
        refresh_token: builtins.str = ...,
        revoke_filter: global___RevokeFilter | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["filter", b"filter", "refresh_token", b"refresh_token", "refresh_token_id", b"refresh_token_id", "revoke_filter", b"revoke_filter"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["filter", b"filter", "refresh_token", b"refresh_token", "refresh_token_id", b"refresh_token_id", "revoke_filter", b"revoke_filter"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["filter", b"filter"]) -> typing.Literal["refresh_token_id", "refresh_token", "revoke_filter"] | None: ...

global___RevokeRefreshTokenRequest = RevokeRefreshTokenRequest

@typing.final
class RevokeFilter(google.protobuf.message.Message):
    """The Filter object allows filtering Refresh Tokens that will be revoked.
    It contains three optional fields.
    When multiple fields are provided, they are combined using a logical AND operation.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    CLIENT_ID_FIELD_NUMBER: builtins.int
    SUBJECT_ID_FIELD_NUMBER: builtins.int
    CLIENT_INSTANCE_INFO_FIELD_NUMBER: builtins.int
    client_id: builtins.str
    """The OAuth client identifier for which the Refresh Token was issued."""
    subject_id: builtins.str
    """The subject identifier for whom the Refresh Token was issued.
    If not specified, it defaults to the subject that made the request.
    """
    client_instance_info: builtins.str
    """Information about the app for which the Refresh Token was issued."""
    def __init__(
        self,
        *,
        client_id: builtins.str = ...,
        subject_id: builtins.str = ...,
        client_instance_info: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["client_id", b"client_id", "client_instance_info", b"client_instance_info", "subject_id", b"subject_id"]) -> None: ...

global___RevokeFilter = RevokeFilter

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

    REFRESH_TOKEN_IDS_FIELD_NUMBER: builtins.int
    @property
    def refresh_token_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Id of revoked Refresh Tokens."""

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

global___RevokeRefreshTokenResponse = RevokeRefreshTokenResponse
