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

from strmprivacy.api.parties.v1alpha import parties_v1alpha_pb2 as strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListParties = channel.unary_unary(
                '/strmprivacy.api.parties.v1alpha.PartiesService/ListParties',
                request_serializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.ListPartiesRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.ListPartiesResponse.FromString,
                )
        self.GetParty = channel.unary_unary(
                '/strmprivacy.api.parties.v1alpha.PartiesService/GetParty',
                request_serializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.GetPartyRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.GetPartyResponse.FromString,
                )
        self.UpsertParty = channel.unary_unary(
                '/strmprivacy.api.parties.v1alpha.PartiesService/UpsertParty',
                request_serializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.UpsertPartyRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.UpsertPartyResponse.FromString,
                )


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

    def ListParties(self, request, context):
        """List all parties for an organization. The organization is derived from the calling user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetParty(self, request, context):
        """Get a party by its id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpsertParty(self, request, context):
        """Create or update a party. To create a party, leave its id empty. To update a party, set its id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_PartiesServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListParties': grpc.unary_unary_rpc_method_handler(
                    servicer.ListParties,
                    request_deserializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.ListPartiesRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.ListPartiesResponse.SerializeToString,
            ),
            'GetParty': grpc.unary_unary_rpc_method_handler(
                    servicer.GetParty,
                    request_deserializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.GetPartyRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.GetPartyResponse.SerializeToString,
            ),
            'UpsertParty': grpc.unary_unary_rpc_method_handler(
                    servicer.UpsertParty,
                    request_deserializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.UpsertPartyRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.UpsertPartyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'strmprivacy.api.parties.v1alpha.PartiesService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListParties(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, '/strmprivacy.api.parties.v1alpha.PartiesService/ListParties',
            strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.ListPartiesRequest.SerializeToString,
            strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.ListPartiesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetParty(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, '/strmprivacy.api.parties.v1alpha.PartiesService/GetParty',
            strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.GetPartyRequest.SerializeToString,
            strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.GetPartyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpsertParty(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, '/strmprivacy.api.parties.v1alpha.PartiesService/UpsertParty',
            strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.UpsertPartyRequest.SerializeToString,
            strmprivacy_dot_api_dot_parties_dot_v1alpha_dot_parties__v1alpha__pb2.UpsertPartyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
