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

import grpc

from chalk._gen.chalk.aggregate.v1 import service_pb2 as chalk_dot_aggregate_dot_v1_dot_service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.PlanAggregateBackfill = channel.unary_unary(
            "/chalk.aggregate.v1.AggregateService/PlanAggregateBackfill",
            request_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.PlanAggregateBackfillRequest.SerializeToString,
            response_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.PlanAggregateBackfillResponse.FromString,
        )
        self.GetAggregates = channel.unary_unary(
            "/chalk.aggregate.v1.AggregateService/GetAggregates",
            request_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregatesRequest.SerializeToString,
            response_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregatesResponse.FromString,
        )
        self.GetAggregateBackfillJobs = channel.unary_unary(
            "/chalk.aggregate.v1.AggregateService/GetAggregateBackfillJobs",
            request_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobsRequest.SerializeToString,
            response_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobsResponse.FromString,
        )
        self.GetAggregateBackfillJob = channel.unary_unary(
            "/chalk.aggregate.v1.AggregateService/GetAggregateBackfillJob",
            request_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobRequest.SerializeToString,
            response_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobResponse.FromString,
        )
        self.GetCronAggregateBackfill = channel.unary_unary(
            "/chalk.aggregate.v1.AggregateService/GetCronAggregateBackfill",
            request_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetCronAggregateBackfillRequest.SerializeToString,
            response_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetCronAggregateBackfillResponse.FromString,
        )
        self.GetActiveCronAggregateBackfills = channel.unary_unary(
            "/chalk.aggregate.v1.AggregateService/GetActiveCronAggregateBackfills",
            request_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetActiveCronAggregateBackfillsRequest.SerializeToString,
            response_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetActiveCronAggregateBackfillsResponse.FromString,
        )


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

    def PlanAggregateBackfill(self, request, context):
        """PlanAggregateBackfill determines the estimated resources needed to backfill
        an aggregate.

        This method is a duplicate of the PlanAggregateBackfill method
        in the query_server.proto file. We should remove the query_server.proto method
        and move that request to this service instead.
        buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetAggregates(self, request, context):
        """This method is a duplicate of the PlanAggregateBackfill method
        in the query_server.proto file. We should remove the query_server.proto method
        and move that request to this service instead.
        buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetAggregateBackfillJobs(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 GetAggregateBackfillJob(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 GetCronAggregateBackfill(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 GetActiveCronAggregateBackfills(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_AggregateServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "PlanAggregateBackfill": grpc.unary_unary_rpc_method_handler(
            servicer.PlanAggregateBackfill,
            request_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.PlanAggregateBackfillRequest.FromString,
            response_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.PlanAggregateBackfillResponse.SerializeToString,
        ),
        "GetAggregates": grpc.unary_unary_rpc_method_handler(
            servicer.GetAggregates,
            request_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregatesRequest.FromString,
            response_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregatesResponse.SerializeToString,
        ),
        "GetAggregateBackfillJobs": grpc.unary_unary_rpc_method_handler(
            servicer.GetAggregateBackfillJobs,
            request_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobsRequest.FromString,
            response_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobsResponse.SerializeToString,
        ),
        "GetAggregateBackfillJob": grpc.unary_unary_rpc_method_handler(
            servicer.GetAggregateBackfillJob,
            request_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobRequest.FromString,
            response_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobResponse.SerializeToString,
        ),
        "GetCronAggregateBackfill": grpc.unary_unary_rpc_method_handler(
            servicer.GetCronAggregateBackfill,
            request_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetCronAggregateBackfillRequest.FromString,
            response_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetCronAggregateBackfillResponse.SerializeToString,
        ),
        "GetActiveCronAggregateBackfills": grpc.unary_unary_rpc_method_handler(
            servicer.GetActiveCronAggregateBackfills,
            request_deserializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetActiveCronAggregateBackfillsRequest.FromString,
            response_serializer=chalk_dot_aggregate_dot_v1_dot_service__pb2.GetActiveCronAggregateBackfillsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("chalk.aggregate.v1.AggregateService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def PlanAggregateBackfill(
        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,
            "/chalk.aggregate.v1.AggregateService/PlanAggregateBackfill",
            chalk_dot_aggregate_dot_v1_dot_service__pb2.PlanAggregateBackfillRequest.SerializeToString,
            chalk_dot_aggregate_dot_v1_dot_service__pb2.PlanAggregateBackfillResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetAggregates(
        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,
            "/chalk.aggregate.v1.AggregateService/GetAggregates",
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregatesRequest.SerializeToString,
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregatesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetAggregateBackfillJobs(
        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,
            "/chalk.aggregate.v1.AggregateService/GetAggregateBackfillJobs",
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobsRequest.SerializeToString,
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetAggregateBackfillJob(
        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,
            "/chalk.aggregate.v1.AggregateService/GetAggregateBackfillJob",
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobRequest.SerializeToString,
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetAggregateBackfillJobResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetCronAggregateBackfill(
        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,
            "/chalk.aggregate.v1.AggregateService/GetCronAggregateBackfill",
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetCronAggregateBackfillRequest.SerializeToString,
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetCronAggregateBackfillResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetActiveCronAggregateBackfills(
        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,
            "/chalk.aggregate.v1.AggregateService/GetActiveCronAggregateBackfills",
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetActiveCronAggregateBackfillsRequest.SerializeToString,
            chalk_dot_aggregate_dot_v1_dot_service__pb2.GetActiveCronAggregateBackfillsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
