# 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 webhook_pb2 as chalk_dot_server_dot_v1_dot_webhook__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateWebhook = channel.unary_unary(
            "/chalk.server.v1.WebhookService/CreateWebhook",
            request_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.CreateWebhookRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.CreateWebhookResponse.FromString,
        )
        self.UpdateWebhook = channel.unary_unary(
            "/chalk.server.v1.WebhookService/UpdateWebhook",
            request_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.UpdateWebhookRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.UpdateWebhookResponse.FromString,
        )
        self.DeleteWebhook = channel.unary_unary(
            "/chalk.server.v1.WebhookService/DeleteWebhook",
            request_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.DeleteWebhookRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.DeleteWebhookResponse.FromString,
        )
        self.GetWebhook = channel.unary_unary(
            "/chalk.server.v1.WebhookService/GetWebhook",
            request_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.GetWebhookRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.GetWebhookResponse.FromString,
        )
        self.ListWebhooks = channel.unary_unary(
            "/chalk.server.v1.WebhookService/ListWebhooks",
            request_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.ListWebhooksRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.ListWebhooksResponse.FromString,
        )


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

    def CreateWebhook(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 UpdateWebhook(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 DeleteWebhook(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 GetWebhook(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 ListWebhooks(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_WebhookServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CreateWebhook": grpc.unary_unary_rpc_method_handler(
            servicer.CreateWebhook,
            request_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.CreateWebhookRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.CreateWebhookResponse.SerializeToString,
        ),
        "UpdateWebhook": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateWebhook,
            request_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.UpdateWebhookRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.UpdateWebhookResponse.SerializeToString,
        ),
        "DeleteWebhook": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteWebhook,
            request_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.DeleteWebhookRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.DeleteWebhookResponse.SerializeToString,
        ),
        "GetWebhook": grpc.unary_unary_rpc_method_handler(
            servicer.GetWebhook,
            request_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.GetWebhookRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.GetWebhookResponse.SerializeToString,
        ),
        "ListWebhooks": grpc.unary_unary_rpc_method_handler(
            servicer.ListWebhooks,
            request_deserializer=chalk_dot_server_dot_v1_dot_webhook__pb2.ListWebhooksRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_webhook__pb2.ListWebhooksResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("chalk.server.v1.WebhookService", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateWebhook(
        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.WebhookService/CreateWebhook",
            chalk_dot_server_dot_v1_dot_webhook__pb2.CreateWebhookRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_webhook__pb2.CreateWebhookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdateWebhook(
        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.WebhookService/UpdateWebhook",
            chalk_dot_server_dot_v1_dot_webhook__pb2.UpdateWebhookRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_webhook__pb2.UpdateWebhookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def DeleteWebhook(
        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.WebhookService/DeleteWebhook",
            chalk_dot_server_dot_v1_dot_webhook__pb2.DeleteWebhookRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_webhook__pb2.DeleteWebhookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetWebhook(
        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.WebhookService/GetWebhook",
            chalk_dot_server_dot_v1_dot_webhook__pb2.GetWebhookRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_webhook__pb2.GetWebhookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ListWebhooks(
        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.WebhookService/ListWebhooks",
            chalk_dot_server_dot_v1_dot_webhook__pb2.ListWebhooksRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_webhook__pb2.ListWebhooksResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
