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

from union.internal.app import app_payload_pb2 as app_dot_app__payload__pb2


class AppServiceStub(object):
    """AppService defines the service for managing apps.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/cloudidl.app.AppService/Create',
                request_serializer=app_dot_app__payload__pb2.CreateRequest.SerializeToString,
                response_deserializer=app_dot_app__payload__pb2.CreateResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/cloudidl.app.AppService/Get',
                request_serializer=app_dot_app__payload__pb2.GetRequest.SerializeToString,
                response_deserializer=app_dot_app__payload__pb2.GetResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/cloudidl.app.AppService/Update',
                request_serializer=app_dot_app__payload__pb2.UpdateRequest.SerializeToString,
                response_deserializer=app_dot_app__payload__pb2.UpdateResponse.FromString,
                )
        self.UpdateStatus = channel.unary_unary(
                '/cloudidl.app.AppService/UpdateStatus',
                request_serializer=app_dot_app__payload__pb2.UpdateStatusRequest.SerializeToString,
                response_deserializer=app_dot_app__payload__pb2.UpdateStatusResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/cloudidl.app.AppService/Delete',
                request_serializer=app_dot_app__payload__pb2.DeleteRequest.SerializeToString,
                response_deserializer=app_dot_app__payload__pb2.DeleteResponse.FromString,
                )
        self.List = channel.unary_unary(
                '/cloudidl.app.AppService/List',
                request_serializer=app_dot_app__payload__pb2.ListRequest.SerializeToString,
                response_deserializer=app_dot_app__payload__pb2.ListResponse.FromString,
                )
        self.Watch = channel.unary_stream(
                '/cloudidl.app.AppService/Watch',
                request_serializer=app_dot_app__payload__pb2.WatchRequest.SerializeToString,
                response_deserializer=app_dot_app__payload__pb2.WatchResponse.FromString,
                )
        self.Lease = channel.unary_stream(
                '/cloudidl.app.AppService/Lease',
                request_serializer=app_dot_app__payload__pb2.LeaseRequest.SerializeToString,
                response_deserializer=app_dot_app__payload__pb2.LeaseResponse.FromString,
                )


class AppServiceServicer(object):
    """AppService defines the service for managing apps.
    """

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

    def Get(self, request, context):
        """Get retrieves an app by its identifier.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Update updates an existing app.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateStatus(self, request, context):
        """UpdateStatus updates the status of an existing app.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Delete deletes an app by its identifier.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """List lists all apps with optional filtering.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Watch(self, request, context):
        """Watch watches for app events.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Lease(self, request, context):
        """Lease leases apps.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AppServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=app_dot_app__payload__pb2.CreateRequest.FromString,
                    response_serializer=app_dot_app__payload__pb2.CreateResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=app_dot_app__payload__pb2.GetRequest.FromString,
                    response_serializer=app_dot_app__payload__pb2.GetResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=app_dot_app__payload__pb2.UpdateRequest.FromString,
                    response_serializer=app_dot_app__payload__pb2.UpdateResponse.SerializeToString,
            ),
            'UpdateStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateStatus,
                    request_deserializer=app_dot_app__payload__pb2.UpdateStatusRequest.FromString,
                    response_serializer=app_dot_app__payload__pb2.UpdateStatusResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=app_dot_app__payload__pb2.DeleteRequest.FromString,
                    response_serializer=app_dot_app__payload__pb2.DeleteResponse.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=app_dot_app__payload__pb2.ListRequest.FromString,
                    response_serializer=app_dot_app__payload__pb2.ListResponse.SerializeToString,
            ),
            'Watch': grpc.unary_stream_rpc_method_handler(
                    servicer.Watch,
                    request_deserializer=app_dot_app__payload__pb2.WatchRequest.FromString,
                    response_serializer=app_dot_app__payload__pb2.WatchResponse.SerializeToString,
            ),
            'Lease': grpc.unary_stream_rpc_method_handler(
                    servicer.Lease,
                    request_deserializer=app_dot_app__payload__pb2.LeaseRequest.FromString,
                    response_serializer=app_dot_app__payload__pb2.LeaseResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cloudidl.app.AppService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AppService(object):
    """AppService defines the service for managing apps.
    """

    @staticmethod
    def Create(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, '/cloudidl.app.AppService/Create',
            app_dot_app__payload__pb2.CreateRequest.SerializeToString,
            app_dot_app__payload__pb2.CreateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Get(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, '/cloudidl.app.AppService/Get',
            app_dot_app__payload__pb2.GetRequest.SerializeToString,
            app_dot_app__payload__pb2.GetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Update(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, '/cloudidl.app.AppService/Update',
            app_dot_app__payload__pb2.UpdateRequest.SerializeToString,
            app_dot_app__payload__pb2.UpdateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateStatus(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, '/cloudidl.app.AppService/UpdateStatus',
            app_dot_app__payload__pb2.UpdateStatusRequest.SerializeToString,
            app_dot_app__payload__pb2.UpdateStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/cloudidl.app.AppService/Delete',
            app_dot_app__payload__pb2.DeleteRequest.SerializeToString,
            app_dot_app__payload__pb2.DeleteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def List(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, '/cloudidl.app.AppService/List',
            app_dot_app__payload__pb2.ListRequest.SerializeToString,
            app_dot_app__payload__pb2.ListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Watch(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_stream(request, target, '/cloudidl.app.AppService/Watch',
            app_dot_app__payload__pb2.WatchRequest.SerializeToString,
            app_dot_app__payload__pb2.WatchResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Lease(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_stream(request, target, '/cloudidl.app.AppService/Lease',
            app_dot_app__payload__pb2.LeaseRequest.SerializeToString,
            app_dot_app__payload__pb2.LeaseResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
