# Copyright (c) 2017-2026 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_inspection_service_pb2 as com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2

GRPC_GENERATED_VERSION = '1.76.0'
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},'
        + ' but the generated code in com/digitalasset/canton/admin/participant/v30/participant_inspection_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 ParticipantInspectionServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.LookupOffsetByTime = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/LookupOffsetByTime',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupOffsetByTimeRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupOffsetByTimeResponse.FromString,
                _registered_method=True)
        self.OpenCommitment = channel.unary_stream(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/OpenCommitment',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.OpenCommitmentRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.OpenCommitmentResponse.FromString,
                _registered_method=True)
        self.InspectCommitmentContracts = channel.unary_stream(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/InspectCommitmentContracts',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.InspectCommitmentContractsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.InspectCommitmentContractsResponse.FromString,
                _registered_method=True)
        self.LookupSentAcsCommitments = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/LookupSentAcsCommitments',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupSentAcsCommitmentsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupSentAcsCommitmentsResponse.FromString,
                _registered_method=True)
        self.LookupReceivedAcsCommitments = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/LookupReceivedAcsCommitments',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupReceivedAcsCommitmentsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupReceivedAcsCommitmentsResponse.FromString,
                _registered_method=True)
        self.SetConfigForSlowCounterParticipants = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/SetConfigForSlowCounterParticipants',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.SetConfigForSlowCounterParticipantsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.SetConfigForSlowCounterParticipantsResponse.FromString,
                _registered_method=True)
        self.GetConfigForSlowCounterParticipants = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/GetConfigForSlowCounterParticipants',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetConfigForSlowCounterParticipantsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetConfigForSlowCounterParticipantsResponse.FromString,
                _registered_method=True)
        self.GetIntervalsBehindForCounterParticipants = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/GetIntervalsBehindForCounterParticipants',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetIntervalsBehindForCounterParticipantsRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetIntervalsBehindForCounterParticipantsResponse.FromString,
                _registered_method=True)
        self.CountInFlight = channel.unary_unary(
                '/com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService/CountInFlight',
                request_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.CountInFlightRequest.SerializeToString,
                response_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.CountInFlightResponse.FromString,
                _registered_method=True)


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

    def LookupOffsetByTime(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 OpenCommitment(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 InspectCommitmentContracts(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 LookupSentAcsCommitments(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 LookupReceivedAcsCommitments(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 SetConfigForSlowCounterParticipants(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 GetConfigForSlowCounterParticipants(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 GetIntervalsBehindForCounterParticipants(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 CountInFlight(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_ParticipantInspectionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'LookupOffsetByTime': grpc.unary_unary_rpc_method_handler(
                    servicer.LookupOffsetByTime,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupOffsetByTimeRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupOffsetByTimeResponse.SerializeToString,
            ),
            'OpenCommitment': grpc.unary_stream_rpc_method_handler(
                    servicer.OpenCommitment,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.OpenCommitmentRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.OpenCommitmentResponse.SerializeToString,
            ),
            'InspectCommitmentContracts': grpc.unary_stream_rpc_method_handler(
                    servicer.InspectCommitmentContracts,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.InspectCommitmentContractsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.InspectCommitmentContractsResponse.SerializeToString,
            ),
            'LookupSentAcsCommitments': grpc.unary_unary_rpc_method_handler(
                    servicer.LookupSentAcsCommitments,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupSentAcsCommitmentsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupSentAcsCommitmentsResponse.SerializeToString,
            ),
            'LookupReceivedAcsCommitments': grpc.unary_unary_rpc_method_handler(
                    servicer.LookupReceivedAcsCommitments,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupReceivedAcsCommitmentsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupReceivedAcsCommitmentsResponse.SerializeToString,
            ),
            'SetConfigForSlowCounterParticipants': grpc.unary_unary_rpc_method_handler(
                    servicer.SetConfigForSlowCounterParticipants,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.SetConfigForSlowCounterParticipantsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.SetConfigForSlowCounterParticipantsResponse.SerializeToString,
            ),
            'GetConfigForSlowCounterParticipants': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConfigForSlowCounterParticipants,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetConfigForSlowCounterParticipantsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetConfigForSlowCounterParticipantsResponse.SerializeToString,
            ),
            'GetIntervalsBehindForCounterParticipants': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIntervalsBehindForCounterParticipants,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetIntervalsBehindForCounterParticipantsRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetIntervalsBehindForCounterParticipantsResponse.SerializeToString,
            ),
            'CountInFlight': grpc.unary_unary_rpc_method_handler(
                    servicer.CountInFlight,
                    request_deserializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.CountInFlightRequest.FromString,
                    response_serializer=com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.CountInFlightResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('com.digitalasset.canton.admin.participant.v30.ParticipantInspectionService', rpc_method_handlers)


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

    @staticmethod
    def LookupOffsetByTime(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.ParticipantInspectionService/LookupOffsetByTime',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupOffsetByTimeRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupOffsetByTimeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def OpenCommitment(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.ParticipantInspectionService/OpenCommitment',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.OpenCommitmentRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.OpenCommitmentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def InspectCommitmentContracts(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.ParticipantInspectionService/InspectCommitmentContracts',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.InspectCommitmentContractsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.InspectCommitmentContractsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def LookupSentAcsCommitments(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.ParticipantInspectionService/LookupSentAcsCommitments',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupSentAcsCommitmentsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupSentAcsCommitmentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def LookupReceivedAcsCommitments(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.ParticipantInspectionService/LookupReceivedAcsCommitments',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupReceivedAcsCommitmentsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.LookupReceivedAcsCommitmentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetConfigForSlowCounterParticipants(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.ParticipantInspectionService/SetConfigForSlowCounterParticipants',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.SetConfigForSlowCounterParticipantsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.SetConfigForSlowCounterParticipantsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetConfigForSlowCounterParticipants(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.ParticipantInspectionService/GetConfigForSlowCounterParticipants',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetConfigForSlowCounterParticipantsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetConfigForSlowCounterParticipantsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetIntervalsBehindForCounterParticipants(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.ParticipantInspectionService/GetIntervalsBehindForCounterParticipants',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetIntervalsBehindForCounterParticipantsRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.GetIntervalsBehindForCounterParticipantsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CountInFlight(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.ParticipantInspectionService/CountInFlight',
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.CountInFlightRequest.SerializeToString,
            com_dot_digitalasset_dot_canton_dot_admin_dot_participant_dot_v30_dot_participant__inspection__service__pb2.CountInFlightResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
