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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from . import resources_pb2 as resources__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetTermsOfService = channel.unary_unary(
                '/org.couchers.resources.Resources/GetTermsOfService',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=resources__pb2.GetTermsOfServiceRes.FromString,
                )
        self.GetCommunityGuidelines = channel.unary_unary(
                '/org.couchers.resources.Resources/GetCommunityGuidelines',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=resources__pb2.GetCommunityGuidelinesRes.FromString,
                )
        self.GetRegions = channel.unary_unary(
                '/org.couchers.resources.Resources/GetRegions',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=resources__pb2.GetRegionsRes.FromString,
                )
        self.GetLanguages = channel.unary_unary(
                '/org.couchers.resources.Resources/GetLanguages',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=resources__pb2.GetLanguagesRes.FromString,
                )


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

    def GetTermsOfService(self, request, context):
        """This API contains general resources needed by frontends and managed by the backend team

        Returns the latest Terms of Service markdown, to be shown on signup or if jailed due to this
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCommunityGuidelines(self, request, context):
        """Returns the latest Community Guidelines, see GetCommunityGuidelinesRes
        Each of the Community Guidelines should be shown under the text "Please agree to our Community Guidelines", and
        each Community Guideline should be shown with its title, the logo, and the guideline content. The user needs to
        tick a checkbox to agree each of the individual Guidelines and the frontend should only say a user agreed to them
        if they agreed to each one individually.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRegions(self, request, context):
        """Returns a list of allowed regions
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetLanguages(self, request, context):
        """Returns a list of allowed languages. This is a subset of the full ISO639-3 table.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ResourcesServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetTermsOfService': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTermsOfService,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=resources__pb2.GetTermsOfServiceRes.SerializeToString,
            ),
            'GetCommunityGuidelines': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCommunityGuidelines,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=resources__pb2.GetCommunityGuidelinesRes.SerializeToString,
            ),
            'GetRegions': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRegions,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=resources__pb2.GetRegionsRes.SerializeToString,
            ),
            'GetLanguages': grpc.unary_unary_rpc_method_handler(
                    servicer.GetLanguages,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=resources__pb2.GetLanguagesRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.resources.Resources', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetTermsOfService(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, '/org.couchers.resources.Resources/GetTermsOfService',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            resources__pb2.GetTermsOfServiceRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCommunityGuidelines(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, '/org.couchers.resources.Resources/GetCommunityGuidelines',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            resources__pb2.GetCommunityGuidelinesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetRegions(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, '/org.couchers.resources.Resources/GetRegions',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            resources__pb2.GetRegionsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLanguages(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, '/org.couchers.resources.Resources/GetLanguages',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            resources__pb2.GetLanguagesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
