"""
@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 google.protobuf.timestamp_pb2
import sys
import typing
import yandex.cloud.organizationmanager.v1.idp.synchronization_settings_pb2

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

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

class _OpenSessionResultEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_OpenSessionResult.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    OPEN_SESSION_RESULT_UNSPECIFIED: _OpenSessionResult.ValueType  # 0
    """The result is not specified."""
    SUCCESS: _OpenSessionResult.ValueType  # 1
    """Session opened successfully."""
    OPENED_SESSION_EXISTS: _OpenSessionResult.ValueType  # 2
    """A session already exists."""
    TOO_EARLY: _OpenSessionResult.ValueType  # 3
    """Too early to open a new session."""

class OpenSessionResult(_OpenSessionResult, metaclass=_OpenSessionResultEnumTypeWrapper):
    """Result of opening a synchronization session."""

OPEN_SESSION_RESULT_UNSPECIFIED: OpenSessionResult.ValueType  # 0
"""The result is not specified."""
SUCCESS: OpenSessionResult.ValueType  # 1
"""Session opened successfully."""
OPENED_SESSION_EXISTS: OpenSessionResult.ValueType  # 2
"""A session already exists."""
TOO_EARLY: OpenSessionResult.ValueType  # 3
"""Too early to open a new session."""
global___OpenSessionResult = OpenSessionResult

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

class _ChangeTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ChangeType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    CHANGE_TYPE_UNSPECIFIED: _ChangeType.ValueType  # 0
    """The change type is not specified."""
    CREATE: _ChangeType.ValueType  # 1
    """Create operation."""
    UPDATE: _ChangeType.ValueType  # 2
    """Update operation."""
    DELETE: _ChangeType.ValueType  # 3
    """Delete operation."""
    ACTIVATE: _ChangeType.ValueType  # 4
    """Activate operation."""
    DEACTIVATE: _ChangeType.ValueType  # 5
    """Deactivate operation."""
    PASSWORD_HASH_UPDATE: _ChangeType.ValueType  # 6
    """Password hash update operation."""

class ChangeType(_ChangeType, metaclass=_ChangeTypeEnumTypeWrapper):
    """Type of change during synchronization."""

CHANGE_TYPE_UNSPECIFIED: ChangeType.ValueType  # 0
"""The change type is not specified."""
CREATE: ChangeType.ValueType  # 1
"""Create operation."""
UPDATE: ChangeType.ValueType  # 2
"""Update operation."""
DELETE: ChangeType.ValueType  # 3
"""Delete operation."""
ACTIVATE: ChangeType.ValueType  # 4
"""Activate operation."""
DEACTIVATE: ChangeType.ValueType  # 5
"""Deactivate operation."""
PASSWORD_HASH_UPDATE: ChangeType.ValueType  # 6
"""Password hash update operation."""
global___ChangeType = ChangeType

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

class _RelatedObjectTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_RelatedObjectType.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    RELATED_OBJECT_TYPE_UNSPECIFIED: _RelatedObjectType.ValueType  # 0
    """The object type is not specified."""
    USER: _RelatedObjectType.ValueType  # 1
    """User object."""
    GROUP: _RelatedObjectType.ValueType  # 2
    """Group object."""
    MEMBERSHIP: _RelatedObjectType.ValueType  # 3
    """Membership object."""

class RelatedObjectType(_RelatedObjectType, metaclass=_RelatedObjectTypeEnumTypeWrapper):
    """Type of object related to synchronization."""

RELATED_OBJECT_TYPE_UNSPECIFIED: RelatedObjectType.ValueType  # 0
"""The object type is not specified."""
USER: RelatedObjectType.ValueType  # 1
"""User object."""
GROUP: RelatedObjectType.ValueType  # 2
"""Group object."""
MEMBERSHIP: RelatedObjectType.ValueType  # 3
"""Membership object."""
global___RelatedObjectType = RelatedObjectType

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

class _SyncModeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_SyncMode.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    SYNC_MODE_UNSPECIFIED: _SyncMode.ValueType  # 0
    """The sync mode is not specified."""
    FULL_SYNC: _SyncMode.ValueType  # 1
    """Full synchronization mode."""
    DELTA: _SyncMode.ValueType  # 2
    """Delta synchronization mode."""

class SyncMode(_SyncMode, metaclass=_SyncModeEnumTypeWrapper):
    """Synchronization mode."""

SYNC_MODE_UNSPECIFIED: SyncMode.ValueType  # 0
"""The sync mode is not specified."""
FULL_SYNC: SyncMode.ValueType  # 1
"""Full synchronization mode."""
DELTA: SyncMode.ValueType  # 2
"""Delta synchronization mode."""
global___SyncMode = SyncMode

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

class _SessionStatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_SessionStatus.ValueType], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    SESSION_STATUS_UNSPECIFIED: _SessionStatus.ValueType  # 0
    """The status is not specified."""
    OPENED: _SessionStatus.ValueType  # 1
    """Session is opened."""
    PENDING: _SessionStatus.ValueType  # 2
    """Session is pending."""
    COMPLETED: _SessionStatus.ValueType  # 3
    """Session is completed."""
    FAILED: _SessionStatus.ValueType  # 4
    """Session has failed."""
    EXPIRED: _SessionStatus.ValueType  # 5
    """Session has expired."""

class SessionStatus(_SessionStatus, metaclass=_SessionStatusEnumTypeWrapper):
    """Status of a synchronization session."""

SESSION_STATUS_UNSPECIFIED: SessionStatus.ValueType  # 0
"""The status is not specified."""
OPENED: SessionStatus.ValueType  # 1
"""Session is opened."""
PENDING: SessionStatus.ValueType  # 2
"""Session is pending."""
COMPLETED: SessionStatus.ValueType  # 3
"""Session is completed."""
FAILED: SessionStatus.ValueType  # 4
"""Session has failed."""
EXPIRED: SessionStatus.ValueType  # 5
"""Session has expired."""
global___SessionStatus = SessionStatus

@typing.final
class OpenSessionRequest(google.protobuf.message.Message):
    """Request to open a synchronization session."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SUBJECT_CONTAINER_ID_FIELD_NUMBER: builtins.int
    AGENT_ID_FIELD_NUMBER: builtins.int
    SESSION_TYPE_FIELD_NUMBER: builtins.int
    subject_container_id: builtins.str
    """ID of the subject container."""
    agent_id: builtins.str
    """ID of the agent opening the session."""
    session_type: yandex.cloud.organizationmanager.v1.idp.synchronization_settings_pb2.SessionType.ValueType
    """Type of synchronization session."""
    def __init__(
        self,
        *,
        subject_container_id: builtins.str = ...,
        agent_id: builtins.str = ...,
        session_type: yandex.cloud.organizationmanager.v1.idp.synchronization_settings_pb2.SessionType.ValueType = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["agent_id", b"agent_id", "session_type", b"session_type", "subject_container_id", b"subject_container_id"]) -> None: ...

global___OpenSessionRequest = OpenSessionRequest

@typing.final
class SynchronizationSession(google.protobuf.message.Message):
    """Synchronization session information."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    AGENT_ID_FIELD_NUMBER: builtins.int
    CREATED_AT_FIELD_NUMBER: builtins.int
    EXPIRES_AT_FIELD_NUMBER: builtins.int
    CLOSED_AT_FIELD_NUMBER: builtins.int
    SYNC_MODE_FIELD_NUMBER: builtins.int
    STATUS_FIELD_NUMBER: builtins.int
    PROGRESS_ENTRIES_FIELD_NUMBER: builtins.int
    FAIL_REASON_FIELD_NUMBER: builtins.int
    SESSION_TYPE_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """Unique identifier of the session."""
    agent_id: builtins.str
    """ID of the agent managing the session."""
    sync_mode: global___SyncMode.ValueType
    """Synchronization mode."""
    status: global___SessionStatus.ValueType
    """Current status of the session."""
    fail_reason: builtins.str
    """Reason for session failure, if any."""
    session_type: yandex.cloud.organizationmanager.v1.idp.synchronization_settings_pb2.SessionType.ValueType
    """Type of synchronization session."""
    @property
    def created_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Timestamp when the session was created."""

    @property
    def expires_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Timestamp when the session expires."""

    @property
    def closed_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Timestamp when the session was closed."""

    @property
    def progress_entries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ProgressEntry]:
        """List of progress entries."""

    def __init__(
        self,
        *,
        session_id: builtins.str = ...,
        agent_id: builtins.str = ...,
        created_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        expires_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        closed_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        sync_mode: global___SyncMode.ValueType = ...,
        status: global___SessionStatus.ValueType = ...,
        progress_entries: collections.abc.Iterable[global___ProgressEntry] | None = ...,
        fail_reason: builtins.str = ...,
        session_type: yandex.cloud.organizationmanager.v1.idp.synchronization_settings_pb2.SessionType.ValueType = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["closed_at", b"closed_at", "created_at", b"created_at", "expires_at", b"expires_at"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["agent_id", b"agent_id", "closed_at", b"closed_at", "created_at", b"created_at", "expires_at", b"expires_at", "fail_reason", b"fail_reason", "progress_entries", b"progress_entries", "session_id", b"session_id", "session_type", b"session_type", "status", b"status", "sync_mode", b"sync_mode"]) -> None: ...

global___SynchronizationSession = SynchronizationSession

@typing.final
class OpenSessionResponse(google.protobuf.message.Message):
    """Response message for [SynchronizationSessionService.OpenSession]."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    RESULT_FIELD_NUMBER: builtins.int
    OPENED_SESSION_FIELD_NUMBER: builtins.int
    NEXT_SESSION_AT_FIELD_NUMBER: builtins.int
    REPLICATION_TOKEN_FIELD_NUMBER: builtins.int
    SYNCHRONIZATION_SETTINGS_FIELD_NUMBER: builtins.int
    result: global___OpenSessionResult.ValueType
    """Result of opening the session."""
    replication_token: builtins.str
    """Replication token for the session."""
    @property
    def opened_session(self) -> global___SynchronizationSession:
        """Opened session information."""

    @property
    def next_session_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Timestamp for the next session if too early."""

    @property
    def synchronization_settings(self) -> yandex.cloud.organizationmanager.v1.idp.synchronization_settings_pb2.SynchronizationSettings:
        """Synchronization settings for the session."""

    def __init__(
        self,
        *,
        result: global___OpenSessionResult.ValueType = ...,
        opened_session: global___SynchronizationSession | None = ...,
        next_session_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        replication_token: builtins.str = ...,
        synchronization_settings: yandex.cloud.organizationmanager.v1.idp.synchronization_settings_pb2.SynchronizationSettings | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["next_session_at", b"next_session_at", "opened_session", b"opened_session", "session_info", b"session_info", "synchronization_settings", b"synchronization_settings"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["next_session_at", b"next_session_at", "opened_session", b"opened_session", "replication_token", b"replication_token", "result", b"result", "session_info", b"session_info", "synchronization_settings", b"synchronization_settings"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["session_info", b"session_info"]) -> typing.Literal["opened_session", "next_session_at"] | None: ...

global___OpenSessionResponse = OpenSessionResponse

@typing.final
class OpenSessionMetadata(google.protobuf.message.Message):
    """Metadata for the [SynchronizationSessionService.OpenSession] operation."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """ID of the session."""
    def __init__(
        self,
        *,
        session_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["session_id", b"session_id"]) -> None: ...

global___OpenSessionMetadata = OpenSessionMetadata

@typing.final
class GetSessionRequest(google.protobuf.message.Message):
    """Request to get a synchronization session."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """ID of the session to return."""
    def __init__(
        self,
        *,
        session_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["session_id", b"session_id"]) -> None: ...

global___GetSessionRequest = GetSessionRequest

@typing.final
class GetSessionResponse(google.protobuf.message.Message):
    """Response message for [SynchronizationSessionService.GetSession]."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_FIELD_NUMBER: builtins.int
    @property
    def session(self) -> global___SynchronizationSession:
        """Synchronization session information."""

    def __init__(
        self,
        *,
        session: global___SynchronizationSession | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["session", b"session"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["session", b"session"]) -> None: ...

global___GetSessionResponse = GetSessionResponse

@typing.final
class ReportSessionProgressRequest(google.protobuf.message.Message):
    """Request to report session progress."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    PROGRESS_ENTRIES_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """ID of the session."""
    @property
    def progress_entries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ProgressEntry]:
        """List of progress entries."""

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

global___ReportSessionProgressRequest = ReportSessionProgressRequest

@typing.final
class ReportSessionProgressMetadata(google.protobuf.message.Message):
    """Metadata for the [SynchronizationSessionService.ReportSessionProgress] operation."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """ID of the session."""
    def __init__(
        self,
        *,
        session_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["session_id", b"session_id"]) -> None: ...

global___ReportSessionProgressMetadata = ReportSessionProgressMetadata

@typing.final
class ProgressEntry(google.protobuf.message.Message):
    """Progress entry for synchronization."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    OBJECT_TYPE_FIELD_NUMBER: builtins.int
    CHANGE_INFO_FIELD_NUMBER: builtins.int
    object_type: global___RelatedObjectType.ValueType
    """Type of object being synchronized."""
    @property
    def change_info(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ChangeInfo]:
        """List of change information."""

    def __init__(
        self,
        *,
        object_type: global___RelatedObjectType.ValueType = ...,
        change_info: collections.abc.Iterable[global___ChangeInfo] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["change_info", b"change_info", "object_type", b"object_type"]) -> None: ...

global___ProgressEntry = ProgressEntry

@typing.final
class ChangeInfo(google.protobuf.message.Message):
    """Information about changes during synchronization."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    CHANGE_TYPE_FIELD_NUMBER: builtins.int
    SUCCESSFUL_FIELD_NUMBER: builtins.int
    FAILED_FIELD_NUMBER: builtins.int
    change_type: global___ChangeType.ValueType
    """Type of change."""
    successful: builtins.int
    """Number of successful changes."""
    failed: builtins.int
    """Number of failed changes."""
    def __init__(
        self,
        *,
        change_type: global___ChangeType.ValueType = ...,
        successful: builtins.int = ...,
        failed: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["change_type", b"change_type", "failed", b"failed", "successful", b"successful"]) -> None: ...

global___ChangeInfo = ChangeInfo

@typing.final
class ListSessionsRequest(google.protobuf.message.Message):
    """Request to list synchronization sessions."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SUBJECT_CONTAINER_ID_FIELD_NUMBER: builtins.int
    PAGE_SIZE_FIELD_NUMBER: builtins.int
    PAGE_TOKEN_FIELD_NUMBER: builtins.int
    FILTER_FIELD_NUMBER: builtins.int
    subject_container_id: builtins.str
    """ID of the subject container."""
    page_size: builtins.int
    """The maximum number of results per page to return."""
    page_token: builtins.str
    """Page token for pagination."""
    filter: builtins.str
    """A filter expression that filters resources listed in the response."""
    def __init__(
        self,
        *,
        subject_container_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_container_id", b"subject_container_id"]) -> None: ...

global___ListSessionsRequest = ListSessionsRequest

@typing.final
class ListSessionsResponse(google.protobuf.message.Message):
    """Response message for [SynchronizationSessionService.ListSessions]."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSIONS_FIELD_NUMBER: builtins.int
    NEXT_PAGE_TOKEN_FIELD_NUMBER: builtins.int
    next_page_token: builtins.str
    """Token for getting the next page of the list."""
    @property
    def sessions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SynchronizationSession]:
        """List of synchronization sessions."""

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

global___ListSessionsResponse = ListSessionsResponse

@typing.final
class CloseSessionRequest(google.protobuf.message.Message):
    """Request to close a synchronization session."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    FAILED_FIELD_NUMBER: builtins.int
    FAIL_REASON_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """ID of the session to close."""
    failed: builtins.bool
    """Whether the session failed."""
    fail_reason: builtins.str
    """Reason for session failure, if any."""
    def __init__(
        self,
        *,
        session_id: builtins.str = ...,
        failed: builtins.bool = ...,
        fail_reason: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["fail_reason", b"fail_reason", "failed", b"failed", "session_id", b"session_id"]) -> None: ...

global___CloseSessionRequest = CloseSessionRequest

@typing.final
class CloseSessionMetadata(google.protobuf.message.Message):
    """Metadata for the [SynchronizationSessionService.CloseSession] operation."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """ID of the session."""
    def __init__(
        self,
        *,
        session_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["session_id", b"session_id"]) -> None: ...

global___CloseSessionMetadata = CloseSessionMetadata

@typing.final
class HeartbeatRequest(google.protobuf.message.Message):
    """Request to send a heartbeat for a synchronization session."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """ID of the session."""
    def __init__(
        self,
        *,
        session_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["session_id", b"session_id"]) -> None: ...

global___HeartbeatRequest = HeartbeatRequest

@typing.final
class HeartbeatMetadata(google.protobuf.message.Message):
    """Metadata for the [SynchronizationSessionService.Heartbeat] operation."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SESSION_ID_FIELD_NUMBER: builtins.int
    session_id: builtins.str
    """ID of the session."""
    def __init__(
        self,
        *,
        session_id: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["session_id", b"session_id"]) -> None: ...

global___HeartbeatMetadata = HeartbeatMetadata
