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

from protopia.api.iam.v1beta1 import iam_role_pb2 as protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2
from protopia.api.iam.v1beta1 import role_pb2 as protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.UpsertRole = channel.unary_unary(
                '/protopia.cloud.iam.v1beta1.IAMRole/UpsertRole',
                request_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.SerializeToString,
                response_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.FromString,
                )
        self.GetRole = channel.unary_unary(
                '/protopia.cloud.iam.v1beta1.IAMRole/GetRole',
                request_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.GetRoleRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.FromString,
                )
        self.DeleteRole = channel.unary_unary(
                '/protopia.cloud.iam.v1beta1.IAMRole/DeleteRole',
                request_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.DeleteRoleRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.DeleteRoleResponse.FromString,
                )
        self.ListRoles = channel.unary_unary(
                '/protopia.cloud.iam.v1beta1.IAMRole/ListRoles',
                request_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.ListRolesRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.ListRolesResponse.FromString,
                )
        self.AddRoleMembers = channel.unary_unary(
                '/protopia.cloud.iam.v1beta1.IAMRole/AddRoleMembers',
                request_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.AddRoleMembersRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.AddRoleMembersResponse.FromString,
                )
        self.RemoveRoleMember = channel.unary_unary(
                '/protopia.cloud.iam.v1beta1.IAMRole/RemoveRoleMember',
                request_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.RemoveRoleMemberRequest.SerializeToString,
                response_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.RemoveRoleMemberResponse.FromString,
                )


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

    def UpsertRole(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 GetRole(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 DeleteRole(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 ListRoles(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 AddRoleMembers(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 RemoveRoleMember(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_IAMRoleServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'UpsertRole': grpc.unary_unary_rpc_method_handler(
                    servicer.UpsertRole,
                    request_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.FromString,
                    response_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.SerializeToString,
            ),
            'GetRole': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRole,
                    request_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.GetRoleRequest.FromString,
                    response_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.SerializeToString,
            ),
            'DeleteRole': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteRole,
                    request_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.DeleteRoleRequest.FromString,
                    response_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.DeleteRoleResponse.SerializeToString,
            ),
            'ListRoles': grpc.unary_unary_rpc_method_handler(
                    servicer.ListRoles,
                    request_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.ListRolesRequest.FromString,
                    response_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.ListRolesResponse.SerializeToString,
            ),
            'AddRoleMembers': grpc.unary_unary_rpc_method_handler(
                    servicer.AddRoleMembers,
                    request_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.AddRoleMembersRequest.FromString,
                    response_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.AddRoleMembersResponse.SerializeToString,
            ),
            'RemoveRoleMember': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveRoleMember,
                    request_deserializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.RemoveRoleMemberRequest.FromString,
                    response_serializer=protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.RemoveRoleMemberResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'protopia.cloud.iam.v1beta1.IAMRole', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def UpsertRole(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, '/protopia.cloud.iam.v1beta1.IAMRole/UpsertRole',
            protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.SerializeToString,
            protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRole(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, '/protopia.cloud.iam.v1beta1.IAMRole/GetRole',
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.GetRoleRequest.SerializeToString,
            protopia_dot_api_dot_iam_dot_v1beta1_dot_role__pb2.Role.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteRole(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, '/protopia.cloud.iam.v1beta1.IAMRole/DeleteRole',
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.DeleteRoleRequest.SerializeToString,
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.DeleteRoleResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListRoles(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, '/protopia.cloud.iam.v1beta1.IAMRole/ListRoles',
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.ListRolesRequest.SerializeToString,
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.ListRolesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddRoleMembers(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, '/protopia.cloud.iam.v1beta1.IAMRole/AddRoleMembers',
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.AddRoleMembersRequest.SerializeToString,
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.AddRoleMembersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveRoleMember(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, '/protopia.cloud.iam.v1beta1.IAMRole/RemoveRoleMember',
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.RemoveRoleMemberRequest.SerializeToString,
            protopia_dot_api_dot_iam_dot_v1beta1_dot_iam__role__pb2.RemoveRoleMemberResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
