# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from kaistack.clients.grpcclient import pipelinecomponentapis_pb2 as pipelinecomponentapis__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListComponents = channel.unary_unary(
                '/codegen.PipelineComponentService/ListComponents',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=pipelinecomponentapis__pb2.ListComponentsResponse.FromString,
                )
        self.GetComponents = channel.unary_unary(
                '/codegen.PipelineComponentService/GetComponents',
                request_serializer=pipelinecomponentapis__pb2.GetComponentRequest.SerializeToString,
                response_deserializer=pipelinecomponentapis__pb2.GetComponentResponse.FromString,
                )
        self.CreateComponent = channel.unary_unary(
                '/codegen.PipelineComponentService/CreateComponent',
                request_serializer=pipelinecomponentapis__pb2.CreateComponentRequest.SerializeToString,
                response_deserializer=pipelinecomponentapis__pb2.CreateComponentResponse.FromString,
                )
        self.UpdateComponent = channel.unary_unary(
                '/codegen.PipelineComponentService/UpdateComponent',
                request_serializer=pipelinecomponentapis__pb2.UpdateComponentRequest.SerializeToString,
                response_deserializer=pipelinecomponentapis__pb2.UpdateComponentResponse.FromString,
                )
        self.ListComponentVersions = channel.unary_unary(
                '/codegen.PipelineComponentService/ListComponentVersions',
                request_serializer=pipelinecomponentapis__pb2.ListComponentVersionsRequest.SerializeToString,
                response_deserializer=pipelinecomponentapis__pb2.ListComponentVersionsResponse.FromString,
                )
        self.DeleteComponent = channel.unary_unary(
                '/codegen.PipelineComponentService/DeleteComponent',
                request_serializer=pipelinecomponentapis__pb2.DeleteComponentRequest.SerializeToString,
                response_deserializer=pipelinecomponentapis__pb2.DeleteComponentResponse.FromString,
                )


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

    def ListComponents(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 GetComponents(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 CreateComponent(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 UpdateComponent(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 ListComponentVersions(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 DeleteComponent(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_PipelineComponentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListComponents': grpc.unary_unary_rpc_method_handler(
                    servicer.ListComponents,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=pipelinecomponentapis__pb2.ListComponentsResponse.SerializeToString,
            ),
            'GetComponents': grpc.unary_unary_rpc_method_handler(
                    servicer.GetComponents,
                    request_deserializer=pipelinecomponentapis__pb2.GetComponentRequest.FromString,
                    response_serializer=pipelinecomponentapis__pb2.GetComponentResponse.SerializeToString,
            ),
            'CreateComponent': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateComponent,
                    request_deserializer=pipelinecomponentapis__pb2.CreateComponentRequest.FromString,
                    response_serializer=pipelinecomponentapis__pb2.CreateComponentResponse.SerializeToString,
            ),
            'UpdateComponent': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateComponent,
                    request_deserializer=pipelinecomponentapis__pb2.UpdateComponentRequest.FromString,
                    response_serializer=pipelinecomponentapis__pb2.UpdateComponentResponse.SerializeToString,
            ),
            'ListComponentVersions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListComponentVersions,
                    request_deserializer=pipelinecomponentapis__pb2.ListComponentVersionsRequest.FromString,
                    response_serializer=pipelinecomponentapis__pb2.ListComponentVersionsResponse.SerializeToString,
            ),
            'DeleteComponent': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteComponent,
                    request_deserializer=pipelinecomponentapis__pb2.DeleteComponentRequest.FromString,
                    response_serializer=pipelinecomponentapis__pb2.DeleteComponentResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'codegen.PipelineComponentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListComponents(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/codegen.PipelineComponentService/ListComponents',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            pipelinecomponentapis__pb2.ListComponentsResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetComponents(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/codegen.PipelineComponentService/GetComponents',
            pipelinecomponentapis__pb2.GetComponentRequest.SerializeToString,
            pipelinecomponentapis__pb2.GetComponentResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateComponent(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/codegen.PipelineComponentService/CreateComponent',
            pipelinecomponentapis__pb2.CreateComponentRequest.SerializeToString,
            pipelinecomponentapis__pb2.CreateComponentResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateComponent(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/codegen.PipelineComponentService/UpdateComponent',
            pipelinecomponentapis__pb2.UpdateComponentRequest.SerializeToString,
            pipelinecomponentapis__pb2.UpdateComponentResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListComponentVersions(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/codegen.PipelineComponentService/ListComponentVersions',
            pipelinecomponentapis__pb2.ListComponentVersionsRequest.SerializeToString,
            pipelinecomponentapis__pb2.ListComponentVersionsResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteComponent(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/codegen.PipelineComponentService/DeleteComponent',
            pipelinecomponentapis__pb2.DeleteComponentRequest.SerializeToString,
            pipelinecomponentapis__pb2.DeleteComponentResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
