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

import onexdataflowapi_pb2 as onexdataflowapi__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetConfig = channel.unary_unary(
                '/onexdataflowapi.Openapi/SetConfig',
                request_serializer=onexdataflowapi__pb2.SetConfigRequest.SerializeToString,
                response_deserializer=onexdataflowapi__pb2.SetConfigResponse.FromString,
                )
        self.GetConfig = channel.unary_unary(
                '/onexdataflowapi.Openapi/GetConfig',
                request_serializer=onexdataflowapi__pb2.GetConfigRequest.SerializeToString,
                response_deserializer=onexdataflowapi__pb2.GetConfigResponse.FromString,
                )
        self.RunExperiment = channel.unary_unary(
                '/onexdataflowapi.Openapi/RunExperiment',
                request_serializer=onexdataflowapi__pb2.RunExperimentRequest.SerializeToString,
                response_deserializer=onexdataflowapi__pb2.RunExperimentResponse.FromString,
                )
        self.Start = channel.unary_unary(
                '/onexdataflowapi.Openapi/Start',
                request_serializer=onexdataflowapi__pb2.StartRequest.SerializeToString,
                response_deserializer=onexdataflowapi__pb2.StartResponse.FromString,
                )
        self.GetStatus = channel.unary_unary(
                '/onexdataflowapi.Openapi/GetStatus',
                request_serializer=onexdataflowapi__pb2.GetStatusRequest.SerializeToString,
                response_deserializer=onexdataflowapi__pb2.GetStatusResponse.FromString,
                )
        self.GetMetrics = channel.unary_unary(
                '/onexdataflowapi.Openapi/GetMetrics',
                request_serializer=onexdataflowapi__pb2.GetMetricsRequest.SerializeToString,
                response_deserializer=onexdataflowapi__pb2.GetMetricsResponse.FromString,
                )


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

    def SetConfig(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 GetConfig(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 RunExperiment(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 Start(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 GetStatus(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 GetMetrics(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_OpenapiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.SetConfig,
                    request_deserializer=onexdataflowapi__pb2.SetConfigRequest.FromString,
                    response_serializer=onexdataflowapi__pb2.SetConfigResponse.SerializeToString,
            ),
            'GetConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.GetConfig,
                    request_deserializer=onexdataflowapi__pb2.GetConfigRequest.FromString,
                    response_serializer=onexdataflowapi__pb2.GetConfigResponse.SerializeToString,
            ),
            'RunExperiment': grpc.unary_unary_rpc_method_handler(
                    servicer.RunExperiment,
                    request_deserializer=onexdataflowapi__pb2.RunExperimentRequest.FromString,
                    response_serializer=onexdataflowapi__pb2.RunExperimentResponse.SerializeToString,
            ),
            'Start': grpc.unary_unary_rpc_method_handler(
                    servicer.Start,
                    request_deserializer=onexdataflowapi__pb2.StartRequest.FromString,
                    response_serializer=onexdataflowapi__pb2.StartResponse.SerializeToString,
            ),
            'GetStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStatus,
                    request_deserializer=onexdataflowapi__pb2.GetStatusRequest.FromString,
                    response_serializer=onexdataflowapi__pb2.GetStatusResponse.SerializeToString,
            ),
            'GetMetrics': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMetrics,
                    request_deserializer=onexdataflowapi__pb2.GetMetricsRequest.FromString,
                    response_serializer=onexdataflowapi__pb2.GetMetricsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'onexdataflowapi.Openapi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def SetConfig(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, '/onexdataflowapi.Openapi/SetConfig',
            onexdataflowapi__pb2.SetConfigRequest.SerializeToString,
            onexdataflowapi__pb2.SetConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetConfig(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, '/onexdataflowapi.Openapi/GetConfig',
            onexdataflowapi__pb2.GetConfigRequest.SerializeToString,
            onexdataflowapi__pb2.GetConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RunExperiment(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, '/onexdataflowapi.Openapi/RunExperiment',
            onexdataflowapi__pb2.RunExperimentRequest.SerializeToString,
            onexdataflowapi__pb2.RunExperimentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Start(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, '/onexdataflowapi.Openapi/Start',
            onexdataflowapi__pb2.StartRequest.SerializeToString,
            onexdataflowapi__pb2.StartResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetStatus(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, '/onexdataflowapi.Openapi/GetStatus',
            onexdataflowapi__pb2.GetStatusRequest.SerializeToString,
            onexdataflowapi__pb2.GetStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMetrics(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, '/onexdataflowapi.Openapi/GetMetrics',
            onexdataflowapi__pb2.GetMetricsRequest.SerializeToString,
            onexdataflowapi__pb2.GetMetricsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
