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

from akash.proto.akash.provider.v1 import status_pb2 as akash_dot_provider_dot_v1_dot_status__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class ProviderRPCStub(object):
    """ProviderRPC defines the RPC server for provider
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetStatus = channel.unary_unary(
                '/akash.provider.v1.ProviderRPC/GetStatus',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=akash_dot_provider_dot_v1_dot_status__pb2.Status.FromString,
                )
        self.StreamStatus = channel.unary_stream(
                '/akash.provider.v1.ProviderRPC/StreamStatus',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=akash_dot_provider_dot_v1_dot_status__pb2.Status.FromString,
                )


class ProviderRPCServicer(object):
    """ProviderRPC defines the RPC server for provider
    """

    def GetStatus(self, request, context):
        """GetStatus defines a method to query provider state
        buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
        buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamStatus(self, request, context):
        """Status defines a method to stream provider state
        buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
        buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ProviderRPCServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStatus,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=akash_dot_provider_dot_v1_dot_status__pb2.Status.SerializeToString,
            ),
            'StreamStatus': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamStatus,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=akash_dot_provider_dot_v1_dot_status__pb2.Status.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'akash.provider.v1.ProviderRPC', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ProviderRPC(object):
    """ProviderRPC defines the RPC server for provider
    """

    @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, '/akash.provider.v1.ProviderRPC/GetStatus',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            akash_dot_provider_dot_v1_dot_status__pb2.Status.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamStatus(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, '/akash.provider.v1.ProviderRPC/StreamStatus',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            akash_dot_provider_dot_v1_dot_status__pb2.Status.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
