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

from bilireq.grpc.protos.bilibili.polymer.community.govern.v1 import govern_pb2 as bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2


class AntiHarassmentServiceStub(object):
    """反骚扰
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.StoreAntiHarassmentSettings = channel.unary_unary(
                '/bilibili.polymer.app.govern.v1.AntiHarassmentService/StoreAntiHarassmentSettings',
                request_serializer=bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.StoreAntiHarassmentSettingsReq.SerializeToString,
                response_deserializer=bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.StoreAntiHarassmentSettingsRsp.FromString,
                )
        self.LoadAntiHarassmentSettings = channel.unary_unary(
                '/bilibili.polymer.app.govern.v1.AntiHarassmentService/LoadAntiHarassmentSettings',
                request_serializer=bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.LoadAntiHarassmentSettingsReq.SerializeToString,
                response_deserializer=bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.LoadAntiHarassmentSettingsRsp.FromString,
                )


class AntiHarassmentServiceServicer(object):
    """反骚扰
    """

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

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


def add_AntiHarassmentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'StoreAntiHarassmentSettings': grpc.unary_unary_rpc_method_handler(
                    servicer.StoreAntiHarassmentSettings,
                    request_deserializer=bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.StoreAntiHarassmentSettingsReq.FromString,
                    response_serializer=bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.StoreAntiHarassmentSettingsRsp.SerializeToString,
            ),
            'LoadAntiHarassmentSettings': grpc.unary_unary_rpc_method_handler(
                    servicer.LoadAntiHarassmentSettings,
                    request_deserializer=bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.LoadAntiHarassmentSettingsReq.FromString,
                    response_serializer=bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.LoadAntiHarassmentSettingsRsp.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bilibili.polymer.app.govern.v1.AntiHarassmentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AntiHarassmentService(object):
    """反骚扰
    """

    @staticmethod
    def StoreAntiHarassmentSettings(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, '/bilibili.polymer.app.govern.v1.AntiHarassmentService/StoreAntiHarassmentSettings',
            bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.StoreAntiHarassmentSettingsReq.SerializeToString,
            bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.StoreAntiHarassmentSettingsRsp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def LoadAntiHarassmentSettings(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, '/bilibili.polymer.app.govern.v1.AntiHarassmentService/LoadAntiHarassmentSettings',
            bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.LoadAntiHarassmentSettingsReq.SerializeToString,
            bilibili_dot_polymer_dot_community_dot_govern_dot_v1_dot_govern__pb2.LoadAntiHarassmentSettingsRsp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
