# Copyright (c) 2017-2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# fmt: off
# isort: skip_file
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from . import participant_repair_service_pb2 as com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2

GRPC_GENERATED_VERSION = '1.72.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in com/digitalasset/canton/admin/participant/v30/participant_repair_service_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class ParticipantRepairServiceStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.ExportAcsOld = channel.unary_stream(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/ExportAcsOld',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ExportAcsOldRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ExportAcsOldResponse.FromString,
                _registered_method=True)
        self.ImportAcsOld = channel.stream_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/ImportAcsOld',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsOldRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsOldResponse.FromString,
                _registered_method=True)
        self.ImportAcs = channel.stream_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/ImportAcs',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsResponse.FromString,
                _registered_method=True)
        self.PurgeContracts = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/PurgeContracts',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeContractsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeContractsResponse.FromString,
                _registered_method=True)
        self.MigrateSynchronizer = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/MigrateSynchronizer',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.MigrateSynchronizerRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.MigrateSynchronizerResponse.FromString,
                _registered_method=True)
        self.ChangeAssignation = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/ChangeAssignation',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ChangeAssignationRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ChangeAssignationResponse.FromString,
                _registered_method=True)
        self.PurgeDeactivatedSynchronizer = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/PurgeDeactivatedSynchronizer',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeDeactivatedSynchronizerRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeDeactivatedSynchronizerResponse.FromString,
                _registered_method=True)
        self.IgnoreEvents = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/IgnoreEvents',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.IgnoreEventsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.IgnoreEventsResponse.FromString,
                _registered_method=True)
        self.UnignoreEvents = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/UnignoreEvents',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.UnignoreEventsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.UnignoreEventsResponse.FromString,
                _registered_method=True)
        self.RollbackUnassignment = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/RollbackUnassignment',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.RollbackUnassignmentRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.RollbackUnassignmentResponse.FromString,
                _registered_method=True)


class ParticipantRepairServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def ExportAcsOld(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ImportAcsOld(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ImportAcs(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PurgeContracts(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MigrateSynchronizer(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ChangeAssignation(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PurgeDeactivatedSynchronizer(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IgnoreEvents(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UnignoreEvents(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RollbackUnassignment(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ParticipantRepairServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ExportAcsOld': grpc.unary_stream_rpc_method_handler(
                    servicer.ExportAcsOld,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ExportAcsOldRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ExportAcsOldResponse.SerializeToString,
            ),
            'ImportAcsOld': grpc.stream_unary_rpc_method_handler(
                    servicer.ImportAcsOld,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsOldRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsOldResponse.SerializeToString,
            ),
            'ImportAcs': grpc.stream_unary_rpc_method_handler(
                    servicer.ImportAcs,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsResponse.SerializeToString,
            ),
            'PurgeContracts': grpc.unary_unary_rpc_method_handler(
                    servicer.PurgeContracts,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeContractsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeContractsResponse.SerializeToString,
            ),
            'MigrateSynchronizer': grpc.unary_unary_rpc_method_handler(
                    servicer.MigrateSynchronizer,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.MigrateSynchronizerRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.MigrateSynchronizerResponse.SerializeToString,
            ),
            'ChangeAssignation': grpc.unary_unary_rpc_method_handler(
                    servicer.ChangeAssignation,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ChangeAssignationRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ChangeAssignationResponse.SerializeToString,
            ),
            'PurgeDeactivatedSynchronizer': grpc.unary_unary_rpc_method_handler(
                    servicer.PurgeDeactivatedSynchronizer,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeDeactivatedSynchronizerRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeDeactivatedSynchronizerResponse.SerializeToString,
            ),
            'IgnoreEvents': grpc.unary_unary_rpc_method_handler(
                    servicer.IgnoreEvents,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.IgnoreEventsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.IgnoreEventsResponse.SerializeToString,
            ),
            'UnignoreEvents': grpc.unary_unary_rpc_method_handler(
                    servicer.UnignoreEvents,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.UnignoreEventsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.UnignoreEventsResponse.SerializeToString,
            ),
            'RollbackUnassignment': grpc.unary_unary_rpc_method_handler(
                    servicer.RollbackUnassignment,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.RollbackUnassignmentRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.RollbackUnassignmentResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'com.digitalasset.canton.admin.participant.v30.ParticipantRepairService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('com.digitalasset.canton.admin.participant.v30.ParticipantRepairService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class ParticipantRepairService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def ExportAcsOld(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(
            request,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/ExportAcsOld',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ExportAcsOldRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ExportAcsOldResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ImportAcsOld(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(
            request_iterator,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/ImportAcsOld',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsOldRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsOldResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ImportAcs(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(
            request_iterator,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/ImportAcs',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ImportAcsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PurgeContracts(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/PurgeContracts',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeContractsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeContractsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def MigrateSynchronizer(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/MigrateSynchronizer',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.MigrateSynchronizerRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.MigrateSynchronizerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ChangeAssignation(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/ChangeAssignation',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ChangeAssignationRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.ChangeAssignationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PurgeDeactivatedSynchronizer(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/PurgeDeactivatedSynchronizer',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeDeactivatedSynchronizerRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.PurgeDeactivatedSynchronizerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IgnoreEvents(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/IgnoreEvents',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.IgnoreEventsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.IgnoreEventsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UnignoreEvents(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/UnignoreEvents',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.UnignoreEventsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.UnignoreEventsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RollbackUnassignment(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/com.digitalasset.canton.admin.participant.v30.ParticipantRepairService/RollbackUnassignment',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.RollbackUnassignmentRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__repair__service__pb2.RollbackUnassignmentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
