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

from yandex.cloud.ai.dataset.v1 import dataset_service_pb2 as yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class DatasetServiceStub(object):
    """A set of methods for managing datasets.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Describe = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/Describe',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DescribeDatasetRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DescribeDatasetResponse.FromString,
                )
        self.Validate = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/Validate',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ValidateDatasetRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Create = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/Create',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.CreateDatasetRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.CreateDatasetResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/Update',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.UpdateDatasetRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.UpdateDatasetResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/Delete',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DeleteDatasetRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DeleteDatasetResponse.FromString,
                )
        self.List = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/List',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListDatasetsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListDatasetsResponse.FromString,
                )
        self.ListUploadFormats = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/ListUploadFormats',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListUploadFormatsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListUploadFormatsResponse.FromString,
                )
        self.GetUploadDraftUrl = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/GetUploadDraftUrl',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.GetUploadDraftUrlRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.GetUploadDraftUrlResponse.FromString,
                )
        self.StartMultipartUploadDraft = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/StartMultipartUploadDraft',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.StartMultipartUploadDraftRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.StartMultipartUploadDraftResponse.FromString,
                )
        self.FinishMultipartUploadDraft = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/FinishMultipartUploadDraft',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.FinishMultipartUploadDraftRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.FinishMultipartUploadDraftResponse.FromString,
                )
        self.ListTypes = channel.unary_unary(
                '/yandex.cloud.ai.dataset.v1.DatasetService/ListTypes',
                request_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListTypesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListTypesResponse.FromString,
                )


class DatasetServiceServicer(object):
    """A set of methods for managing datasets.
    """

    def Describe(self, request, context):
        """Returns dataset information by dataset id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Validate(self, request, context):
        """Starts dataset validation process.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Create(self, request, context):
        """Creates dataset.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Updates dataset.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Deletes dataset.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Lists datasets in specified folder.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListUploadFormats(self, request, context):
        """Lists supported upload formats for the specified dataset task type.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUploadDraftUrl(self, request, context):
        """Returns an S3 presigned URL for dataset upload.
        This method only applicable if the dataset size does not exceed 5GB.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StartMultipartUploadDraft(self, request, context):
        """Returns a list of S3 presigned URLs for multipart upload of dataset.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def FinishMultipartUploadDraft(self, request, context):
        """Finishes multipart upload of the dataset.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListTypes(self, request, context):
        """Returns a list of dataset types
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DatasetServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Describe': grpc.unary_unary_rpc_method_handler(
                    servicer.Describe,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DescribeDatasetRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DescribeDatasetResponse.SerializeToString,
            ),
            'Validate': grpc.unary_unary_rpc_method_handler(
                    servicer.Validate,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ValidateDatasetRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.CreateDatasetRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.CreateDatasetResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.UpdateDatasetRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.UpdateDatasetResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DeleteDatasetRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DeleteDatasetResponse.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListDatasetsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListDatasetsResponse.SerializeToString,
            ),
            'ListUploadFormats': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUploadFormats,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListUploadFormatsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListUploadFormatsResponse.SerializeToString,
            ),
            'GetUploadDraftUrl': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUploadDraftUrl,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.GetUploadDraftUrlRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.GetUploadDraftUrlResponse.SerializeToString,
            ),
            'StartMultipartUploadDraft': grpc.unary_unary_rpc_method_handler(
                    servicer.StartMultipartUploadDraft,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.StartMultipartUploadDraftRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.StartMultipartUploadDraftResponse.SerializeToString,
            ),
            'FinishMultipartUploadDraft': grpc.unary_unary_rpc_method_handler(
                    servicer.FinishMultipartUploadDraft,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.FinishMultipartUploadDraftRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.FinishMultipartUploadDraftResponse.SerializeToString,
            ),
            'ListTypes': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTypes,
                    request_deserializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListTypesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListTypesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.ai.dataset.v1.DatasetService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class DatasetService(object):
    """A set of methods for managing datasets.
    """

    @staticmethod
    def Describe(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, '/yandex.cloud.ai.dataset.v1.DatasetService/Describe',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DescribeDatasetRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DescribeDatasetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Validate(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, '/yandex.cloud.ai.dataset.v1.DatasetService/Validate',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ValidateDatasetRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Create(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, '/yandex.cloud.ai.dataset.v1.DatasetService/Create',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.CreateDatasetRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.CreateDatasetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Update(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, '/yandex.cloud.ai.dataset.v1.DatasetService/Update',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.UpdateDatasetRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.UpdateDatasetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/yandex.cloud.ai.dataset.v1.DatasetService/Delete',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DeleteDatasetRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.DeleteDatasetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def List(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, '/yandex.cloud.ai.dataset.v1.DatasetService/List',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListDatasetsRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListDatasetsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListUploadFormats(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, '/yandex.cloud.ai.dataset.v1.DatasetService/ListUploadFormats',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListUploadFormatsRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListUploadFormatsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUploadDraftUrl(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, '/yandex.cloud.ai.dataset.v1.DatasetService/GetUploadDraftUrl',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.GetUploadDraftUrlRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.GetUploadDraftUrlResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StartMultipartUploadDraft(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, '/yandex.cloud.ai.dataset.v1.DatasetService/StartMultipartUploadDraft',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.StartMultipartUploadDraftRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.StartMultipartUploadDraftResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FinishMultipartUploadDraft(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, '/yandex.cloud.ai.dataset.v1.DatasetService/FinishMultipartUploadDraft',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.FinishMultipartUploadDraftRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.FinishMultipartUploadDraftResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListTypes(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, '/yandex.cloud.ai.dataset.v1.DatasetService/ListTypes',
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListTypesRequest.SerializeToString,
            yandex_dot_cloud_dot_ai_dot_dataset_dot_v1_dot_dataset__service__pb2.ListTypesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
