# 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_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2

GRPC_GENERATED_VERSION = '1.67.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/participant/admin/v0/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.Download = channel.unary_stream(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/Download',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.DownloadRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.AcsSnapshotChunk.FromString,
                _registered_method=True)
        self.ExportAcs = channel.unary_stream(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/ExportAcs',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ExportAcsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ExportAcsResponse.FromString,
                _registered_method=True)
        self.Upload = channel.stream_unary(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/Upload',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UploadRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UploadResponse.FromString,
                _registered_method=True)
        self.ImportAcs = channel.stream_unary(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/ImportAcs',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ImportAcsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ImportAcsResponse.FromString,
                _registered_method=True)
        self.PurgeContracts = channel.unary_unary(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/PurgeContracts',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeContractsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeContractsResponse.FromString,
                _registered_method=True)
        self.MigrateDomain = channel.unary_unary(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/MigrateDomain',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.MigrateDomainRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.MigrateDomainResponse.FromString,
                _registered_method=True)
        self.PurgeDeactivatedDomain = channel.unary_unary(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/PurgeDeactivatedDomain',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeDeactivatedDomainRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeDeactivatedDomainResponse.FromString,
                _registered_method=True)
        self.IgnoreEvents = channel.unary_unary(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/IgnoreEvents',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.IgnoreEventsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.IgnoreEventsResponse.FromString,
                _registered_method=True)
        self.UnignoreEvents = channel.unary_unary(
                '/com.digitalasset.canton.participant.admin.v0.ParticipantRepairService/UnignoreEvents',
                request_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UnignoreEventsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UnignoreEventsResponse.FromString,
                _registered_method=True)


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

    def Download(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 ExportAcs(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 Upload(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 MigrateDomain(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 PurgeDeactivatedDomain(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 add_ParticipantRepairServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Download': grpc.unary_stream_rpc_method_handler(
                    servicer.Download,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.DownloadRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.AcsSnapshotChunk.SerializeToString,
            ),
            'ExportAcs': grpc.unary_stream_rpc_method_handler(
                    servicer.ExportAcs,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ExportAcsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ExportAcsResponse.SerializeToString,
            ),
            'Upload': grpc.stream_unary_rpc_method_handler(
                    servicer.Upload,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UploadRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UploadResponse.SerializeToString,
            ),
            'ImportAcs': grpc.stream_unary_rpc_method_handler(
                    servicer.ImportAcs,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ImportAcsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ImportAcsResponse.SerializeToString,
            ),
            'PurgeContracts': grpc.unary_unary_rpc_method_handler(
                    servicer.PurgeContracts,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeContractsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeContractsResponse.SerializeToString,
            ),
            'MigrateDomain': grpc.unary_unary_rpc_method_handler(
                    servicer.MigrateDomain,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.MigrateDomainRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.MigrateDomainResponse.SerializeToString,
            ),
            'PurgeDeactivatedDomain': grpc.unary_unary_rpc_method_handler(
                    servicer.PurgeDeactivatedDomain,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeDeactivatedDomainRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeDeactivatedDomainResponse.SerializeToString,
            ),
            'IgnoreEvents': grpc.unary_unary_rpc_method_handler(
                    servicer.IgnoreEvents,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.IgnoreEventsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.IgnoreEventsResponse.SerializeToString,
            ),
            'UnignoreEvents': grpc.unary_unary_rpc_method_handler(
                    servicer.UnignoreEvents,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UnignoreEventsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UnignoreEventsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'com.digitalasset.canton.participant.admin.v0.ParticipantRepairService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('com.digitalasset.canton.participant.admin.v0.ParticipantRepairService', rpc_method_handlers)


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

    @staticmethod
    def Download(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.participant.admin.v0.ParticipantRepairService/Download',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.DownloadRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.AcsSnapshotChunk.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExportAcs(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.participant.admin.v0.ParticipantRepairService/ExportAcs',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ExportAcsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ExportAcsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Upload(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.participant.admin.v0.ParticipantRepairService/Upload',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UploadRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UploadResponse.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.participant.admin.v0.ParticipantRepairService/ImportAcs',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.ImportAcsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_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.participant.admin.v0.ParticipantRepairService/PurgeContracts',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeContractsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeContractsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def MigrateDomain(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.participant.admin.v0.ParticipantRepairService/MigrateDomain',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.MigrateDomainRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.MigrateDomainResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PurgeDeactivatedDomain(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.participant.admin.v0.ParticipantRepairService/PurgeDeactivatedDomain',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeDeactivatedDomainRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.PurgeDeactivatedDomainResponse.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.participant.admin.v0.ParticipantRepairService/IgnoreEvents',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.IgnoreEventsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_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.participant.admin.v0.ParticipantRepairService/UnignoreEvents',
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UnignoreEventsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_participant_dot_admin_dot_v0_dot_participant__repair__service__pb2.UnignoreEventsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
