# 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.server.v1 import deploy_pb2 as chalk_dot_server_dot_v1_dot_deploy__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.DeployBranch = channel.unary_unary(
            "/chalk.server.v1.DeployService/DeployBranch",
            request_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.DeployBranchRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.DeployBranchResponse.FromString,
        )
        self.CreateBranchFromSourceDeployment = channel.unary_unary(
            "/chalk.server.v1.DeployService/CreateBranchFromSourceDeployment",
            request_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.CreateBranchFromSourceDeploymentRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.CreateBranchFromSourceDeploymentResponse.FromString,
        )
        self.GetDeployment = channel.unary_unary(
            "/chalk.server.v1.DeployService/GetDeployment",
            request_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.GetDeploymentRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.GetDeploymentResponse.FromString,
        )
        self.ListDeployments = channel.unary_unary(
            "/chalk.server.v1.DeployService/ListDeployments",
            request_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.ListDeploymentsRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.ListDeploymentsResponse.FromString,
        )
        self.GetActiveDeployments = channel.unary_unary(
            "/chalk.server.v1.DeployService/GetActiveDeployments",
            request_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.GetActiveDeploymentsRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.GetActiveDeploymentsResponse.FromString,
        )
        self.SuspendDeployment = channel.unary_unary(
            "/chalk.server.v1.DeployService/SuspendDeployment",
            request_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.SuspendDeploymentRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.SuspendDeploymentResponse.FromString,
        )
        self.ScaleDeployment = channel.unary_unary(
            "/chalk.server.v1.DeployService/ScaleDeployment",
            request_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.ScaleDeploymentRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.ScaleDeploymentResponse.FromString,
        )
        self.TagDeployment = channel.unary_unary(
            "/chalk.server.v1.DeployService/TagDeployment",
            request_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.TagDeploymentRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.TagDeploymentResponse.FromString,
        )


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

    def DeployBranch(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 CreateBranchFromSourceDeployment(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 GetDeployment(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 ListDeployments(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 GetActiveDeployments(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 SuspendDeployment(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 ScaleDeployment(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 TagDeployment(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_DeployServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "DeployBranch": grpc.unary_unary_rpc_method_handler(
            servicer.DeployBranch,
            request_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.DeployBranchRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.DeployBranchResponse.SerializeToString,
        ),
        "CreateBranchFromSourceDeployment": grpc.unary_unary_rpc_method_handler(
            servicer.CreateBranchFromSourceDeployment,
            request_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.CreateBranchFromSourceDeploymentRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.CreateBranchFromSourceDeploymentResponse.SerializeToString,
        ),
        "GetDeployment": grpc.unary_unary_rpc_method_handler(
            servicer.GetDeployment,
            request_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.GetDeploymentRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.GetDeploymentResponse.SerializeToString,
        ),
        "ListDeployments": grpc.unary_unary_rpc_method_handler(
            servicer.ListDeployments,
            request_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.ListDeploymentsRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.ListDeploymentsResponse.SerializeToString,
        ),
        "GetActiveDeployments": grpc.unary_unary_rpc_method_handler(
            servicer.GetActiveDeployments,
            request_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.GetActiveDeploymentsRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.GetActiveDeploymentsResponse.SerializeToString,
        ),
        "SuspendDeployment": grpc.unary_unary_rpc_method_handler(
            servicer.SuspendDeployment,
            request_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.SuspendDeploymentRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.SuspendDeploymentResponse.SerializeToString,
        ),
        "ScaleDeployment": grpc.unary_unary_rpc_method_handler(
            servicer.ScaleDeployment,
            request_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.ScaleDeploymentRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.ScaleDeploymentResponse.SerializeToString,
        ),
        "TagDeployment": grpc.unary_unary_rpc_method_handler(
            servicer.TagDeployment,
            request_deserializer=chalk_dot_server_dot_v1_dot_deploy__pb2.TagDeploymentRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_deploy__pb2.TagDeploymentResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("chalk.server.v1.DeployService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def DeployBranch(
        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.server.v1.DeployService/DeployBranch",
            chalk_dot_server_dot_v1_dot_deploy__pb2.DeployBranchRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_deploy__pb2.DeployBranchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CreateBranchFromSourceDeployment(
        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.server.v1.DeployService/CreateBranchFromSourceDeployment",
            chalk_dot_server_dot_v1_dot_deploy__pb2.CreateBranchFromSourceDeploymentRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_deploy__pb2.CreateBranchFromSourceDeploymentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetDeployment(
        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.server.v1.DeployService/GetDeployment",
            chalk_dot_server_dot_v1_dot_deploy__pb2.GetDeploymentRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_deploy__pb2.GetDeploymentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ListDeployments(
        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.server.v1.DeployService/ListDeployments",
            chalk_dot_server_dot_v1_dot_deploy__pb2.ListDeploymentsRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_deploy__pb2.ListDeploymentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetActiveDeployments(
        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.server.v1.DeployService/GetActiveDeployments",
            chalk_dot_server_dot_v1_dot_deploy__pb2.GetActiveDeploymentsRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_deploy__pb2.GetActiveDeploymentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def SuspendDeployment(
        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.server.v1.DeployService/SuspendDeployment",
            chalk_dot_server_dot_v1_dot_deploy__pb2.SuspendDeploymentRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_deploy__pb2.SuspendDeploymentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ScaleDeployment(
        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.server.v1.DeployService/ScaleDeployment",
            chalk_dot_server_dot_v1_dot_deploy__pb2.ScaleDeploymentRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_deploy__pb2.ScaleDeploymentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def TagDeployment(
        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.server.v1.DeployService/TagDeployment",
            chalk_dot_server_dot_v1_dot_deploy__pb2.TagDeploymentRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_deploy__pb2.TagDeploymentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
