# Copyright (c) 2017-2022 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

from . import metering_report_service_pb2 as com_dot_daml_dot_ledger_dot_api_dot_v1_dot_admin_dot_metering__report__service__pb2


class MeteringReportServiceStub(object):
    """Experimental API to retrieve metering reports.

    Metering reports aim to provide the information necessary for billing participant
    and application operators.

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetMeteringReport = channel.unary_unary(
                '/com.daml.ledger.api.v1.admin.MeteringReportService/GetMeteringReport',
                request_serializer=com_dot_daml_dot_ledger_dot_api_dot_v1_dot_admin_dot_metering__report__service__pb2.GetMeteringReportRequest.SerializeToString,
                response_deserializer=com_dot_daml_dot_ledger_dot_api_dot_v1_dot_admin_dot_metering__report__service__pb2.GetMeteringReportResponse.FromString,
                )


class MeteringReportServiceServicer(object):
    """Experimental API to retrieve metering reports.

    Metering reports aim to provide the information necessary for billing participant
    and application operators.

    """

    def GetMeteringReport(self, request, context):
        """Retrieve a metering report.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MeteringReportServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetMeteringReport': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMeteringReport,
                    request_deserializer=com_dot_daml_dot_ledger_dot_api_dot_v1_dot_admin_dot_metering__report__service__pb2.GetMeteringReportRequest.FromString,
                    response_serializer=com_dot_daml_dot_ledger_dot_api_dot_v1_dot_admin_dot_metering__report__service__pb2.GetMeteringReportResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'com.daml.ledger.api.v1.admin.MeteringReportService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MeteringReportService(object):
    """Experimental API to retrieve metering reports.

    Metering reports aim to provide the information necessary for billing participant
    and application operators.

    """

    @staticmethod
    def GetMeteringReport(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.daml.ledger.api.v1.admin.MeteringReportService/GetMeteringReport',
            com_dot_daml_dot_ledger_dot_api_dot_v1_dot_admin_dot_metering__report__service__pb2.GetMeteringReportRequest.SerializeToString,
            com_dot_daml_dot_ledger_dot_api_dot_v1_dot_admin_dot_metering__report__service__pb2.GetMeteringReportResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
