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

from meshtrade.iam.user.v1 import service_pb2 as meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2
from meshtrade.iam.user.v1 import user_pb2 as meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2


class UserServiceStub(object):
    """Service defines the RPC methods for interacting with the user resource,
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.AssignRoleToUser = channel.unary_unary(
                '/meshtrade.iam.user.v1.UserService/AssignRoleToUser',
                request_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRoleToUserRequest.SerializeToString,
                response_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.FromString,
                _registered_method=True)


class UserServiceServicer(object):
    """Service defines the RPC methods for interacting with the user resource,
    """

    def AssignRoleToUser(self, request, context):
        """Assign Role To User
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UserServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AssignRoleToUser': grpc.unary_unary_rpc_method_handler(
                    servicer.AssignRoleToUser,
                    request_deserializer=meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRoleToUserRequest.FromString,
                    response_serializer=meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'meshtrade.iam.user.v1.UserService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('meshtrade.iam.user.v1.UserService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class UserService(object):
    """Service defines the RPC methods for interacting with the user resource,
    """

    @staticmethod
    def AssignRoleToUser(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,
            '/meshtrade.iam.user.v1.UserService/AssignRoleToUser',
            meshtrade_dot_iam_dot_user_dot_v1_dot_service__pb2.AssignRoleToUserRequest.SerializeToString,
            meshtrade_dot_iam_dot_user_dot_v1_dot_user__pb2.User.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
