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

from . import integrations_pb2 as integrations__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetIntegrationToken = channel.unary_unary(
                '/dialog.Integrations/GetIntegrationToken',
                request_serializer=integrations__pb2.RequestGetIntegrationToken.SerializeToString,
                response_deserializer=integrations__pb2.ResponseIntegrationToken.FromString,
                )
        self.RevokeIntegrationToken = channel.unary_unary(
                '/dialog.Integrations/RevokeIntegrationToken',
                request_serializer=integrations__pb2.RequestRevokeIntegrationToken.SerializeToString,
                response_deserializer=integrations__pb2.ResponseIntegrationToken.FromString,
                )


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

    def GetIntegrationToken(self, request, context):
        """/ Get token for posting to group
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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


def add_IntegrationsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetIntegrationToken': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIntegrationToken,
                    request_deserializer=integrations__pb2.RequestGetIntegrationToken.FromString,
                    response_serializer=integrations__pb2.ResponseIntegrationToken.SerializeToString,
            ),
            'RevokeIntegrationToken': grpc.unary_unary_rpc_method_handler(
                    servicer.RevokeIntegrationToken,
                    request_deserializer=integrations__pb2.RequestRevokeIntegrationToken.FromString,
                    response_serializer=integrations__pb2.ResponseIntegrationToken.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dialog.Integrations', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetIntegrationToken(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, '/dialog.Integrations/GetIntegrationToken',
            integrations__pb2.RequestGetIntegrationToken.SerializeToString,
            integrations__pb2.ResponseIntegrationToken.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RevokeIntegrationToken(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, '/dialog.Integrations/RevokeIntegrationToken',
            integrations__pb2.RequestRevokeIntegrationToken.SerializeToString,
            integrations__pb2.ResponseIntegrationToken.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
