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

from protobufs import fortanix_pb2 as protobufs_dot_fortanix__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateAccount = channel.unary_unary(
                '/fortanix.Consumer/CreateAccount',
                request_serializer=protobufs_dot_fortanix__pb2.AccountToCreate.SerializeToString,
                response_deserializer=protobufs_dot_fortanix__pb2.Response.FromString,
                )
        self.CreateAccountRole = channel.unary_unary(
                '/fortanix.Consumer/CreateAccountRole',
                request_serializer=protobufs_dot_fortanix__pb2.RoleToCreate.SerializeToString,
                response_deserializer=protobufs_dot_fortanix__pb2.Response.FromString,
                )
        self.CreateUser = channel.unary_unary(
                '/fortanix.Consumer/CreateUser',
                request_serializer=protobufs_dot_fortanix__pb2.UserToCreate.SerializeToString,
                response_deserializer=protobufs_dot_fortanix__pb2.Response.FromString,
                )
        self.CreateGroup = channel.unary_unary(
                '/fortanix.Consumer/CreateGroup',
                request_serializer=protobufs_dot_fortanix__pb2.GroupToCreate.SerializeToString,
                response_deserializer=protobufs_dot_fortanix__pb2.Response.FromString,
                )
        self.CreateGroupRole = channel.unary_unary(
                '/fortanix.Consumer/CreateGroupRole',
                request_serializer=protobufs_dot_fortanix__pb2.RoleToCreate.SerializeToString,
                response_deserializer=protobufs_dot_fortanix__pb2.Response.FromString,
                )
        self.GetApps = channel.unary_unary(
                '/fortanix.Consumer/GetApps',
                request_serializer=protobufs_dot_fortanix__pb2.AppsByGroup.SerializeToString,
                response_deserializer=protobufs_dot_fortanix__pb2.Response.FromString,
                )
        self.DeleteApp = channel.unary_unary(
                '/fortanix.Consumer/DeleteApp',
                request_serializer=protobufs_dot_fortanix__pb2.App.SerializeToString,
                response_deserializer=protobufs_dot_fortanix__pb2.Response.FromString,
                )


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

    def CreateAccount(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 CreateAccountRole(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 CreateUser(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 CreateGroup(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 CreateGroupRole(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 GetApps(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 DeleteApp(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_ConsumerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateAccount,
                    request_deserializer=protobufs_dot_fortanix__pb2.AccountToCreate.FromString,
                    response_serializer=protobufs_dot_fortanix__pb2.Response.SerializeToString,
            ),
            'CreateAccountRole': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateAccountRole,
                    request_deserializer=protobufs_dot_fortanix__pb2.RoleToCreate.FromString,
                    response_serializer=protobufs_dot_fortanix__pb2.Response.SerializeToString,
            ),
            'CreateUser': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateUser,
                    request_deserializer=protobufs_dot_fortanix__pb2.UserToCreate.FromString,
                    response_serializer=protobufs_dot_fortanix__pb2.Response.SerializeToString,
            ),
            'CreateGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateGroup,
                    request_deserializer=protobufs_dot_fortanix__pb2.GroupToCreate.FromString,
                    response_serializer=protobufs_dot_fortanix__pb2.Response.SerializeToString,
            ),
            'CreateGroupRole': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateGroupRole,
                    request_deserializer=protobufs_dot_fortanix__pb2.RoleToCreate.FromString,
                    response_serializer=protobufs_dot_fortanix__pb2.Response.SerializeToString,
            ),
            'GetApps': grpc.unary_unary_rpc_method_handler(
                    servicer.GetApps,
                    request_deserializer=protobufs_dot_fortanix__pb2.AppsByGroup.FromString,
                    response_serializer=protobufs_dot_fortanix__pb2.Response.SerializeToString,
            ),
            'DeleteApp': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteApp,
                    request_deserializer=protobufs_dot_fortanix__pb2.App.FromString,
                    response_serializer=protobufs_dot_fortanix__pb2.Response.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fortanix.Consumer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateAccount(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, '/fortanix.Consumer/CreateAccount',
            protobufs_dot_fortanix__pb2.AccountToCreate.SerializeToString,
            protobufs_dot_fortanix__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateAccountRole(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, '/fortanix.Consumer/CreateAccountRole',
            protobufs_dot_fortanix__pb2.RoleToCreate.SerializeToString,
            protobufs_dot_fortanix__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateUser(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, '/fortanix.Consumer/CreateUser',
            protobufs_dot_fortanix__pb2.UserToCreate.SerializeToString,
            protobufs_dot_fortanix__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateGroup(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, '/fortanix.Consumer/CreateGroup',
            protobufs_dot_fortanix__pb2.GroupToCreate.SerializeToString,
            protobufs_dot_fortanix__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateGroupRole(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, '/fortanix.Consumer/CreateGroupRole',
            protobufs_dot_fortanix__pb2.RoleToCreate.SerializeToString,
            protobufs_dot_fortanix__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetApps(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, '/fortanix.Consumer/GetApps',
            protobufs_dot_fortanix__pb2.AppsByGroup.SerializeToString,
            protobufs_dot_fortanix__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteApp(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, '/fortanix.Consumer/DeleteApp',
            protobufs_dot_fortanix__pb2.App.SerializeToString,
            protobufs_dot_fortanix__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
