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

from integrations.v1 import integrations_pb2 as integrations_dot_v1_dot_integrations__pb2

GRPC_GENERATED_VERSION = '1.78.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in integrations/v1/integrations_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class IntegrationServiceStub(object):
    """IntegrationService handles third-party integration management
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListIntegrations = channel.unary_unary(
                '/integrations.v1.IntegrationService/ListIntegrations',
                request_serializer=integrations_dot_v1_dot_integrations__pb2.ListIntegrationsRequest.SerializeToString,
                response_deserializer=integrations_dot_v1_dot_integrations__pb2.ListIntegrationsResponse.FromString,
                _registered_method=True)
        self.CreateIntegration = channel.unary_unary(
                '/integrations.v1.IntegrationService/CreateIntegration',
                request_serializer=integrations_dot_v1_dot_integrations__pb2.CreateIntegrationRequest.SerializeToString,
                response_deserializer=integrations_dot_v1_dot_integrations__pb2.Integration.FromString,
                _registered_method=True)
        self.GetIntegration = channel.unary_unary(
                '/integrations.v1.IntegrationService/GetIntegration',
                request_serializer=integrations_dot_v1_dot_integrations__pb2.GetIntegrationRequest.SerializeToString,
                response_deserializer=integrations_dot_v1_dot_integrations__pb2.Integration.FromString,
                _registered_method=True)
        self.UpdateIntegration = channel.unary_unary(
                '/integrations.v1.IntegrationService/UpdateIntegration',
                request_serializer=integrations_dot_v1_dot_integrations__pb2.UpdateIntegrationRequest.SerializeToString,
                response_deserializer=integrations_dot_v1_dot_integrations__pb2.Integration.FromString,
                _registered_method=True)
        self.DeleteIntegration = channel.unary_unary(
                '/integrations.v1.IntegrationService/DeleteIntegration',
                request_serializer=integrations_dot_v1_dot_integrations__pb2.DeleteIntegrationRequest.SerializeToString,
                response_deserializer=integrations_dot_v1_dot_integrations__pb2.DeleteIntegrationResponse.FromString,
                _registered_method=True)
        self.TestIntegration = channel.unary_unary(
                '/integrations.v1.IntegrationService/TestIntegration',
                request_serializer=integrations_dot_v1_dot_integrations__pb2.TestIntegrationRequest.SerializeToString,
                response_deserializer=integrations_dot_v1_dot_integrations__pb2.TestIntegrationResponse.FromString,
                _registered_method=True)
        self.GetIntegrationTypes = channel.unary_unary(
                '/integrations.v1.IntegrationService/GetIntegrationTypes',
                request_serializer=integrations_dot_v1_dot_integrations__pb2.GetIntegrationTypesRequest.SerializeToString,
                response_deserializer=integrations_dot_v1_dot_integrations__pb2.GetIntegrationTypesResponse.FromString,
                _registered_method=True)


class IntegrationServiceServicer(object):
    """IntegrationService handles third-party integration management
    """

    def ListIntegrations(self, request, context):
        """List all integrations for the authenticated user
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateIntegration(self, request, context):
        """Create a new integration
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetIntegration(self, request, context):
        """Get a specific integration by ID
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateIntegration(self, request, context):
        """Update an existing integration
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def TestIntegration(self, request, context):
        """Test an integration by sending a test notification
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetIntegrationTypes(self, request, context):
        """Get available integration types and events
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_IntegrationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListIntegrations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListIntegrations,
                    request_deserializer=integrations_dot_v1_dot_integrations__pb2.ListIntegrationsRequest.FromString,
                    response_serializer=integrations_dot_v1_dot_integrations__pb2.ListIntegrationsResponse.SerializeToString,
            ),
            'CreateIntegration': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateIntegration,
                    request_deserializer=integrations_dot_v1_dot_integrations__pb2.CreateIntegrationRequest.FromString,
                    response_serializer=integrations_dot_v1_dot_integrations__pb2.Integration.SerializeToString,
            ),
            'GetIntegration': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIntegration,
                    request_deserializer=integrations_dot_v1_dot_integrations__pb2.GetIntegrationRequest.FromString,
                    response_serializer=integrations_dot_v1_dot_integrations__pb2.Integration.SerializeToString,
            ),
            'UpdateIntegration': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateIntegration,
                    request_deserializer=integrations_dot_v1_dot_integrations__pb2.UpdateIntegrationRequest.FromString,
                    response_serializer=integrations_dot_v1_dot_integrations__pb2.Integration.SerializeToString,
            ),
            'DeleteIntegration': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteIntegration,
                    request_deserializer=integrations_dot_v1_dot_integrations__pb2.DeleteIntegrationRequest.FromString,
                    response_serializer=integrations_dot_v1_dot_integrations__pb2.DeleteIntegrationResponse.SerializeToString,
            ),
            'TestIntegration': grpc.unary_unary_rpc_method_handler(
                    servicer.TestIntegration,
                    request_deserializer=integrations_dot_v1_dot_integrations__pb2.TestIntegrationRequest.FromString,
                    response_serializer=integrations_dot_v1_dot_integrations__pb2.TestIntegrationResponse.SerializeToString,
            ),
            'GetIntegrationTypes': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIntegrationTypes,
                    request_deserializer=integrations_dot_v1_dot_integrations__pb2.GetIntegrationTypesRequest.FromString,
                    response_serializer=integrations_dot_v1_dot_integrations__pb2.GetIntegrationTypesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'integrations.v1.IntegrationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('integrations.v1.IntegrationService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class IntegrationService(object):
    """IntegrationService handles third-party integration management
    """

    @staticmethod
    def ListIntegrations(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,
            '/integrations.v1.IntegrationService/ListIntegrations',
            integrations_dot_v1_dot_integrations__pb2.ListIntegrationsRequest.SerializeToString,
            integrations_dot_v1_dot_integrations__pb2.ListIntegrationsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateIntegration(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,
            '/integrations.v1.IntegrationService/CreateIntegration',
            integrations_dot_v1_dot_integrations__pb2.CreateIntegrationRequest.SerializeToString,
            integrations_dot_v1_dot_integrations__pb2.Integration.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetIntegration(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,
            '/integrations.v1.IntegrationService/GetIntegration',
            integrations_dot_v1_dot_integrations__pb2.GetIntegrationRequest.SerializeToString,
            integrations_dot_v1_dot_integrations__pb2.Integration.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateIntegration(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,
            '/integrations.v1.IntegrationService/UpdateIntegration',
            integrations_dot_v1_dot_integrations__pb2.UpdateIntegrationRequest.SerializeToString,
            integrations_dot_v1_dot_integrations__pb2.Integration.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteIntegration(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,
            '/integrations.v1.IntegrationService/DeleteIntegration',
            integrations_dot_v1_dot_integrations__pb2.DeleteIntegrationRequest.SerializeToString,
            integrations_dot_v1_dot_integrations__pb2.DeleteIntegrationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TestIntegration(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,
            '/integrations.v1.IntegrationService/TestIntegration',
            integrations_dot_v1_dot_integrations__pb2.TestIntegrationRequest.SerializeToString,
            integrations_dot_v1_dot_integrations__pb2.TestIntegrationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetIntegrationTypes(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,
            '/integrations.v1.IntegrationService/GetIntegrationTypes',
            integrations_dot_v1_dot_integrations__pb2.GetIntegrationTypesRequest.SerializeToString,
            integrations_dot_v1_dot_integrations__pb2.GetIntegrationTypesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
