# 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 campaigns.v1 import campaigns_pb2 as campaigns_dot_v1_dot_campaigns__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 campaigns/v1/campaigns_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 CampaignServiceStub(object):
    """CampaignService handles SMS/Email marketing campaigns with bulk trackable links
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListCampaigns = channel.unary_unary(
                '/campaigns.v1.CampaignService/ListCampaigns',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.ListCampaignsRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.ListCampaignsResponse.FromString,
                _registered_method=True)
        self.CreateCampaign = channel.unary_unary(
                '/campaigns.v1.CampaignService/CreateCampaign',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.CreateCampaignRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.Campaign.FromString,
                _registered_method=True)
        self.GetCampaign = channel.unary_unary(
                '/campaigns.v1.CampaignService/GetCampaign',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.GetCampaignRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.Campaign.FromString,
                _registered_method=True)
        self.UpdateCampaign = channel.unary_unary(
                '/campaigns.v1.CampaignService/UpdateCampaign',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.UpdateCampaignRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.Campaign.FromString,
                _registered_method=True)
        self.DeleteCampaign = channel.unary_unary(
                '/campaigns.v1.CampaignService/DeleteCampaign',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.DeleteCampaignRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.DeleteCampaignResponse.FromString,
                _registered_method=True)
        self.GenerateLinks = channel.unary_unary(
                '/campaigns.v1.CampaignService/GenerateLinks',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.GenerateLinksRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.GenerateLinksResponse.FromString,
                _registered_method=True)
        self.ListCampaignLinks = channel.unary_unary(
                '/campaigns.v1.CampaignService/ListCampaignLinks',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.ListCampaignLinksRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.ListCampaignLinksResponse.FromString,
                _registered_method=True)
        self.GetCampaignStats = channel.unary_unary(
                '/campaigns.v1.CampaignService/GetCampaignStats',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.GetCampaignStatsRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.CampaignStats.FromString,
                _registered_method=True)
        self.ExportLinks = channel.unary_unary(
                '/campaigns.v1.CampaignService/ExportLinks',
                request_serializer=campaigns_dot_v1_dot_campaigns__pb2.ExportLinksRequest.SerializeToString,
                response_deserializer=campaigns_dot_v1_dot_campaigns__pb2.ExportLinksResponse.FromString,
                _registered_method=True)


class CampaignServiceServicer(object):
    """CampaignService handles SMS/Email marketing campaigns with bulk trackable links
    """

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

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

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

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

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

    def GenerateLinks(self, request, context):
        """Generate links for campaign recipients in bulk
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListCampaignLinks(self, request, context):
        """List campaign links with pagination
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def ExportLinks(self, request, context):
        """Export all campaign links
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CampaignServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListCampaigns': grpc.unary_unary_rpc_method_handler(
                    servicer.ListCampaigns,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.ListCampaignsRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.ListCampaignsResponse.SerializeToString,
            ),
            'CreateCampaign': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateCampaign,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.CreateCampaignRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.Campaign.SerializeToString,
            ),
            'GetCampaign': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCampaign,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.GetCampaignRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.Campaign.SerializeToString,
            ),
            'UpdateCampaign': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateCampaign,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.UpdateCampaignRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.Campaign.SerializeToString,
            ),
            'DeleteCampaign': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteCampaign,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.DeleteCampaignRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.DeleteCampaignResponse.SerializeToString,
            ),
            'GenerateLinks': grpc.unary_unary_rpc_method_handler(
                    servicer.GenerateLinks,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.GenerateLinksRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.GenerateLinksResponse.SerializeToString,
            ),
            'ListCampaignLinks': grpc.unary_unary_rpc_method_handler(
                    servicer.ListCampaignLinks,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.ListCampaignLinksRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.ListCampaignLinksResponse.SerializeToString,
            ),
            'GetCampaignStats': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCampaignStats,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.GetCampaignStatsRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.CampaignStats.SerializeToString,
            ),
            'ExportLinks': grpc.unary_unary_rpc_method_handler(
                    servicer.ExportLinks,
                    request_deserializer=campaigns_dot_v1_dot_campaigns__pb2.ExportLinksRequest.FromString,
                    response_serializer=campaigns_dot_v1_dot_campaigns__pb2.ExportLinksResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'campaigns.v1.CampaignService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('campaigns.v1.CampaignService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class CampaignService(object):
    """CampaignService handles SMS/Email marketing campaigns with bulk trackable links
    """

    @staticmethod
    def ListCampaigns(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,
            '/campaigns.v1.CampaignService/ListCampaigns',
            campaigns_dot_v1_dot_campaigns__pb2.ListCampaignsRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.ListCampaignsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateCampaign(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,
            '/campaigns.v1.CampaignService/CreateCampaign',
            campaigns_dot_v1_dot_campaigns__pb2.CreateCampaignRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.Campaign.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetCampaign(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,
            '/campaigns.v1.CampaignService/GetCampaign',
            campaigns_dot_v1_dot_campaigns__pb2.GetCampaignRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.Campaign.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateCampaign(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,
            '/campaigns.v1.CampaignService/UpdateCampaign',
            campaigns_dot_v1_dot_campaigns__pb2.UpdateCampaignRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.Campaign.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteCampaign(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,
            '/campaigns.v1.CampaignService/DeleteCampaign',
            campaigns_dot_v1_dot_campaigns__pb2.DeleteCampaignRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.DeleteCampaignResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GenerateLinks(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,
            '/campaigns.v1.CampaignService/GenerateLinks',
            campaigns_dot_v1_dot_campaigns__pb2.GenerateLinksRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.GenerateLinksResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListCampaignLinks(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,
            '/campaigns.v1.CampaignService/ListCampaignLinks',
            campaigns_dot_v1_dot_campaigns__pb2.ListCampaignLinksRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.ListCampaignLinksResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetCampaignStats(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,
            '/campaigns.v1.CampaignService/GetCampaignStats',
            campaigns_dot_v1_dot_campaigns__pb2.GetCampaignStatsRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.CampaignStats.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExportLinks(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,
            '/campaigns.v1.CampaignService/ExportLinks',
            campaigns_dot_v1_dot_campaigns__pb2.ExportLinksRequest.SerializeToString,
            campaigns_dot_v1_dot_campaigns__pb2.ExportLinksResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
