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

from . import training_pb2 as bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateTrainingJob = channel.unary_unary(
                '/bitdeer.aicloud.training.v1.TrainingService/CreateTrainingJob',
                request_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.CreateTrainingJobRequest.SerializeToString,
                response_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.CreateTrainingJobResponse.FromString,
                _registered_method=True)
        self.GetTrainingJob = channel.unary_unary(
                '/bitdeer.aicloud.training.v1.TrainingService/GetTrainingJob',
                request_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobRequest.SerializeToString,
                response_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobResponse.FromString,
                _registered_method=True)
        self.ListTrainingJobs = channel.unary_unary(
                '/bitdeer.aicloud.training.v1.TrainingService/ListTrainingJobs',
                request_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ListTrainingJobsRequest.SerializeToString,
                response_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ListTrainingJobsResponse.FromString,
                _registered_method=True)
        self.DeleteTrainingJob = channel.unary_unary(
                '/bitdeer.aicloud.training.v1.TrainingService/DeleteTrainingJob',
                request_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.DeleteTrainingJobRequest.SerializeToString,
                response_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.DeleteTrainingJobResponse.FromString,
                _registered_method=True)
        self.ResumeTrainingJob = channel.unary_unary(
                '/bitdeer.aicloud.training.v1.TrainingService/ResumeTrainingJob',
                request_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ResumeTrainingJobRequest.SerializeToString,
                response_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ResumeTrainingJobResponse.FromString,
                _registered_method=True)
        self.SuspendTrainingJob = channel.unary_unary(
                '/bitdeer.aicloud.training.v1.TrainingService/SuspendTrainingJob',
                request_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.SuspendTrainingJobRequest.SerializeToString,
                response_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.SuspendTrainingJobResponse.FromString,
                _registered_method=True)
        self.GetTrainingJobWorkers = channel.unary_unary(
                '/bitdeer.aicloud.training.v1.TrainingService/GetTrainingJobWorkers',
                request_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobWorkersRequest.SerializeToString,
                response_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobWorkersResponse.FromString,
                _registered_method=True)
        self.GetTrainingJobLogs = channel.unary_stream(
                '/bitdeer.aicloud.training.v1.TrainingService/GetTrainingJobLogs',
                request_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobLogsRequest.SerializeToString,
                response_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobLogsResponse.FromString,
                _registered_method=True)


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

    def CreateTrainingJob(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 GetTrainingJob(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 ListTrainingJobs(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 DeleteTrainingJob(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 ResumeTrainingJob(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 SuspendTrainingJob(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 GetTrainingJobWorkers(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 GetTrainingJobLogs(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_TrainingServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateTrainingJob': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateTrainingJob,
                    request_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.CreateTrainingJobRequest.FromString,
                    response_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.CreateTrainingJobResponse.SerializeToString,
            ),
            'GetTrainingJob': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTrainingJob,
                    request_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobRequest.FromString,
                    response_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobResponse.SerializeToString,
            ),
            'ListTrainingJobs': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTrainingJobs,
                    request_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ListTrainingJobsRequest.FromString,
                    response_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ListTrainingJobsResponse.SerializeToString,
            ),
            'DeleteTrainingJob': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteTrainingJob,
                    request_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.DeleteTrainingJobRequest.FromString,
                    response_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.DeleteTrainingJobResponse.SerializeToString,
            ),
            'ResumeTrainingJob': grpc.unary_unary_rpc_method_handler(
                    servicer.ResumeTrainingJob,
                    request_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ResumeTrainingJobRequest.FromString,
                    response_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ResumeTrainingJobResponse.SerializeToString,
            ),
            'SuspendTrainingJob': grpc.unary_unary_rpc_method_handler(
                    servicer.SuspendTrainingJob,
                    request_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.SuspendTrainingJobRequest.FromString,
                    response_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.SuspendTrainingJobResponse.SerializeToString,
            ),
            'GetTrainingJobWorkers': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTrainingJobWorkers,
                    request_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobWorkersRequest.FromString,
                    response_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobWorkersResponse.SerializeToString,
            ),
            'GetTrainingJobLogs': grpc.unary_stream_rpc_method_handler(
                    servicer.GetTrainingJobLogs,
                    request_deserializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobLogsRequest.FromString,
                    response_serializer=bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobLogsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bitdeer.aicloud.training.v1.TrainingService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('bitdeer.aicloud.training.v1.TrainingService', rpc_method_handlers)


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

    @staticmethod
    def CreateTrainingJob(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,
            '/bitdeer.aicloud.training.v1.TrainingService/CreateTrainingJob',
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.CreateTrainingJobRequest.SerializeToString,
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.CreateTrainingJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTrainingJob(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,
            '/bitdeer.aicloud.training.v1.TrainingService/GetTrainingJob',
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobRequest.SerializeToString,
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListTrainingJobs(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,
            '/bitdeer.aicloud.training.v1.TrainingService/ListTrainingJobs',
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ListTrainingJobsRequest.SerializeToString,
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ListTrainingJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteTrainingJob(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,
            '/bitdeer.aicloud.training.v1.TrainingService/DeleteTrainingJob',
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.DeleteTrainingJobRequest.SerializeToString,
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.DeleteTrainingJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResumeTrainingJob(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,
            '/bitdeer.aicloud.training.v1.TrainingService/ResumeTrainingJob',
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ResumeTrainingJobRequest.SerializeToString,
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.ResumeTrainingJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SuspendTrainingJob(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,
            '/bitdeer.aicloud.training.v1.TrainingService/SuspendTrainingJob',
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.SuspendTrainingJobRequest.SerializeToString,
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.SuspendTrainingJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTrainingJobWorkers(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,
            '/bitdeer.aicloud.training.v1.TrainingService/GetTrainingJobWorkers',
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobWorkersRequest.SerializeToString,
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobWorkersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTrainingJobLogs(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,
            '/bitdeer.aicloud.training.v1.TrainingService/GetTrainingJobLogs',
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobLogsRequest.SerializeToString,
            bitdeer_dot_aicloud_dot_training_dot_v1_dot_training__pb2.GetTrainingJobLogsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
