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

from . import beam_expansion_api_pb2 as org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2


class ExpansionServiceStub(object):
    """Job Service for constructing pipelines
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Expand = channel.unary_unary(
                '/org.apache.beam.model.expansion.v1.ExpansionService/Expand',
                request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionRequest.SerializeToString,
                response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionResponse.FromString,
                )
        self.DiscoverSchemaTransform = channel.unary_unary(
                '/org.apache.beam.model.expansion.v1.ExpansionService/DiscoverSchemaTransform',
                request_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformRequest.SerializeToString,
                response_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformResponse.FromString,
                )


class ExpansionServiceServicer(object):
    """Job Service for constructing pipelines
    """

    def Expand(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DiscoverSchemaTransform(self, request, context):
        """A RPC to discover already registered SchemaTransformProviders.
        See https://s.apache.org/easy-multi-language for more details.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ExpansionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Expand': grpc.unary_unary_rpc_method_handler(
                    servicer.Expand,
                    request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionRequest.FromString,
                    response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionResponse.SerializeToString,
            ),
            'DiscoverSchemaTransform': grpc.unary_unary_rpc_method_handler(
                    servicer.DiscoverSchemaTransform,
                    request_deserializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformRequest.FromString,
                    response_serializer=org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.apache.beam.model.expansion.v1.ExpansionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ExpansionService(object):
    """Job Service for constructing pipelines
    """

    @staticmethod
    def Expand(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.apache.beam.model.expansion.v1.ExpansionService/Expand',
            org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionRequest.SerializeToString,
            org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.ExpansionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DiscoverSchemaTransform(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.apache.beam.model.expansion.v1.ExpansionService/DiscoverSchemaTransform',
            org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformRequest.SerializeToString,
            org_dot_apache_dot_beam_dot_model_dot_job__management_dot_v1_dot_beam__expansion__api__pb2.DiscoverSchemaTransformResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
