# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from meshtrade.reporting.account_report.v1 import account_report_pb2 as meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2
from meshtrade.reporting.account_report.v1 import service_pb2 as meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2


class AccountReportServiceStub(object):
    """
    The AccountReportService provides endpoints for generating and exporting
    comprehensive account activity reports.

    Clients can use this service to retrieve structured reports containing income,
    fees, and trading statements for a specified account and time period. All
    financial values within the reports are denominated in a user-specified
    reporting currency.

    Access to all service methods requires appropriate Reporting domain permissions.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAccountReport = channel.unary_unary(
                '/meshtrade.reporting.account_report.v1.AccountReportService/GetAccountReport',
                request_serializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetAccountReportRequest.SerializeToString,
                response_deserializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2.AccountReport.FromString,
                _registered_method=True)
        self.GetExcelAccountReport = channel.unary_unary(
                '/meshtrade.reporting.account_report.v1.AccountReportService/GetExcelAccountReport',
                request_serializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportRequest.SerializeToString,
                response_deserializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportResponse.FromString,
                _registered_method=True)


class AccountReportServiceServicer(object):
    """
    The AccountReportService provides endpoints for generating and exporting
    comprehensive account activity reports.

    Clients can use this service to retrieve structured reports containing income,
    fees, and trading statements for a specified account and time period. All
    financial values within the reports are denominated in a user-specified
    reporting currency.

    Access to all service methods requires appropriate Reporting domain permissions.
    """

    def GetAccountReport(self, request, context):
        """
        Retrieves a structured account report.

        Generates a detailed report for the given account and time range, with all
        values denominated in the specified reporting asset token.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetExcelAccountReport(self, request, context):
        """
        Exports an account report as a downloadable Excel file.

        Generates the same report as GetAccountReport but returns it as a
        base64-encoded string representing an Excel (.xlsx) file.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AccountReportServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAccountReport': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountReport,
                    request_deserializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetAccountReportRequest.FromString,
                    response_serializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2.AccountReport.SerializeToString,
            ),
            'GetExcelAccountReport': grpc.unary_unary_rpc_method_handler(
                    servicer.GetExcelAccountReport,
                    request_deserializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportRequest.FromString,
                    response_serializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'meshtrade.reporting.account_report.v1.AccountReportService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('meshtrade.reporting.account_report.v1.AccountReportService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AccountReportService(object):
    """
    The AccountReportService provides endpoints for generating and exporting
    comprehensive account activity reports.

    Clients can use this service to retrieve structured reports containing income,
    fees, and trading statements for a specified account and time period. All
    financial values within the reports are denominated in a user-specified
    reporting currency.

    Access to all service methods requires appropriate Reporting domain permissions.
    """

    @staticmethod
    def GetAccountReport(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,
            '/meshtrade.reporting.account_report.v1.AccountReportService/GetAccountReport',
            meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetAccountReportRequest.SerializeToString,
            meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2.AccountReport.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetExcelAccountReport(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,
            '/meshtrade.reporting.account_report.v1.AccountReportService/GetExcelAccountReport',
            meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportRequest.SerializeToString,
            meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
