# 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.identity import app_payload_pb2 as identity_dot_app__payload__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/cloudidl.identity.AppsService/Create',
                request_serializer=identity_dot_app__payload__pb2.CreateAppRequest.SerializeToString,
                response_deserializer=identity_dot_app__payload__pb2.CreateAppResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/cloudidl.identity.AppsService/Get',
                request_serializer=identity_dot_app__payload__pb2.GetAppRequest.SerializeToString,
                response_deserializer=identity_dot_app__payload__pb2.GetAppResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/cloudidl.identity.AppsService/Update',
                request_serializer=identity_dot_app__payload__pb2.UpdateAppRequest.SerializeToString,
                response_deserializer=identity_dot_app__payload__pb2.UpdateAppResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/cloudidl.identity.AppsService/Delete',
                request_serializer=identity_dot_app__payload__pb2.DeleteAppRequest.SerializeToString,
                response_deserializer=identity_dot_app__payload__pb2.DeleteAppResponse.FromString,
                )
        self.List = channel.unary_unary(
                '/cloudidl.identity.AppsService/List',
                request_serializer=identity_dot_app__payload__pb2.ListAppsRequest.SerializeToString,
                response_deserializer=identity_dot_app__payload__pb2.ListAppsResponse.FromString,
                )


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

    def Create(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 Get(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 Update(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 Delete(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 List(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_AppsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=identity_dot_app__payload__pb2.CreateAppRequest.FromString,
                    response_serializer=identity_dot_app__payload__pb2.CreateAppResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=identity_dot_app__payload__pb2.GetAppRequest.FromString,
                    response_serializer=identity_dot_app__payload__pb2.GetAppResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=identity_dot_app__payload__pb2.UpdateAppRequest.FromString,
                    response_serializer=identity_dot_app__payload__pb2.UpdateAppResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=identity_dot_app__payload__pb2.DeleteAppRequest.FromString,
                    response_serializer=identity_dot_app__payload__pb2.DeleteAppResponse.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=identity_dot_app__payload__pb2.ListAppsRequest.FromString,
                    response_serializer=identity_dot_app__payload__pb2.ListAppsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cloudidl.identity.AppsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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.identity.AppsService/Create',
            identity_dot_app__payload__pb2.CreateAppRequest.SerializeToString,
            identity_dot_app__payload__pb2.CreateAppResponse.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.identity.AppsService/Get',
            identity_dot_app__payload__pb2.GetAppRequest.SerializeToString,
            identity_dot_app__payload__pb2.GetAppResponse.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.identity.AppsService/Update',
            identity_dot_app__payload__pb2.UpdateAppRequest.SerializeToString,
            identity_dot_app__payload__pb2.UpdateAppResponse.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.identity.AppsService/Delete',
            identity_dot_app__payload__pb2.DeleteAppRequest.SerializeToString,
            identity_dot_app__payload__pb2.DeleteAppResponse.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.identity.AppsService/List',
            identity_dot_app__payload__pb2.ListAppsRequest.SerializeToString,
            identity_dot_app__payload__pb2.ListAppsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
