# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings
from macrocosmos.generated.gravity.v1 import gravity_pb2 as gravity_dot_v1_dot_gravity__pb2

GRPC_GENERATED_VERSION = '1.71.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in gravity/v1/gravity_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetGravityTasks = channel.unary_unary(
                '/gravity.v1.GravityService/GetGravityTasks',
                request_serializer=gravity_dot_v1_dot_gravity__pb2.GetGravityTasksRequest.SerializeToString,
                response_deserializer=gravity_dot_v1_dot_gravity__pb2.GetGravityTasksResponse.FromString,
                _registered_method=True)
        self.GetCrawler = channel.unary_unary(
                '/gravity.v1.GravityService/GetCrawler',
                request_serializer=gravity_dot_v1_dot_gravity__pb2.GetCrawlerRequest.SerializeToString,
                response_deserializer=gravity_dot_v1_dot_gravity__pb2.GetCrawlerResponse.FromString,
                _registered_method=True)
        self.CreateGravityTask = channel.unary_unary(
                '/gravity.v1.GravityService/CreateGravityTask',
                request_serializer=gravity_dot_v1_dot_gravity__pb2.CreateGravityTaskRequest.SerializeToString,
                response_deserializer=gravity_dot_v1_dot_gravity__pb2.CreateGravityTaskResponse.FromString,
                _registered_method=True)
        self.BuildDataset = channel.unary_unary(
                '/gravity.v1.GravityService/BuildDataset',
                request_serializer=gravity_dot_v1_dot_gravity__pb2.BuildDatasetRequest.SerializeToString,
                response_deserializer=gravity_dot_v1_dot_gravity__pb2.BuildDatasetResponse.FromString,
                _registered_method=True)
        self.GetDataset = channel.unary_unary(
                '/gravity.v1.GravityService/GetDataset',
                request_serializer=gravity_dot_v1_dot_gravity__pb2.GetDatasetRequest.SerializeToString,
                response_deserializer=gravity_dot_v1_dot_gravity__pb2.GetDatasetResponse.FromString,
                _registered_method=True)
        self.CancelGravityTask = channel.unary_unary(
                '/gravity.v1.GravityService/CancelGravityTask',
                request_serializer=gravity_dot_v1_dot_gravity__pb2.CancelGravityTaskRequest.SerializeToString,
                response_deserializer=gravity_dot_v1_dot_gravity__pb2.CancelGravityTaskResponse.FromString,
                _registered_method=True)
        self.CancelDataset = channel.unary_unary(
                '/gravity.v1.GravityService/CancelDataset',
                request_serializer=gravity_dot_v1_dot_gravity__pb2.CancelDatasetRequest.SerializeToString,
                response_deserializer=gravity_dot_v1_dot_gravity__pb2.CancelDatasetResponse.FromString,
                _registered_method=True)
        self.DatasetBillingCorrection = channel.unary_unary(
                '/gravity.v1.GravityService/DatasetBillingCorrection',
                request_serializer=gravity_dot_v1_dot_gravity__pb2.DatasetBillingCorrectionRequest.SerializeToString,
                response_deserializer=gravity_dot_v1_dot_gravity__pb2.DatasetBillingCorrectionResponse.FromString,
                _registered_method=True)


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

    def GetGravityTasks(self, request, context):
        """Lists all data collection tasks for a user
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCrawler(self, request, context):
        """Get a single crawler by its ID
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateGravityTask(self, request, context):
        """Create a new gravity task
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BuildDataset(self, request, context):
        """Build a dataset for a single crawler
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDataset(self, request, context):
        """Get the dataset build status and results
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CancelGravityTask(self, request, context):
        """Cancel a gravity task and any crawlers associated with it
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CancelDataset(self, request, context):
        """Cancel dataset build if it is in progress and purges the dataset
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DatasetBillingCorrection(self, request, context):
        """Refund user if fewer rows are returned
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_GravityServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetGravityTasks': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGravityTasks,
                    request_deserializer=gravity_dot_v1_dot_gravity__pb2.GetGravityTasksRequest.FromString,
                    response_serializer=gravity_dot_v1_dot_gravity__pb2.GetGravityTasksResponse.SerializeToString,
            ),
            'GetCrawler': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCrawler,
                    request_deserializer=gravity_dot_v1_dot_gravity__pb2.GetCrawlerRequest.FromString,
                    response_serializer=gravity_dot_v1_dot_gravity__pb2.GetCrawlerResponse.SerializeToString,
            ),
            'CreateGravityTask': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateGravityTask,
                    request_deserializer=gravity_dot_v1_dot_gravity__pb2.CreateGravityTaskRequest.FromString,
                    response_serializer=gravity_dot_v1_dot_gravity__pb2.CreateGravityTaskResponse.SerializeToString,
            ),
            'BuildDataset': grpc.unary_unary_rpc_method_handler(
                    servicer.BuildDataset,
                    request_deserializer=gravity_dot_v1_dot_gravity__pb2.BuildDatasetRequest.FromString,
                    response_serializer=gravity_dot_v1_dot_gravity__pb2.BuildDatasetResponse.SerializeToString,
            ),
            'GetDataset': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDataset,
                    request_deserializer=gravity_dot_v1_dot_gravity__pb2.GetDatasetRequest.FromString,
                    response_serializer=gravity_dot_v1_dot_gravity__pb2.GetDatasetResponse.SerializeToString,
            ),
            'CancelGravityTask': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelGravityTask,
                    request_deserializer=gravity_dot_v1_dot_gravity__pb2.CancelGravityTaskRequest.FromString,
                    response_serializer=gravity_dot_v1_dot_gravity__pb2.CancelGravityTaskResponse.SerializeToString,
            ),
            'CancelDataset': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelDataset,
                    request_deserializer=gravity_dot_v1_dot_gravity__pb2.CancelDatasetRequest.FromString,
                    response_serializer=gravity_dot_v1_dot_gravity__pb2.CancelDatasetResponse.SerializeToString,
            ),
            'DatasetBillingCorrection': grpc.unary_unary_rpc_method_handler(
                    servicer.DatasetBillingCorrection,
                    request_deserializer=gravity_dot_v1_dot_gravity__pb2.DatasetBillingCorrectionRequest.FromString,
                    response_serializer=gravity_dot_v1_dot_gravity__pb2.DatasetBillingCorrectionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'gravity.v1.GravityService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('gravity.v1.GravityService', rpc_method_handlers)


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

    @staticmethod
    def GetGravityTasks(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,
            '/gravity.v1.GravityService/GetGravityTasks',
            gravity_dot_v1_dot_gravity__pb2.GetGravityTasksRequest.SerializeToString,
            gravity_dot_v1_dot_gravity__pb2.GetGravityTasksResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetCrawler(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,
            '/gravity.v1.GravityService/GetCrawler',
            gravity_dot_v1_dot_gravity__pb2.GetCrawlerRequest.SerializeToString,
            gravity_dot_v1_dot_gravity__pb2.GetCrawlerResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateGravityTask(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,
            '/gravity.v1.GravityService/CreateGravityTask',
            gravity_dot_v1_dot_gravity__pb2.CreateGravityTaskRequest.SerializeToString,
            gravity_dot_v1_dot_gravity__pb2.CreateGravityTaskResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BuildDataset(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,
            '/gravity.v1.GravityService/BuildDataset',
            gravity_dot_v1_dot_gravity__pb2.BuildDatasetRequest.SerializeToString,
            gravity_dot_v1_dot_gravity__pb2.BuildDatasetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetDataset(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,
            '/gravity.v1.GravityService/GetDataset',
            gravity_dot_v1_dot_gravity__pb2.GetDatasetRequest.SerializeToString,
            gravity_dot_v1_dot_gravity__pb2.GetDatasetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelGravityTask(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,
            '/gravity.v1.GravityService/CancelGravityTask',
            gravity_dot_v1_dot_gravity__pb2.CancelGravityTaskRequest.SerializeToString,
            gravity_dot_v1_dot_gravity__pb2.CancelGravityTaskResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelDataset(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,
            '/gravity.v1.GravityService/CancelDataset',
            gravity_dot_v1_dot_gravity__pb2.CancelDatasetRequest.SerializeToString,
            gravity_dot_v1_dot_gravity__pb2.CancelDatasetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DatasetBillingCorrection(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,
            '/gravity.v1.GravityService/DatasetBillingCorrection',
            gravity_dot_v1_dot_gravity__pb2.DatasetBillingCorrectionRequest.SerializeToString,
            gravity_dot_v1_dot_gravity__pb2.DatasetBillingCorrectionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
