Example #1
0
  def beta_create_UsersService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('soboto.users.UsersService', 'getBOUserInfo'): GetBOUserInfoRequest.SerializeToString,
      ('soboto.users.UsersService', 'getCustomerInfo'): GetCustomerInfoRequest.SerializeToString,
      ('soboto.users.UsersService', 'getUserPermissions'): GetUserPermissionsRequest.SerializeToString,
      ('soboto.users.UsersService', 'setEntityOwner'): SetEntityOwnerRequest.SerializeToString,
      ('soboto.users.UsersService', 'validateAuthenticationToken'): ValidateAuthenticationTokenRequest.SerializeToString,
    }
    response_deserializers = {
      ('soboto.users.UsersService', 'getBOUserInfo'): GetBOUserInfoResponse.FromString,
      ('soboto.users.UsersService', 'getCustomerInfo'): GetCustomerInfoResponse.FromString,
      ('soboto.users.UsersService', 'getUserPermissions'): GetUserPermissionsResponse.FromString,
      ('soboto.users.UsersService', 'setEntityOwner'): SetEntityOwnerResponse.FromString,
      ('soboto.users.UsersService', 'validateAuthenticationToken'): ValidateAuthenticationTokenResponse.FromString,
    }
    cardinalities = {
      'getBOUserInfo': cardinality.Cardinality.UNARY_UNARY,
      'getCustomerInfo': cardinality.Cardinality.UNARY_UNARY,
      'getUserPermissions': cardinality.Cardinality.UNARY_UNARY,
      'setEntityOwner': cardinality.Cardinality.UNARY_UNARY,
      'validateAuthenticationToken': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'soboto.users.UsersService', cardinalities, options=stub_options)
Example #2
0
def beta_create_RouteGuide_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    request_serializers = {
        ("routeguide.RouteGuide", "GetFeature"): Point.SerializeToString,
        ("routeguide.RouteGuide", "ListFeatures"): Rectangle.SerializeToString,
        ("routeguide.RouteGuide", "RecordRoute"): Point.SerializeToString,
        ("routeguide.RouteGuide", "RouteChat"): RouteNote.SerializeToString,
    }
    response_deserializers = {
        ("routeguide.RouteGuide", "GetFeature"): Feature.FromString,
        ("routeguide.RouteGuide", "ListFeatures"): Feature.FromString,
        ("routeguide.RouteGuide", "RecordRoute"): RouteSummary.FromString,
        ("routeguide.RouteGuide", "RouteChat"): RouteNote.FromString,
    }
    cardinalities = {
        "GetFeature": cardinality.Cardinality.UNARY_UNARY,
        "ListFeatures": cardinality.Cardinality.UNARY_STREAM,
        "RecordRoute": cardinality.Cardinality.STREAM_UNARY,
        "RouteChat": cardinality.Cardinality.STREAM_STREAM,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size,
    )
    return beta_implementations.dynamic_stub(channel, "routeguide.RouteGuide", cardinalities, options=stub_options)
Example #3
0
def beta_create_PredictionService_stub(channel,
                                       host=None,
                                       metadata_transformer=None,
                                       pool=None,
                                       pool_size=None):
    request_serializers = {
        ('tensorflow.serving.PredictionService', 'Predict'):
        predict__pb2.PredictRequest.SerializeToString,
    }
    response_deserializers = {
        ('tensorflow.serving.PredictionService', 'Predict'):
        predict__pb2.PredictResponse.FromString,
    }
    cardinalities = {
        'Predict': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(
        channel,
        'tensorflow.serving.PredictionService',
        cardinalities,
        options=stub_options)
def beta_create_FrameSpaceService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_service_pb2
  import proto.framespace.framespace_pb2
  request_serializers = {
    ('framespace.FrameSpaceService', 'SearchAxes'): proto.framespace.framespace_service_pb2.SearchAxesRequest.SerializeToString,
    ('framespace.FrameSpaceService', 'SearchDataFrames'): proto.framespace.framespace_service_pb2.SearchDataFramesRequest.SerializeToString,
    ('framespace.FrameSpaceService', 'SearchKeySpaces'): proto.framespace.framespace_service_pb2.SearchKeySpacesRequest.SerializeToString,
    ('framespace.FrameSpaceService', 'SearchUnits'): proto.framespace.framespace_service_pb2.SearchUnitsRequest.SerializeToString,
    ('framespace.FrameSpaceService', 'SliceDataFrame'): proto.framespace.framespace_service_pb2.SliceDataFrameRequest.SerializeToString,
  }
  response_deserializers = {
    ('framespace.FrameSpaceService', 'SearchAxes'): proto.framespace.framespace_service_pb2.SearchAxesResponse.FromString,
    ('framespace.FrameSpaceService', 'SearchDataFrames'): proto.framespace.framespace_service_pb2.SearchDataFramesResponse.FromString,
    ('framespace.FrameSpaceService', 'SearchKeySpaces'): proto.framespace.framespace_service_pb2.SearchKeySpacesResponse.FromString,
    ('framespace.FrameSpaceService', 'SearchUnits'): proto.framespace.framespace_service_pb2.SearchUnitsResponse.FromString,
    ('framespace.FrameSpaceService', 'SliceDataFrame'): proto.framespace.framespace_pb2.DataFrame.FromString,
  }
  cardinalities = {
    'SearchAxes': cardinality.Cardinality.UNARY_UNARY,
    'SearchDataFrames': cardinality.Cardinality.UNARY_UNARY,
    'SearchKeySpaces': cardinality.Cardinality.UNARY_UNARY,
    'SearchUnits': cardinality.Cardinality.UNARY_UNARY,
    'SliceDataFrame': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'framespace.FrameSpaceService', cardinalities, options=stub_options)
Example #5
0
def beta_create_ScootDaemon_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  """The Beta API is deprecated for 0.15.0 and later.

  It is recommended to use the GA API (classes and functions in this
  file not marked beta) for all further purposes. This function was
  generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
  request_serializers = {
    ('protocol.ScootDaemon', 'CheckoutSnapshot'): CheckoutSnapshotRequest.SerializeToString,
    ('protocol.ScootDaemon', 'CreateSnapshot'): CreateSnapshotRequest.SerializeToString,
    ('protocol.ScootDaemon', 'Echo'): EchoRequest.SerializeToString,
    ('protocol.ScootDaemon', 'Poll'): PollRequest.SerializeToString,
    ('protocol.ScootDaemon', 'Run'): RunRequest.SerializeToString,
    ('protocol.ScootDaemon', 'StopDaemon'): EmptyStruct.SerializeToString,
  }
  response_deserializers = {
    ('protocol.ScootDaemon', 'CheckoutSnapshot'): CheckoutSnapshotReply.FromString,
    ('protocol.ScootDaemon', 'CreateSnapshot'): CreateSnapshotReply.FromString,
    ('protocol.ScootDaemon', 'Echo'): EchoReply.FromString,
    ('protocol.ScootDaemon', 'Poll'): PollReply.FromString,
    ('protocol.ScootDaemon', 'Run'): RunReply.FromString,
    ('protocol.ScootDaemon', 'StopDaemon'): EmptyStruct.FromString,
  }
  cardinalities = {
    'CheckoutSnapshot': cardinality.Cardinality.UNARY_UNARY,
    'CreateSnapshot': cardinality.Cardinality.UNARY_UNARY,
    'Echo': cardinality.Cardinality.UNARY_UNARY,
    'Poll': cardinality.Cardinality.UNARY_UNARY,
    'Run': cardinality.Cardinality.UNARY_UNARY,
    'StopDaemon': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'protocol.ScootDaemon', cardinalities, options=stub_options)
def beta_create_SequenceAnnotationService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import ga4gh.sequence_annotation_service_pb2
  import ga4gh.sequence_annotation_service_pb2
  import ga4gh.sequence_annotation_service_pb2
  import ga4gh.sequence_annotations_pb2
  import ga4gh.sequence_annotation_service_pb2
  import ga4gh.sequence_annotation_service_pb2
  import ga4gh.sequence_annotation_service_pb2
  import ga4gh.sequence_annotations_pb2
  request_serializers = {
    ('ga4gh.SequenceAnnotationService', 'GetFeature'): ga4gh.sequence_annotation_service_pb2.GetFeatureRequest.SerializeToString,
    ('ga4gh.SequenceAnnotationService', 'GetFeatureSet'): ga4gh.sequence_annotation_service_pb2.GetFeatureSetRequest.SerializeToString,
    ('ga4gh.SequenceAnnotationService', 'SearchFeatureSets'): ga4gh.sequence_annotation_service_pb2.SearchFeatureSetsRequest.SerializeToString,
    ('ga4gh.SequenceAnnotationService', 'SearchFeatures'): ga4gh.sequence_annotation_service_pb2.SearchFeaturesRequest.SerializeToString,
  }
  response_deserializers = {
    ('ga4gh.SequenceAnnotationService', 'GetFeature'): ga4gh.sequence_annotations_pb2.Feature.FromString,
    ('ga4gh.SequenceAnnotationService', 'GetFeatureSet'): ga4gh.sequence_annotations_pb2.FeatureSet.FromString,
    ('ga4gh.SequenceAnnotationService', 'SearchFeatureSets'): ga4gh.sequence_annotation_service_pb2.SearchFeatureSetsResponse.FromString,
    ('ga4gh.SequenceAnnotationService', 'SearchFeatures'): ga4gh.sequence_annotation_service_pb2.SearchFeaturesResponse.FromString,
  }
  cardinalities = {
    'GetFeature': cardinality.Cardinality.UNARY_UNARY,
    'GetFeatureSet': cardinality.Cardinality.UNARY_UNARY,
    'SearchFeatureSets': cardinality.Cardinality.UNARY_UNARY,
    'SearchFeatures': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'ga4gh.SequenceAnnotationService', cardinalities, options=stub_options)
Example #7
0
def beta_create_MetricsServiceV2_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import google.logging.v2.logging_metrics_pb2
  import google.logging.v2.logging_metrics_pb2
  import google.logging.v2.logging_metrics_pb2
  import google.logging.v2.logging_metrics_pb2
  import google.logging.v2.logging_metrics_pb2
  import google.logging.v2.logging_metrics_pb2
  import google.logging.v2.logging_metrics_pb2
  import google.logging.v2.logging_metrics_pb2
  import google.logging.v2.logging_metrics_pb2
  import google.protobuf.empty_pb2
  request_serializers = {
    ('google.logging.v2.MetricsServiceV2', 'CreateLogMetric'): google.logging.v2.logging_metrics_pb2.CreateLogMetricRequest.SerializeToString,
    ('google.logging.v2.MetricsServiceV2', 'DeleteLogMetric'): google.logging.v2.logging_metrics_pb2.DeleteLogMetricRequest.SerializeToString,
    ('google.logging.v2.MetricsServiceV2', 'GetLogMetric'): google.logging.v2.logging_metrics_pb2.GetLogMetricRequest.SerializeToString,
    ('google.logging.v2.MetricsServiceV2', 'ListLogMetrics'): google.logging.v2.logging_metrics_pb2.ListLogMetricsRequest.SerializeToString,
    ('google.logging.v2.MetricsServiceV2', 'UpdateLogMetric'): google.logging.v2.logging_metrics_pb2.UpdateLogMetricRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.logging.v2.MetricsServiceV2', 'CreateLogMetric'): google.logging.v2.logging_metrics_pb2.LogMetric.FromString,
    ('google.logging.v2.MetricsServiceV2', 'DeleteLogMetric'): google.protobuf.empty_pb2.Empty.FromString,
    ('google.logging.v2.MetricsServiceV2', 'GetLogMetric'): google.logging.v2.logging_metrics_pb2.LogMetric.FromString,
    ('google.logging.v2.MetricsServiceV2', 'ListLogMetrics'): google.logging.v2.logging_metrics_pb2.ListLogMetricsResponse.FromString,
    ('google.logging.v2.MetricsServiceV2', 'UpdateLogMetric'): google.logging.v2.logging_metrics_pb2.LogMetric.FromString,
  }
  cardinalities = {
    'CreateLogMetric': cardinality.Cardinality.UNARY_UNARY,
    'DeleteLogMetric': cardinality.Cardinality.UNARY_UNARY,
    'GetLogMetric': cardinality.Cardinality.UNARY_UNARY,
    'ListLogMetrics': cardinality.Cardinality.UNARY_UNARY,
    'UpdateLogMetric': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.logging.v2.MetricsServiceV2', cardinalities, options=stub_options)
Example #8
0
def beta_create_SolverService_stub(channel,
                                   host=None,
                                   metadata_transformer=None,
                                   pool=None,
                                   pool_size=None):
    request_serializers = {
        ('deep_qa.SolverService', 'AnswerQuestion'):
        QuestionRequest.SerializeToString,
    }
    response_deserializers = {
        ('deep_qa.SolverService', 'AnswerQuestion'):
        QuestionResponse.FromString,
    }
    cardinalities = {
        'AnswerQuestion': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'deep_qa.SolverService',
                                             cardinalities,
                                             options=stub_options)
  def beta_create_MetricsServiceV2_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('google.logging.v2.MetricsServiceV2', 'CreateLogMetric'): CreateLogMetricRequest.SerializeToString,
      ('google.logging.v2.MetricsServiceV2', 'DeleteLogMetric'): DeleteLogMetricRequest.SerializeToString,
      ('google.logging.v2.MetricsServiceV2', 'GetLogMetric'): GetLogMetricRequest.SerializeToString,
      ('google.logging.v2.MetricsServiceV2', 'ListLogMetrics'): ListLogMetricsRequest.SerializeToString,
      ('google.logging.v2.MetricsServiceV2', 'UpdateLogMetric'): UpdateLogMetricRequest.SerializeToString,
    }
    response_deserializers = {
      ('google.logging.v2.MetricsServiceV2', 'CreateLogMetric'): LogMetric.FromString,
      ('google.logging.v2.MetricsServiceV2', 'DeleteLogMetric'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('google.logging.v2.MetricsServiceV2', 'GetLogMetric'): LogMetric.FromString,
      ('google.logging.v2.MetricsServiceV2', 'ListLogMetrics'): ListLogMetricsResponse.FromString,
      ('google.logging.v2.MetricsServiceV2', 'UpdateLogMetric'): LogMetric.FromString,
    }
    cardinalities = {
      'CreateLogMetric': cardinality.Cardinality.UNARY_UNARY,
      'DeleteLogMetric': cardinality.Cardinality.UNARY_UNARY,
      'GetLogMetric': cardinality.Cardinality.UNARY_UNARY,
      'ListLogMetrics': cardinality.Cardinality.UNARY_UNARY,
      'UpdateLogMetric': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'google.logging.v2.MetricsServiceV2', cardinalities, options=stub_options)
def beta_create_CloudWindmillServiceV1Alpha1_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import windmill_pb2
  import windmill_pb2
  import windmill_pb2
  import windmill_pb2
  import windmill_pb2
  import windmill_pb2
  import windmill_pb2
  import windmill_pb2
  import windmill_pb2
  import windmill_pb2
  request_serializers = {
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'CommitWork'): windmill_pb2.CommitWorkRequest.SerializeToString,
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'GetConfig'): windmill_pb2.GetConfigRequest.SerializeToString,
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'GetData'): windmill_pb2.GetDataRequest.SerializeToString,
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'GetWork'): windmill_pb2.GetWorkRequest.SerializeToString,
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'ReportStats'): windmill_pb2.ReportStatsRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'CommitWork'): windmill_pb2.CommitWorkResponse.FromString,
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'GetConfig'): windmill_pb2.GetConfigResponse.FromString,
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'GetData'): windmill_pb2.GetDataResponse.FromString,
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'GetWork'): windmill_pb2.GetWorkResponse.FromString,
    ('google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', 'ReportStats'): windmill_pb2.ReportStatsResponse.FromString,
  }
  cardinalities = {
    'CommitWork': cardinality.Cardinality.UNARY_UNARY,
    'GetConfig': cardinality.Cardinality.UNARY_UNARY,
    'GetData': cardinality.Cardinality.UNARY_UNARY,
    'GetWork': cardinality.Cardinality.UNARY_UNARY,
    'ReportStats': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.dataflow.windmillservice.v1alpha1.CloudWindmillServiceV1Alpha1', cardinalities, options=stub_options)
Example #11
0
def beta_create_BfDatafeedService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import bftrader_pb2
  import bftrader_pb2
  import bftrader_pb2
  import bftrader_pb2
  import bftrader_pb2
  import bftrader_pb2
  import bftrader_pb2
  import bftrader_pb2
  request_serializers = {
    ('bftrader.bfdatafeed.BfDatafeedService', 'GetBar'): bftrader_pb2.BfGetBarReq.SerializeToString,
    ('bftrader.bfdatafeed.BfDatafeedService', 'GetTickPack'): bftrader_pb2.BfGetTickPackReq.SerializeToString,
    ('bftrader.bfdatafeed.BfDatafeedService', 'InsertBar'): bftrader_pb2.BfBarData.SerializeToString,
    ('bftrader.bfdatafeed.BfDatafeedService', 'InsertTickPack'): bftrader_pb2.BfTickPackData.SerializeToString,
  }
  response_deserializers = {
    ('bftrader.bfdatafeed.BfDatafeedService', 'GetBar'): bftrader_pb2.BfBarData.FromString,
    ('bftrader.bfdatafeed.BfDatafeedService', 'GetTickPack'): bftrader_pb2.BfTickPackData.FromString,
    ('bftrader.bfdatafeed.BfDatafeedService', 'InsertBar'): bftrader_pb2.BfVoid.FromString,
    ('bftrader.bfdatafeed.BfDatafeedService', 'InsertTickPack'): bftrader_pb2.BfVoid.FromString,
  }
  cardinalities = {
    'GetBar': cardinality.Cardinality.UNARY_STREAM,
    'GetTickPack': cardinality.Cardinality.UNARY_STREAM,
    'InsertBar': cardinality.Cardinality.UNARY_UNARY,
    'InsertTickPack': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'bftrader.bfdatafeed.BfDatafeedService', cardinalities, options=stub_options)
Example #12
0
def beta_create_MysqlCtl_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  import mysqlctl_pb2
  request_serializers = {
    ('mysqlctl.MysqlCtl', 'ReinitConfig'): mysqlctl_pb2.ReinitConfigRequest.SerializeToString,
    ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): mysqlctl_pb2.RunMysqlUpgradeRequest.SerializeToString,
    ('mysqlctl.MysqlCtl', 'Shutdown'): mysqlctl_pb2.ShutdownRequest.SerializeToString,
    ('mysqlctl.MysqlCtl', 'Start'): mysqlctl_pb2.StartRequest.SerializeToString,
  }
  response_deserializers = {
    ('mysqlctl.MysqlCtl', 'ReinitConfig'): mysqlctl_pb2.ReinitConfigResponse.FromString,
    ('mysqlctl.MysqlCtl', 'RunMysqlUpgrade'): mysqlctl_pb2.RunMysqlUpgradeResponse.FromString,
    ('mysqlctl.MysqlCtl', 'Shutdown'): mysqlctl_pb2.ShutdownResponse.FromString,
    ('mysqlctl.MysqlCtl', 'Start'): mysqlctl_pb2.StartResponse.FromString,
  }
  cardinalities = {
    'ReinitConfig': cardinality.Cardinality.UNARY_UNARY,
    'RunMysqlUpgrade': cardinality.Cardinality.UNARY_UNARY,
    'Shutdown': cardinality.Cardinality.UNARY_UNARY,
    'Start': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'mysqlctl.MysqlCtl', cardinalities, options=stub_options)
def beta_create_Operations_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import google.longrunning.operations_pb2
  import google.longrunning.operations_pb2
  import google.longrunning.operations_pb2
  import google.longrunning.operations_pb2
  import google.longrunning.operations_pb2
  import google.protobuf.empty_pb2
  import google.longrunning.operations_pb2
  import google.protobuf.empty_pb2
  request_serializers = {
    ('google.longrunning.Operations', 'CancelOperation'): google.longrunning.operations_pb2.CancelOperationRequest.SerializeToString,
    ('google.longrunning.Operations', 'DeleteOperation'): google.longrunning.operations_pb2.DeleteOperationRequest.SerializeToString,
    ('google.longrunning.Operations', 'GetOperation'): google.longrunning.operations_pb2.GetOperationRequest.SerializeToString,
    ('google.longrunning.Operations', 'ListOperations'): google.longrunning.operations_pb2.ListOperationsRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.longrunning.Operations', 'CancelOperation'): google.protobuf.empty_pb2.Empty.FromString,
    ('google.longrunning.Operations', 'DeleteOperation'): google.protobuf.empty_pb2.Empty.FromString,
    ('google.longrunning.Operations', 'GetOperation'): google.longrunning.operations_pb2.Operation.FromString,
    ('google.longrunning.Operations', 'ListOperations'): google.longrunning.operations_pb2.ListOperationsResponse.FromString,
  }
  cardinalities = {
    'CancelOperation': cardinality.Cardinality.UNARY_UNARY,
    'DeleteOperation': cardinality.Cardinality.UNARY_UNARY,
    'GetOperation': cardinality.Cardinality.UNARY_UNARY,
    'ListOperations': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.longrunning.Operations', cardinalities, options=stub_options)
Example #14
0
  def beta_create_BigtableService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('google.bigtable.v1.BigtableService', 'CheckAndMutateRow'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.CheckAndMutateRowRequest.SerializeToString,
      ('google.bigtable.v1.BigtableService', 'MutateRow'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.MutateRowRequest.SerializeToString,
      ('google.bigtable.v1.BigtableService', 'MutateRows'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.MutateRowsRequest.SerializeToString,
      ('google.bigtable.v1.BigtableService', 'ReadModifyWriteRow'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.ReadModifyWriteRowRequest.SerializeToString,
      ('google.bigtable.v1.BigtableService', 'ReadRows'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.ReadRowsRequest.SerializeToString,
      ('google.bigtable.v1.BigtableService', 'SampleRowKeys'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.SampleRowKeysRequest.SerializeToString,
    }
    response_deserializers = {
      ('google.bigtable.v1.BigtableService', 'CheckAndMutateRow'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.CheckAndMutateRowResponse.FromString,
      ('google.bigtable.v1.BigtableService', 'MutateRow'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('google.bigtable.v1.BigtableService', 'MutateRows'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.MutateRowsResponse.FromString,
      ('google.bigtable.v1.BigtableService', 'ReadModifyWriteRow'): google_dot_bigtable_dot_v1_dot_bigtable__data__pb2.Row.FromString,
      ('google.bigtable.v1.BigtableService', 'ReadRows'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.ReadRowsResponse.FromString,
      ('google.bigtable.v1.BigtableService', 'SampleRowKeys'): google_dot_bigtable_dot_v1_dot_bigtable__service__messages__pb2.SampleRowKeysResponse.FromString,
    }
    cardinalities = {
      'CheckAndMutateRow': cardinality.Cardinality.UNARY_UNARY,
      'MutateRow': cardinality.Cardinality.UNARY_UNARY,
      'MutateRows': cardinality.Cardinality.UNARY_UNARY,
      'ReadModifyWriteRow': cardinality.Cardinality.UNARY_UNARY,
      'ReadRows': cardinality.Cardinality.UNARY_STREAM,
      'SampleRowKeys': cardinality.Cardinality.UNARY_STREAM,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'google.bigtable.v1.BigtableService', cardinalities, options=stub_options)
Example #15
0
def beta_create_BfKvService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  request_serializers = {
    ('bfkv.BfKvService', 'GetKv'): bfgateway__pb2.BfKvData.SerializeToString,
    ('bfkv.BfKvService', 'Ping'): bfgateway__pb2.BfPingData.SerializeToString,
    ('bfkv.BfKvService', 'PingStreamC'): google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
    ('bfkv.BfKvService', 'PingStreamCS'): google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
    ('bfkv.BfKvService', 'PingStreamS'): google_dot_protobuf_dot_any__pb2.Any.SerializeToString,
    ('bfkv.BfKvService', 'SetKv'): bfgateway__pb2.BfKvData.SerializeToString,
  }
  response_deserializers = {
    ('bfkv.BfKvService', 'GetKv'): bfgateway__pb2.BfKvData.FromString,
    ('bfkv.BfKvService', 'Ping'): bfgateway__pb2.BfPingData.FromString,
    ('bfkv.BfKvService', 'PingStreamC'): google_dot_protobuf_dot_any__pb2.Any.FromString,
    ('bfkv.BfKvService', 'PingStreamCS'): google_dot_protobuf_dot_any__pb2.Any.FromString,
    ('bfkv.BfKvService', 'PingStreamS'): google_dot_protobuf_dot_any__pb2.Any.FromString,
    ('bfkv.BfKvService', 'SetKv'): bfgateway__pb2.BfVoid.FromString,
  }
  cardinalities = {
    'GetKv': cardinality.Cardinality.UNARY_UNARY,
    'Ping': cardinality.Cardinality.UNARY_UNARY,
    'PingStreamC': cardinality.Cardinality.STREAM_UNARY,
    'PingStreamCS': cardinality.Cardinality.STREAM_STREAM,
    'PingStreamS': cardinality.Cardinality.UNARY_STREAM,
    'SetKv': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'bfkv.BfKvService', cardinalities, options=stub_options)
Example #16
0
def beta_create_Image_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  """The Beta API is deprecated for 0.15.0 and later.

  It is recommended to use the GA API (classes and functions in this
  file not marked beta) for all further purposes. This function was
  generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
  request_serializers = {
    ('imageprocess.Image', 'DetectElements'): ImgRequest.SerializeToString,
    ('imageprocess.Image', 'Draw'): ImgRequest.SerializeToString,
    ('imageprocess.Image', 'FindImage'): FindImgRequest.SerializeToString,
    ('imageprocess.Image', 'OCR'): ImgRequest.SerializeToString,
  }
  response_deserializers = {
    ('imageprocess.Image', 'DetectElements'): ElementRect.FromString,
    ('imageprocess.Image', 'Draw'): ImgReply.FromString,
    ('imageprocess.Image', 'FindImage'): ElementPos.FromString,
    ('imageprocess.Image', 'OCR'): TxtReply.FromString,
  }
  cardinalities = {
    'DetectElements': cardinality.Cardinality.UNARY_STREAM,
    'Draw': cardinality.Cardinality.UNARY_UNARY,
    'FindImage': cardinality.Cardinality.UNARY_UNARY,
    'OCR': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'imageprocess.Image', cardinalities, options=stub_options)
def beta_create_BioMetadataService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import ga4gh.bio_metadata_service_pb2
  import ga4gh.bio_metadata_service_pb2
  import ga4gh.bio_metadata_service_pb2
  import ga4gh.bio_metadata_service_pb2
  import ga4gh.bio_metadata_service_pb2
  import ga4gh.bio_metadata_pb2
  import ga4gh.bio_metadata_service_pb2
  import ga4gh.bio_metadata_pb2
  request_serializers = {
    ('ga4gh.BioMetadataService', 'GetBioSample'): ga4gh.bio_metadata_service_pb2.GetBioSampleRequest.SerializeToString,
    ('ga4gh.BioMetadataService', 'GetIndividual'): ga4gh.bio_metadata_service_pb2.GetIndividualRequest.SerializeToString,
    ('ga4gh.BioMetadataService', 'SearchBioSamples'): ga4gh.bio_metadata_service_pb2.SearchBioSamplesRequest.SerializeToString,
    ('ga4gh.BioMetadataService', 'SearchIndividuals'): ga4gh.bio_metadata_service_pb2.SearchIndividualsRequest.SerializeToString,
  }
  response_deserializers = {
    ('ga4gh.BioMetadataService', 'GetBioSample'): ga4gh.bio_metadata_pb2.BioSample.FromString,
    ('ga4gh.BioMetadataService', 'GetIndividual'): ga4gh.bio_metadata_pb2.Individual.FromString,
    ('ga4gh.BioMetadataService', 'SearchBioSamples'): ga4gh.bio_metadata_service_pb2.SearchBioSamplesResponse.FromString,
    ('ga4gh.BioMetadataService', 'SearchIndividuals'): ga4gh.bio_metadata_service_pb2.SearchIndividualsResponse.FromString,
  }
  cardinalities = {
    'GetBioSample': cardinality.Cardinality.UNARY_UNARY,
    'GetIndividual': cardinality.Cardinality.UNARY_UNARY,
    'SearchBioSamples': cardinality.Cardinality.UNARY_UNARY,
    'SearchIndividuals': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'ga4gh.BioMetadataService', cardinalities, options=stub_options)
Example #18
0
    def beta_create_Authorization_stub(channel,
                                       host=None,
                                       metadata_transformer=None,
                                       pool=None,
                                       pool_size=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_serializers = {
            ('envoy.service.auth.v2alpha.Authorization', 'Check'):
            envoy_dot_service_dot_auth_dot_v2_dot_external__auth__pb2.
            CheckRequest.SerializeToString,
        }
        response_deserializers = {
            ('envoy.service.auth.v2alpha.Authorization', 'Check'):
            envoy_dot_service_dot_auth_dot_v2_dot_external__auth__pb2.
            CheckResponse.FromString,
        }
        cardinalities = {
            'Check': cardinality.Cardinality.UNARY_UNARY,
        }
        stub_options = beta_implementations.stub_options(
            host=host,
            metadata_transformer=metadata_transformer,
            request_serializers=request_serializers,
            response_deserializers=response_deserializers,
            thread_pool=pool,
            thread_pool_size=pool_size)
        return beta_implementations.dynamic_stub(
            channel,
            'envoy.service.auth.v2alpha.Authorization',
            cardinalities,
            options=stub_options)
Example #19
0
def beta_create_RouteGuide_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  import route_guide_pb2
  request_serializers = {
    ('routeguide.RouteGuide', 'GetFeature'): route_guide_pb2.Point.SerializeToString,
    ('routeguide.RouteGuide', 'ListFeatures'): route_guide_pb2.Rectangle.SerializeToString,
    ('routeguide.RouteGuide', 'RecordRoute'): route_guide_pb2.Point.SerializeToString,
    ('routeguide.RouteGuide', 'RouteChat'): route_guide_pb2.RouteNote.SerializeToString,
  }
  response_deserializers = {
    ('routeguide.RouteGuide', 'GetFeature'): route_guide_pb2.Feature.FromString,
    ('routeguide.RouteGuide', 'ListFeatures'): route_guide_pb2.Feature.FromString,
    ('routeguide.RouteGuide', 'RecordRoute'): route_guide_pb2.RouteSummary.FromString,
    ('routeguide.RouteGuide', 'RouteChat'): route_guide_pb2.RouteNote.FromString,
  }
  cardinalities = {
    'GetFeature': cardinality.Cardinality.UNARY_UNARY,
    'ListFeatures': cardinality.Cardinality.UNARY_STREAM,
    'RecordRoute': cardinality.Cardinality.STREAM_UNARY,
    'RouteChat': cardinality.Cardinality.STREAM_STREAM,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'routeguide.RouteGuide', cardinalities, options=stub_options)
Example #20
0
def beta_create_Deployer_stub(channel,
                              host=None,
                              metadata_transformer=None,
                              pool=None,
                              pool_size=None):
    request_serializers = {
        ('deployment.Deployer', 'Deploy'):
        DeploymentRequest.SerializeToString,
        ('deployment.Deployer', 'ListDeploymentEvents'):
        ListDeploymentEventsRequest.SerializeToString,
    }
    response_deserializers = {
        ('deployment.Deployer', 'Deploy'):
        DeploymentEvent.FromString,
        ('deployment.Deployer', 'ListDeploymentEvents'):
        DeploymentEvent.FromString,
    }
    cardinalities = {
        'Deploy': cardinality.Cardinality.UNARY_STREAM,
        'ListDeploymentEvents': cardinality.Cardinality.UNARY_STREAM,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'deployment.Deployer',
                                             cardinalities,
                                             options=stub_options)
Example #21
0
  def beta_create_Admin_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('protos.Admin', 'GetModuleLogLevel'): LogLevelRequest.SerializeToString,
      ('protos.Admin', 'GetStatus'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ('protos.Admin', 'SetModuleLogLevel'): LogLevelRequest.SerializeToString,
      ('protos.Admin', 'StartServer'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ('protos.Admin', 'StopServer'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
    }
    response_deserializers = {
      ('protos.Admin', 'GetModuleLogLevel'): LogLevelResponse.FromString,
      ('protos.Admin', 'GetStatus'): ServerStatus.FromString,
      ('protos.Admin', 'SetModuleLogLevel'): LogLevelResponse.FromString,
      ('protos.Admin', 'StartServer'): ServerStatus.FromString,
      ('protos.Admin', 'StopServer'): ServerStatus.FromString,
    }
    cardinalities = {
      'GetModuleLogLevel': cardinality.Cardinality.UNARY_UNARY,
      'GetStatus': cardinality.Cardinality.UNARY_UNARY,
      'SetModuleLogLevel': cardinality.Cardinality.UNARY_UNARY,
      'StartServer': cardinality.Cardinality.UNARY_UNARY,
      'StopServer': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'protos.Admin', cardinalities, options=stub_options)
Example #22
0
def beta_create_ImageNet_stub(channel,
                              host=None,
                              metadata_transformer=None,
                              pool=None,
                              pool_size=None):
    import imagenet_pb2
    import imagenet_pb2
    request_serializers = {
        ('ws.palladian.kaggle.restaurants.features.imagenet.ImageNet', 'Classify'):
        imagenet_pb2.Image.SerializeToString,
    }
    response_deserializers = {
        ('ws.palladian.kaggle.restaurants.features.imagenet.ImageNet', 'Classify'):
        imagenet_pb2.Categories.FromString,
    }
    cardinalities = {
        'Classify': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(
        channel,
        'ws.palladian.kaggle.restaurants.features.imagenet.ImageNet',
        cardinalities,
        options=stub_options)
Example #23
0
def beta_create_Bigtable_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  request_serializers = {
    ('google.bigtable.v2.Bigtable', 'CheckAndMutateRow'): CheckAndMutateRowRequest.SerializeToString,
    ('google.bigtable.v2.Bigtable', 'MutateRow'): MutateRowRequest.SerializeToString,
    ('google.bigtable.v2.Bigtable', 'MutateRows'): MutateRowsRequest.SerializeToString,
    ('google.bigtable.v2.Bigtable', 'ReadModifyWriteRow'): ReadModifyWriteRowRequest.SerializeToString,
    ('google.bigtable.v2.Bigtable', 'ReadRows'): ReadRowsRequest.SerializeToString,
    ('google.bigtable.v2.Bigtable', 'SampleRowKeys'): SampleRowKeysRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.bigtable.v2.Bigtable', 'CheckAndMutateRow'): CheckAndMutateRowResponse.FromString,
    ('google.bigtable.v2.Bigtable', 'MutateRow'): MutateRowResponse.FromString,
    ('google.bigtable.v2.Bigtable', 'MutateRows'): MutateRowsResponse.FromString,
    ('google.bigtable.v2.Bigtable', 'ReadModifyWriteRow'): ReadModifyWriteRowResponse.FromString,
    ('google.bigtable.v2.Bigtable', 'ReadRows'): ReadRowsResponse.FromString,
    ('google.bigtable.v2.Bigtable', 'SampleRowKeys'): SampleRowKeysResponse.FromString,
  }
  cardinalities = {
    'CheckAndMutateRow': cardinality.Cardinality.UNARY_UNARY,
    'MutateRow': cardinality.Cardinality.UNARY_UNARY,
    'MutateRows': cardinality.Cardinality.UNARY_STREAM,
    'ReadModifyWriteRow': cardinality.Cardinality.UNARY_UNARY,
    'ReadRows': cardinality.Cardinality.UNARY_STREAM,
    'SampleRowKeys': cardinality.Cardinality.UNARY_STREAM,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.bigtable.v2.Bigtable', cardinalities, options=stub_options)
Example #24
0
def beta_create_UberAPIService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import uber_pb2
  import uber_pb2
  import uber_pb2
  import uber_pb2
  import uber_pb2
  import uber_pb2
  import google.protobuf.empty_pb2
  import uber_pb2
  import uber_pb2
  import uber_pb2
  request_serializers = {
    ('uberapi.UberAPIService', 'GetEstimatesPrice'): uber_pb2.GetEstimatesPriceRequest.SerializeToString,
    ('uberapi.UberAPIService', 'GetEstimatesTime'): uber_pb2.GetEstimatesTimeRequest.SerializeToString,
    ('uberapi.UberAPIService', 'GetHistory'): uber_pb2.GetHistoryRequest.SerializeToString,
    ('uberapi.UberAPIService', 'GetMe'): google.protobuf.empty_pb2.Empty.SerializeToString,
    ('uberapi.UberAPIService', 'GetProducts'): uber_pb2.GetProductsRequest.SerializeToString,
  }
  response_deserializers = {
    ('uberapi.UberAPIService', 'GetEstimatesPrice'): uber_pb2.GetEstimatesPriceResponse.FromString,
    ('uberapi.UberAPIService', 'GetEstimatesTime'): uber_pb2.GetEstimatesTimeResponse.FromString,
    ('uberapi.UberAPIService', 'GetHistory'): uber_pb2.Activities.FromString,
    ('uberapi.UberAPIService', 'GetMe'): uber_pb2.Profile.FromString,
    ('uberapi.UberAPIService', 'GetProducts'): uber_pb2.GetProductsResponse.FromString,
  }
  cardinalities = {
    'GetEstimatesPrice': cardinality.Cardinality.UNARY_UNARY,
    'GetEstimatesTime': cardinality.Cardinality.UNARY_UNARY,
    'GetHistory': cardinality.Cardinality.UNARY_UNARY,
    'GetMe': cardinality.Cardinality.UNARY_UNARY,
    'GetProducts': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'uberapi.UberAPIService', cardinalities, options=stub_options)
def beta_create_BigtableService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import google.protobuf.empty_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_service_messages_pb2
  import gcloud.bigtable._generated.bigtable_data_pb2
  request_serializers = {
    ('google.bigtable.v1.BigtableService', 'CheckAndMutateRow'): gcloud.bigtable._generated.bigtable_service_messages_pb2.CheckAndMutateRowRequest.SerializeToString,
    ('google.bigtable.v1.BigtableService', 'MutateRow'): gcloud.bigtable._generated.bigtable_service_messages_pb2.MutateRowRequest.SerializeToString,
    ('google.bigtable.v1.BigtableService', 'ReadModifyWriteRow'): gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadModifyWriteRowRequest.SerializeToString,
    ('google.bigtable.v1.BigtableService', 'ReadRows'): gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadRowsRequest.SerializeToString,
    ('google.bigtable.v1.BigtableService', 'SampleRowKeys'): gcloud.bigtable._generated.bigtable_service_messages_pb2.SampleRowKeysRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.bigtable.v1.BigtableService', 'CheckAndMutateRow'): gcloud.bigtable._generated.bigtable_service_messages_pb2.CheckAndMutateRowResponse.FromString,
    ('google.bigtable.v1.BigtableService', 'MutateRow'): google.protobuf.empty_pb2.Empty.FromString,
    ('google.bigtable.v1.BigtableService', 'ReadModifyWriteRow'): gcloud.bigtable._generated.bigtable_data_pb2.Row.FromString,
    ('google.bigtable.v1.BigtableService', 'ReadRows'): gcloud.bigtable._generated.bigtable_service_messages_pb2.ReadRowsResponse.FromString,
    ('google.bigtable.v1.BigtableService', 'SampleRowKeys'): gcloud.bigtable._generated.bigtable_service_messages_pb2.SampleRowKeysResponse.FromString,
  }
  cardinalities = {
    'CheckAndMutateRow': cardinality.Cardinality.UNARY_UNARY,
    'MutateRow': cardinality.Cardinality.UNARY_UNARY,
    'ReadModifyWriteRow': cardinality.Cardinality.UNARY_UNARY,
    'ReadRows': cardinality.Cardinality.UNARY_STREAM,
    'SampleRowKeys': cardinality.Cardinality.UNARY_STREAM,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.bigtable.v1.BigtableService', cardinalities, options=stub_options)
Example #26
0
def beta_create_Vitess_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  request_serializers = {
    ('vtgateservice.Vitess', 'Begin'): vtgate__pb2.BeginRequest.SerializeToString,
    ('vtgateservice.Vitess', 'Commit'): vtgate__pb2.CommitRequest.SerializeToString,
    ('vtgateservice.Vitess', 'Execute'): vtgate__pb2.ExecuteRequest.SerializeToString,
    ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate__pb2.ExecuteBatchKeyspaceIdsRequest.SerializeToString,
    ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate__pb2.ExecuteBatchShardsRequest.SerializeToString,
    ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate__pb2.ExecuteEntityIdsRequest.SerializeToString,
    ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate__pb2.ExecuteKeyRangesRequest.SerializeToString,
    ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate__pb2.ExecuteKeyspaceIdsRequest.SerializeToString,
    ('vtgateservice.Vitess', 'ExecuteShards'): vtgate__pb2.ExecuteShardsRequest.SerializeToString,
    ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate__pb2.GetSrvKeyspaceRequest.SerializeToString,
    ('vtgateservice.Vitess', 'Rollback'): vtgate__pb2.RollbackRequest.SerializeToString,
    ('vtgateservice.Vitess', 'SplitQuery'): vtgate__pb2.SplitQueryRequest.SerializeToString,
    ('vtgateservice.Vitess', 'StreamExecute'): vtgate__pb2.StreamExecuteRequest.SerializeToString,
    ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate__pb2.StreamExecuteKeyRangesRequest.SerializeToString,
    ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate__pb2.StreamExecuteKeyspaceIdsRequest.SerializeToString,
    ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate__pb2.StreamExecuteShardsRequest.SerializeToString,
    ('vtgateservice.Vitess', 'UpdateStream'): vtgate__pb2.UpdateStreamRequest.SerializeToString,
  }
  response_deserializers = {
    ('vtgateservice.Vitess', 'Begin'): vtgate__pb2.BeginResponse.FromString,
    ('vtgateservice.Vitess', 'Commit'): vtgate__pb2.CommitResponse.FromString,
    ('vtgateservice.Vitess', 'Execute'): vtgate__pb2.ExecuteResponse.FromString,
    ('vtgateservice.Vitess', 'ExecuteBatchKeyspaceIds'): vtgate__pb2.ExecuteBatchKeyspaceIdsResponse.FromString,
    ('vtgateservice.Vitess', 'ExecuteBatchShards'): vtgate__pb2.ExecuteBatchShardsResponse.FromString,
    ('vtgateservice.Vitess', 'ExecuteEntityIds'): vtgate__pb2.ExecuteEntityIdsResponse.FromString,
    ('vtgateservice.Vitess', 'ExecuteKeyRanges'): vtgate__pb2.ExecuteKeyRangesResponse.FromString,
    ('vtgateservice.Vitess', 'ExecuteKeyspaceIds'): vtgate__pb2.ExecuteKeyspaceIdsResponse.FromString,
    ('vtgateservice.Vitess', 'ExecuteShards'): vtgate__pb2.ExecuteShardsResponse.FromString,
    ('vtgateservice.Vitess', 'GetSrvKeyspace'): vtgate__pb2.GetSrvKeyspaceResponse.FromString,
    ('vtgateservice.Vitess', 'Rollback'): vtgate__pb2.RollbackResponse.FromString,
    ('vtgateservice.Vitess', 'SplitQuery'): vtgate__pb2.SplitQueryResponse.FromString,
    ('vtgateservice.Vitess', 'StreamExecute'): vtgate__pb2.StreamExecuteResponse.FromString,
    ('vtgateservice.Vitess', 'StreamExecuteKeyRanges'): vtgate__pb2.StreamExecuteKeyRangesResponse.FromString,
    ('vtgateservice.Vitess', 'StreamExecuteKeyspaceIds'): vtgate__pb2.StreamExecuteKeyspaceIdsResponse.FromString,
    ('vtgateservice.Vitess', 'StreamExecuteShards'): vtgate__pb2.StreamExecuteShardsResponse.FromString,
    ('vtgateservice.Vitess', 'UpdateStream'): vtgate__pb2.UpdateStreamResponse.FromString,
  }
  cardinalities = {
    'Begin': cardinality.Cardinality.UNARY_UNARY,
    'Commit': cardinality.Cardinality.UNARY_UNARY,
    'Execute': cardinality.Cardinality.UNARY_UNARY,
    'ExecuteBatchKeyspaceIds': cardinality.Cardinality.UNARY_UNARY,
    'ExecuteBatchShards': cardinality.Cardinality.UNARY_UNARY,
    'ExecuteEntityIds': cardinality.Cardinality.UNARY_UNARY,
    'ExecuteKeyRanges': cardinality.Cardinality.UNARY_UNARY,
    'ExecuteKeyspaceIds': cardinality.Cardinality.UNARY_UNARY,
    'ExecuteShards': cardinality.Cardinality.UNARY_UNARY,
    'GetSrvKeyspace': cardinality.Cardinality.UNARY_UNARY,
    'Rollback': cardinality.Cardinality.UNARY_UNARY,
    'SplitQuery': cardinality.Cardinality.UNARY_UNARY,
    'StreamExecute': cardinality.Cardinality.UNARY_STREAM,
    'StreamExecuteKeyRanges': cardinality.Cardinality.UNARY_STREAM,
    'StreamExecuteKeyspaceIds': cardinality.Cardinality.UNARY_STREAM,
    'StreamExecuteShards': cardinality.Cardinality.UNARY_STREAM,
    'UpdateStream': cardinality.Cardinality.UNARY_STREAM,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'vtgateservice.Vitess', cardinalities, options=stub_options)
Example #27
0
def beta_create_JobUpload_stub(channel,
                               host=None,
                               metadata_transformer=None,
                               pool=None,
                               pool_size=None):
    request_serializers = {
        ('JobUpload', 'param'): parameters.SerializeToString,
        ('JobUpload', 'upload'): line.SerializeToString,
    }
    response_deserializers = {
        ('JobUpload', 'param'): Status.FromString,
        ('JobUpload', 'upload'): Status.FromString,
    }
    cardinalities = {
        'param': cardinality.Cardinality.UNARY_UNARY,
        'upload': cardinality.Cardinality.STREAM_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'JobUpload',
                                             cardinalities,
                                             options=stub_options)
def beta_create_VariantService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  request_serializers = {
    ('ga4gh.VariantService', 'GetCallSet'): GetCallSetRequest.SerializeToString,
    ('ga4gh.VariantService', 'GetVariant'): GetVariantRequest.SerializeToString,
    ('ga4gh.VariantService', 'GetVariantSet'): GetVariantSetRequest.SerializeToString,
    ('ga4gh.VariantService', 'SearchCallSets'): SearchCallSetsRequest.SerializeToString,
    ('ga4gh.VariantService', 'SearchVariantSets'): SearchVariantSetsRequest.SerializeToString,
    ('ga4gh.VariantService', 'SearchVariants'): SearchVariantsRequest.SerializeToString,
  }
  response_deserializers = {
    ('ga4gh.VariantService', 'GetCallSet'): ga4gh_dot_variants__pb2.CallSet.FromString,
    ('ga4gh.VariantService', 'GetVariant'): ga4gh_dot_variants__pb2.Variant.FromString,
    ('ga4gh.VariantService', 'GetVariantSet'): ga4gh_dot_variants__pb2.VariantSet.FromString,
    ('ga4gh.VariantService', 'SearchCallSets'): SearchCallSetsResponse.FromString,
    ('ga4gh.VariantService', 'SearchVariantSets'): SearchVariantSetsResponse.FromString,
    ('ga4gh.VariantService', 'SearchVariants'): ga4gh_dot_variants__pb2.Variant.FromString,
  }
  cardinalities = {
    'GetCallSet': cardinality.Cardinality.UNARY_UNARY,
    'GetVariant': cardinality.Cardinality.UNARY_UNARY,
    'GetVariantSet': cardinality.Cardinality.UNARY_UNARY,
    'SearchCallSets': cardinality.Cardinality.UNARY_UNARY,
    'SearchVariantSets': cardinality.Cardinality.UNARY_UNARY,
    'SearchVariants': cardinality.Cardinality.UNARY_STREAM,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'ga4gh.VariantService', cardinalities, options=stub_options)
Example #29
0
  def beta_create_LoggingServiceV2_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('google.logging.v2.LoggingServiceV2', 'DeleteLog'): DeleteLogRequest.SerializeToString,
      ('google.logging.v2.LoggingServiceV2', 'ListLogEntries'): ListLogEntriesRequest.SerializeToString,
      ('google.logging.v2.LoggingServiceV2', 'ListLogs'): ListLogsRequest.SerializeToString,
      ('google.logging.v2.LoggingServiceV2', 'ListMonitoredResourceDescriptors'): ListMonitoredResourceDescriptorsRequest.SerializeToString,
      ('google.logging.v2.LoggingServiceV2', 'WriteLogEntries'): WriteLogEntriesRequest.SerializeToString,
    }
    response_deserializers = {
      ('google.logging.v2.LoggingServiceV2', 'DeleteLog'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('google.logging.v2.LoggingServiceV2', 'ListLogEntries'): ListLogEntriesResponse.FromString,
      ('google.logging.v2.LoggingServiceV2', 'ListLogs'): ListLogsResponse.FromString,
      ('google.logging.v2.LoggingServiceV2', 'ListMonitoredResourceDescriptors'): ListMonitoredResourceDescriptorsResponse.FromString,
      ('google.logging.v2.LoggingServiceV2', 'WriteLogEntries'): WriteLogEntriesResponse.FromString,
    }
    cardinalities = {
      'DeleteLog': cardinality.Cardinality.UNARY_UNARY,
      'ListLogEntries': cardinality.Cardinality.UNARY_UNARY,
      'ListLogs': cardinality.Cardinality.UNARY_UNARY,
      'ListMonitoredResourceDescriptors': cardinality.Cardinality.UNARY_UNARY,
      'WriteLogEntries': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'google.logging.v2.LoggingServiceV2', cardinalities, options=stub_options)
Example #30
0
def beta_create_MetricService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  request_serializers = {
    ('google.monitoring.v3.MetricService', 'CreateMetricDescriptor'): CreateMetricDescriptorRequest.SerializeToString,
    ('google.monitoring.v3.MetricService', 'CreateTimeSeries'): CreateTimeSeriesRequest.SerializeToString,
    ('google.monitoring.v3.MetricService', 'DeleteMetricDescriptor'): DeleteMetricDescriptorRequest.SerializeToString,
    ('google.monitoring.v3.MetricService', 'GetMetricDescriptor'): GetMetricDescriptorRequest.SerializeToString,
    ('google.monitoring.v3.MetricService', 'GetMonitoredResourceDescriptor'): GetMonitoredResourceDescriptorRequest.SerializeToString,
    ('google.monitoring.v3.MetricService', 'ListMetricDescriptors'): ListMetricDescriptorsRequest.SerializeToString,
    ('google.monitoring.v3.MetricService', 'ListMonitoredResourceDescriptors'): ListMonitoredResourceDescriptorsRequest.SerializeToString,
    ('google.monitoring.v3.MetricService', 'ListTimeSeries'): ListTimeSeriesRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.monitoring.v3.MetricService', 'CreateMetricDescriptor'): google_dot_api_dot_metric__pb2.MetricDescriptor.FromString,
    ('google.monitoring.v3.MetricService', 'CreateTimeSeries'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
    ('google.monitoring.v3.MetricService', 'DeleteMetricDescriptor'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
    ('google.monitoring.v3.MetricService', 'GetMetricDescriptor'): google_dot_api_dot_metric__pb2.MetricDescriptor.FromString,
    ('google.monitoring.v3.MetricService', 'GetMonitoredResourceDescriptor'): google_dot_api_dot_monitored__resource__pb2.MonitoredResourceDescriptor.FromString,
    ('google.monitoring.v3.MetricService', 'ListMetricDescriptors'): ListMetricDescriptorsResponse.FromString,
    ('google.monitoring.v3.MetricService', 'ListMonitoredResourceDescriptors'): ListMonitoredResourceDescriptorsResponse.FromString,
    ('google.monitoring.v3.MetricService', 'ListTimeSeries'): ListTimeSeriesResponse.FromString,
  }
  cardinalities = {
    'CreateMetricDescriptor': cardinality.Cardinality.UNARY_UNARY,
    'CreateTimeSeries': cardinality.Cardinality.UNARY_UNARY,
    'DeleteMetricDescriptor': cardinality.Cardinality.UNARY_UNARY,
    'GetMetricDescriptor': cardinality.Cardinality.UNARY_UNARY,
    'GetMonitoredResourceDescriptor': cardinality.Cardinality.UNARY_UNARY,
    'ListMetricDescriptors': cardinality.Cardinality.UNARY_UNARY,
    'ListMonitoredResourceDescriptors': cardinality.Cardinality.UNARY_UNARY,
    'ListTimeSeries': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.monitoring.v3.MetricService', cardinalities, options=stub_options)
Example #31
0
  def beta_create_IPython_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('ipython.IPython', 'cancel'): CancelRequest.SerializeToString,
      ('ipython.IPython', 'complete'): CompletionRequest.SerializeToString,
      ('ipython.IPython', 'execute'): ExecuteRequest.SerializeToString,
      ('ipython.IPython', 'status'): StatusRequest.SerializeToString,
      ('ipython.IPython', 'stop'): StopRequest.SerializeToString,
    }
    response_deserializers = {
      ('ipython.IPython', 'cancel'): CancelResponse.FromString,
      ('ipython.IPython', 'complete'): CompletionResponse.FromString,
      ('ipython.IPython', 'execute'): ExecuteResponse.FromString,
      ('ipython.IPython', 'status'): StatusResponse.FromString,
      ('ipython.IPython', 'stop'): StopResponse.FromString,
    }
    cardinalities = {
      'cancel': cardinality.Cardinality.UNARY_UNARY,
      'complete': cardinality.Cardinality.UNARY_UNARY,
      'execute': cardinality.Cardinality.UNARY_STREAM,
      'status': cardinality.Cardinality.UNARY_UNARY,
      'stop': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'ipython.IPython', cardinalities, options=stub_options)
Example #32
0
def beta_create_KV_stub(channel,
                        host=None,
                        metadata_transformer=None,
                        pool=None,
                        pool_size=None):
    import kv_pb2
    import kv_pb2
    import kv_pb2
    import kv_pb2
    request_serializers = {
        ('kv.KV', 'Get'): kv_pb2.GetRequest.SerializeToString,
        ('kv.KV', 'Set'): kv_pb2.SetRequest.SerializeToString,
    }
    response_deserializers = {
        ('kv.KV', 'Get'): kv_pb2.GetResponse.FromString,
        ('kv.KV', 'Set'): kv_pb2.SetResponse.FromString,
    }
    cardinalities = {
        'Get': cardinality.Cardinality.UNARY_UNARY,
        'Set': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'kv.KV',
                                             cardinalities,
                                             options=stub_options)
def beta_create_MnistService_stub(channel,
                                  host=None,
                                  metadata_transformer=None,
                                  pool=None,
                                  pool_size=None):
    import mnist_inference_pb2
    import mnist_inference_pb2
    request_serializers = {
        ('tensorflow.serving.MnistService', 'Classify'):
        mnist_inference_pb2.MnistRequest.SerializeToString,
    }
    response_deserializers = {
        ('tensorflow.serving.MnistService', 'Classify'):
        mnist_inference_pb2.MnistResponse.FromString,
    }
    cardinalities = {
        'Classify': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'tensorflow.serving.MnistService',
                                             cardinalities,
                                             options=stub_options)
Example #34
0
def beta_create_PredictionService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  """The Beta API is deprecated for 0.15.0 and later.

  It is recommended to use the GA API (classes and functions in this
  file not marked beta) for all further purposes. This function was
  generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
  request_serializers = {
    ('tensorflow.serving.PredictionService', 'Classify'): tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationRequest.SerializeToString,
    ('tensorflow.serving.PredictionService', 'GetModelMetadata'): tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataRequest.SerializeToString,
    ('tensorflow.serving.PredictionService', 'Predict'): tensorflow__serving_dot_apis_dot_predict__pb2.PredictRequest.SerializeToString,
    ('tensorflow.serving.PredictionService', 'Regress'): tensorflow__serving_dot_apis_dot_regression__pb2.RegressionRequest.SerializeToString,
  }
  response_deserializers = {
    ('tensorflow.serving.PredictionService', 'Classify'): tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationResponse.FromString,
    ('tensorflow.serving.PredictionService', 'GetModelMetadata'): tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataResponse.FromString,
    ('tensorflow.serving.PredictionService', 'Predict'): tensorflow__serving_dot_apis_dot_predict__pb2.PredictResponse.FromString,
    ('tensorflow.serving.PredictionService', 'Regress'): tensorflow__serving_dot_apis_dot_regression__pb2.RegressionResponse.FromString,
  }
  cardinalities = {
    'Classify': cardinality.Cardinality.UNARY_UNARY,
    'GetModelMetadata': cardinality.Cardinality.UNARY_UNARY,
    'Predict': cardinality.Cardinality.UNARY_UNARY,
    'Regress': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'tensorflow.serving.PredictionService', cardinalities, options=stub_options)
Example #35
0
def beta_create_Candidate_stub(channel,
                               host=None,
                               metadata_transformer=None,
                               pool=None,
                               pool_size=None):
    import debate_pb2
    import debate_pb2
    import debate_pb2
    import debate_pb2
    request_serializers = {
        ('debate.Candidate', 'Answer'):
        debate_pb2.AnswerRequest.SerializeToString,
        ('debate.Candidate', 'Elaborate'):
        debate_pb2.ElaborateRequest.SerializeToString,
    }
    response_deserializers = {
        ('debate.Candidate', 'Answer'): debate_pb2.AnswerReply.FromString,
        ('debate.Candidate', 'Elaborate'):
        debate_pb2.ElaborateReply.FromString,
    }
    cardinalities = {
        'Answer': cardinality.Cardinality.UNARY_UNARY,
        'Elaborate': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'debate.Candidate',
                                             cardinalities,
                                             options=stub_options)
Example #36
0
def beta_create_BrocadeTelemetrySystemData_service_stub(
        channel,
        host=None,
        metadata_transformer=None,
        pool=None,
        pool_size=None):
    request_serializers = {
        ('telemetry_system_stats.BrocadeTelemetrySystemData_service', 'BrocadeTelemetrySystemData'):
        BrocadeTelemetrySystemData_request.SerializeToString,
    }
    response_deserializers = {
        ('telemetry_system_stats.BrocadeTelemetrySystemData_service', 'BrocadeTelemetrySystemData'):
        BrocadeTelemetrySystemData_response.FromString,
    }
    cardinalities = {
        'BrocadeTelemetrySystemData': cardinality.Cardinality.UNARY_STREAM,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(
        channel,
        'telemetry_system_stats.BrocadeTelemetrySystemData_service',
        cardinalities,
        options=stub_options)
Example #37
0
def beta_create_Dgraph_stub(channel,
                            host=None,
                            metadata_transformer=None,
                            pool=None,
                            pool_size=None):
    import graphresponse_pb2
    request_serializers = {
        ('graph.Dgraph', 'Query'): graphresponse_pb2.Request.SerializeToString,
    }
    response_deserializers = {
        ('graph.Dgraph', 'Query'): graphresponse_pb2.Response.FromString,
    }
    cardinalities = {
        'Query': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'graph.Dgraph',
                                             cardinalities,
                                             options=stub_options)
def beta_create_Events_stub(channel,
                            host=None,
                            metadata_transformer=None,
                            pool=None,
                            pool_size=None):
    import events_pb2
    import events_pb2
    request_serializers = {
        ('protos.Events', 'Chat'): events_pb2.Event.SerializeToString,
    }
    response_deserializers = {
        ('protos.Events', 'Chat'): events_pb2.Event.FromString,
    }
    cardinalities = {
        'Chat': cardinality.Cardinality.STREAM_STREAM,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'protos.Events',
                                             cardinalities,
                                             options=stub_options)
  def beta_create_FirestoreAdmin_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('google.firestore.admin.v1beta1.FirestoreAdmin', 'CreateIndex'): CreateIndexRequest.SerializeToString,
      ('google.firestore.admin.v1beta1.FirestoreAdmin', 'DeleteIndex'): DeleteIndexRequest.SerializeToString,
      ('google.firestore.admin.v1beta1.FirestoreAdmin', 'GetIndex'): GetIndexRequest.SerializeToString,
      ('google.firestore.admin.v1beta1.FirestoreAdmin', 'ListIndexes'): ListIndexesRequest.SerializeToString,
    }
    response_deserializers = {
      ('google.firestore.admin.v1beta1.FirestoreAdmin', 'CreateIndex'): google_dot_longrunning_dot_operations__pb2.Operation.FromString,
      ('google.firestore.admin.v1beta1.FirestoreAdmin', 'DeleteIndex'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
      ('google.firestore.admin.v1beta1.FirestoreAdmin', 'GetIndex'): google_dot_cloud_dot_firestore__v1beta1_dot_proto_dot_admin_dot_index__pb2.Index.FromString,
      ('google.firestore.admin.v1beta1.FirestoreAdmin', 'ListIndexes'): ListIndexesResponse.FromString,
    }
    cardinalities = {
      'CreateIndex': cardinality.Cardinality.UNARY_UNARY,
      'DeleteIndex': cardinality.Cardinality.UNARY_UNARY,
      'GetIndex': cardinality.Cardinality.UNARY_UNARY,
      'ListIndexes': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'google.firestore.admin.v1beta1.FirestoreAdmin', cardinalities, options=stub_options)
Example #40
0
  def beta_create_Hetr_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('Hetr', 'BuildTransformer'): BuildRequest.SerializeToString,
      ('Hetr', 'Computation'): ComputationRequest.SerializeToString,
      ('Hetr', 'FeedInput'): FeedInputRequest.SerializeToString,
      ('Hetr', 'GetResults'): GetResultsRequest.SerializeToString,
    }
    response_deserializers = {
      ('Hetr', 'BuildTransformer'): BuildReply.FromString,
      ('Hetr', 'Computation'): ComputationReply.FromString,
      ('Hetr', 'FeedInput'): FeedInputReply.FromString,
      ('Hetr', 'GetResults'): GetResultsReply.FromString,
    }
    cardinalities = {
      'BuildTransformer': cardinality.Cardinality.UNARY_UNARY,
      'Computation': cardinality.Cardinality.UNARY_UNARY,
      'FeedInput': cardinality.Cardinality.UNARY_UNARY,
      'GetResults': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'Hetr', cardinalities, options=stub_options)
    def beta_create_PredictionService_stub(channel,
                                           host=None,
                                           metadata_transformer=None,
                                           pool=None,
                                           pool_size=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_serializers = {
            ('tensorflow.serving.PredictionService', 'DynamicReload'):
            model__server__config__pb2.ModelServerConfig.SerializeToString,
        }
        response_deserializers = {
            ('tensorflow.serving.PredictionService', 'DynamicReload'):
            ReloadResponse.FromString,
        }
        cardinalities = {
            'DynamicReload': cardinality.Cardinality.UNARY_UNARY,
        }
        stub_options = beta_implementations.stub_options(
            host=host,
            metadata_transformer=metadata_transformer,
            request_serializers=request_serializers,
            response_deserializers=response_deserializers,
            thread_pool=pool,
            thread_pool_size=pool_size)
        return beta_implementations.dynamic_stub(
            channel,
            'tensorflow.serving.PredictionService',
            cardinalities,
            options=stub_options)
  def instantiate(
      self, methods, method_implementations, multi_method_implementation):
    serialization_behaviors = _serialization_behaviors_from_test_methods(
        methods)
    # TODO(nathaniel): Add a "groups" attribute to _digest.TestServiceDigest.
    service = next(iter(methods))[0]
    # TODO(nathaniel): Add a "cardinalities_by_group" attribute to
    # _digest.TestServiceDigest.
    cardinalities = {
        method: method_object.cardinality()
        for (group, method), method_object in six.iteritems(methods)}

    server_options = implementations.server_options(
        request_deserializers=serialization_behaviors.request_deserializers,
        response_serializers=serialization_behaviors.response_serializers,
        thread_pool_size=test_constants.POOL_SIZE)
    server = implementations.server(
        method_implementations, options=server_options)
    server_credentials = implementations.ssl_server_credentials(
        [(resources.private_key(), resources.certificate_chain(),),])
    port = server.add_secure_port('[::]:0', server_credentials)
    server.start()
    channel_credentials = implementations.ssl_channel_credentials(
        resources.test_root_certificates())
    channel = test_utilities.not_really_secure_channel(
        'localhost', port, channel_credentials, _SERVER_HOST_OVERRIDE)
    stub_options = implementations.stub_options(
        request_serializers=serialization_behaviors.request_serializers,
        response_deserializers=serialization_behaviors.response_deserializers,
        thread_pool_size=test_constants.POOL_SIZE)
    generic_stub = implementations.generic_stub(channel, options=stub_options)
    dynamic_stub = implementations.dynamic_stub(
        channel, service, cardinalities, options=stub_options)
    return generic_stub, {service: dynamic_stub}, server
Example #43
0
def beta_create_OwstoniService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  request_serializers = {
    ('btwan.OwstoniService', 'GetMetadataInfo'): InfoHash.SerializeToString,
    ('btwan.OwstoniService', 'Index'): MetadataInfo.SerializeToString,
    ('btwan.OwstoniService', 'Recv'): Void.SerializeToString,
    ('btwan.OwstoniService', 'Search'): SearchReq.SerializeToString,
    ('btwan.OwstoniService', 'Send'): Event.SerializeToString,
    ('btwan.OwstoniService', 'SendInfoHash'): InfoHash.SerializeToString,
  }
  response_deserializers = {
    ('btwan.OwstoniService', 'GetMetadataInfo'): MetadataInfo.FromString,
    ('btwan.OwstoniService', 'Index'): Void.FromString,
    ('btwan.OwstoniService', 'Recv'): Event.FromString,
    ('btwan.OwstoniService', 'Search'): SearchResp.FromString,
    ('btwan.OwstoniService', 'Send'): Void.FromString,
    ('btwan.OwstoniService', 'SendInfoHash'): Void.FromString,
  }
  cardinalities = {
    'GetMetadataInfo': cardinality.Cardinality.UNARY_UNARY,
    'Index': cardinality.Cardinality.UNARY_UNARY,
    'Recv': cardinality.Cardinality.UNARY_STREAM,
    'Search': cardinality.Cardinality.UNARY_UNARY,
    'Send': cardinality.Cardinality.STREAM_UNARY,
    'SendInfoHash': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'btwan.OwstoniService', cardinalities, options=stub_options)
Example #44
0
    def beta_create_Later_stub(channel,
                               host=None,
                               metadata_transformer=None,
                               pool=None,
                               pool_size=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_serializers = {
            ('hippoai.later.Later', 'AbortInstance'):
            AbortInstanceInput.SerializeToString,
            ('hippoai.later.Later', 'CreateInstance'):
            CreateInstanceInput.SerializeToString,
            ('hippoai.later.Later', 'GetAborted'):
            GetInstancesInput.SerializeToString,
            ('hippoai.later.Later', 'GetFailed'):
            GetInstancesInput.SerializeToString,
            ('hippoai.later.Later', 'GetInstances'):
            GetInstancesInput.SerializeToString,
            ('hippoai.later.Later', 'GetSuccessful'):
            GetInstancesInput.SerializeToString,
            ('hippoai.later.Later', 'Stats'): StatsInput.SerializeToString,
        }
        response_deserializers = {
            ('hippoai.later.Later', 'AbortInstance'):
            AbortInstanceOutput.FromString,
            ('hippoai.later.Later', 'CreateInstance'):
            CreateInstanceOutput.FromString,
            ('hippoai.later.Later', 'GetAborted'):
            GetInstancesOutput.FromString,
            ('hippoai.later.Later', 'GetFailed'):
            GetInstancesOutput.FromString,
            ('hippoai.later.Later', 'GetInstances'):
            GetInstancesOutput.FromString,
            ('hippoai.later.Later', 'GetSuccessful'):
            GetInstancesOutput.FromString,
            ('hippoai.later.Later', 'Stats'): StatsOutput.FromString,
        }
        cardinalities = {
            'AbortInstance': cardinality.Cardinality.UNARY_UNARY,
            'CreateInstance': cardinality.Cardinality.UNARY_UNARY,
            'GetAborted': cardinality.Cardinality.UNARY_UNARY,
            'GetFailed': cardinality.Cardinality.UNARY_UNARY,
            'GetInstances': cardinality.Cardinality.UNARY_UNARY,
            'GetSuccessful': cardinality.Cardinality.UNARY_UNARY,
            'Stats': cardinality.Cardinality.UNARY_UNARY,
        }
        stub_options = beta_implementations.stub_options(
            host=host,
            metadata_transformer=metadata_transformer,
            request_serializers=request_serializers,
            response_deserializers=response_deserializers,
            thread_pool=pool,
            thread_pool_size=pool_size)
        return beta_implementations.dynamic_stub(channel,
                                                 'hippoai.later.Later',
                                                 cardinalities,
                                                 options=stub_options)
Example #45
0
def beta_create_SystemUtilizationService_stub(channel,
                                              host=None,
                                              metadata_transformer=None,
                                              pool=None,
                                              pool_size=None):
    request_serializers = {
        ('com.brocade.telemetry.systemutilization.SystemUtilizationService', 'ListSystemUtilizationStatistics'):
        SystemUtilizationProfileRequest.SerializeToString,
    }
    response_deserializers = {
        ('com.brocade.telemetry.systemutilization.SystemUtilizationService', 'ListSystemUtilizationStatistics'):
        SystemUtilizationProfileResponse.FromString,
    }
    cardinalities = {
        'ListSystemUtilizationStatistics':
        cardinality.Cardinality.UNARY_STREAM,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(
        channel,
        'com.brocade.telemetry.systemutilization.SystemUtilizationService',
        cardinalities,
        options=stub_options)
Example #46
0
def beta_create_Greeter_stub(channel,
                             host=None,
                             metadata_transformer=None,
                             pool=None,
                             pool_size=None):
    import helloworld_pb2
    import helloworld_pb2
    request_serializers = {
        ('helloworld.Greeter', 'SayHello'):
        helloworld_pb2.HelloRequest.SerializeToString,
    }
    response_deserializers = {
        ('helloworld.Greeter', 'SayHello'):
        helloworld_pb2.HelloReply.FromString,
    }
    cardinalities = {
        'SayHello': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'helloworld.Greeter',
                                             cardinalities,
                                             options=stub_options)
Example #47
0
def beta_create_SkynetService_stub(channel,
                                   host=None,
                                   metadata_transformer=None,
                                   pool=None,
                                   pool_size=None):
    request_serializers = {
        ('dg.model.SkynetService', 'VideoRecognize'):
        SkynetRequest.SerializeToString,
    }
    response_deserializers = {
        ('dg.model.SkynetService', 'VideoRecognize'):
        SkynetResponse.FromString,
    }
    cardinalities = {
        'VideoRecognize': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'dg.model.SkynetService',
                                             cardinalities,
                                             options=stub_options)
Example #48
0
def beta_create_TReg_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  """The Beta API is deprecated for 0.15.0 and later.

  It is recommended to use the GA API (classes and functions in this
  file not marked beta) for all further purposes. This function was
  generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
  request_serializers = {
    ('temp_reg.TReg', 'GetConfigs'): TId.SerializeToString,
    ('temp_reg.TReg', 'SetConfigs'): TConfigs.SerializeToString,
    ('temp_reg.TReg', 'StartRegulators'): TId.SerializeToString,
    ('temp_reg.TReg', 'StopRegulators'): TId.SerializeToString,
    ('temp_reg.TReg', 'StreamTemperatures'): Empty.SerializeToString,
  }
  response_deserializers = {
    ('temp_reg.TReg', 'GetConfigs'): TConfigs.FromString,
    ('temp_reg.TReg', 'SetConfigs'): Empty.FromString,
    ('temp_reg.TReg', 'StartRegulators'): Empty.FromString,
    ('temp_reg.TReg', 'StopRegulators'): Empty.FromString,
    ('temp_reg.TReg', 'StreamTemperatures'): Temperatures.FromString,
  }
  cardinalities = {
    'GetConfigs': cardinality.Cardinality.UNARY_UNARY,
    'SetConfigs': cardinality.Cardinality.UNARY_UNARY,
    'StartRegulators': cardinality.Cardinality.UNARY_UNARY,
    'StopRegulators': cardinality.Cardinality.UNARY_UNARY,
    'StreamTemperatures': cardinality.Cardinality.UNARY_STREAM,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'temp_reg.TReg', cardinalities, options=stub_options)
def beta_create_Datastore_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  request_serializers = {
    ('google.datastore.v1beta3.Datastore', 'AllocateIds'): AllocateIdsRequest.SerializeToString,
    ('google.datastore.v1beta3.Datastore', 'BeginTransaction'): BeginTransactionRequest.SerializeToString,
    ('google.datastore.v1beta3.Datastore', 'Commit'): CommitRequest.SerializeToString,
    ('google.datastore.v1beta3.Datastore', 'Lookup'): LookupRequest.SerializeToString,
    ('google.datastore.v1beta3.Datastore', 'Rollback'): RollbackRequest.SerializeToString,
    ('google.datastore.v1beta3.Datastore', 'RunQuery'): RunQueryRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.datastore.v1beta3.Datastore', 'AllocateIds'): AllocateIdsResponse.FromString,
    ('google.datastore.v1beta3.Datastore', 'BeginTransaction'): BeginTransactionResponse.FromString,
    ('google.datastore.v1beta3.Datastore', 'Commit'): CommitResponse.FromString,
    ('google.datastore.v1beta3.Datastore', 'Lookup'): LookupResponse.FromString,
    ('google.datastore.v1beta3.Datastore', 'Rollback'): RollbackResponse.FromString,
    ('google.datastore.v1beta3.Datastore', 'RunQuery'): RunQueryResponse.FromString,
  }
  cardinalities = {
    'AllocateIds': cardinality.Cardinality.UNARY_UNARY,
    'BeginTransaction': cardinality.Cardinality.UNARY_UNARY,
    'Commit': cardinality.Cardinality.UNARY_UNARY,
    'Lookup': cardinality.Cardinality.UNARY_UNARY,
    'Rollback': cardinality.Cardinality.UNARY_UNARY,
    'RunQuery': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.datastore.v1beta3.Datastore', cardinalities, options=stub_options)
Example #50
0
    def beta_create_OnlinePredictionService_stub(channel,
                                                 host=None,
                                                 metadata_transformer=None,
                                                 pool=None,
                                                 pool_size=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_serializers = {
            ('google.cloud.ml.v1beta1.OnlinePredictionService', 'Predict'):
            PredictRequest.SerializeToString,
        }
        response_deserializers = {
            ('google.cloud.ml.v1beta1.OnlinePredictionService', 'Predict'):
            google_dot_api_dot_httpbody__pb2.HttpBody.FromString,
        }
        cardinalities = {
            'Predict': cardinality.Cardinality.UNARY_UNARY,
        }
        stub_options = beta_implementations.stub_options(
            host=host,
            metadata_transformer=metadata_transformer,
            request_serializers=request_serializers,
            response_deserializers=response_deserializers,
            thread_pool=pool,
            thread_pool_size=pool_size)
        return beta_implementations.dynamic_stub(
            channel,
            'google.cloud.ml.v1beta1.OnlinePredictionService',
            cardinalities,
            options=stub_options)
def beta_create_ReadService_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    import ga4gh.read_service_pb2
    import ga4gh.read_service_pb2
    import ga4gh.read_service_pb2
    import ga4gh.reads_pb2
    import ga4gh.read_service_pb2
    import ga4gh.read_service_pb2

    request_serializers = {
        ("ga4gh.ReadService", "GetReadGroupSet"): ga4gh.read_service_pb2.GetReadGroupSetRequest.SerializeToString,
        (
            "ga4gh.ReadService",
            "SearchReadGroupSets",
        ): ga4gh.read_service_pb2.SearchReadGroupSetsRequest.SerializeToString,
        ("ga4gh.ReadService", "SearchReads"): ga4gh.read_service_pb2.SearchReadsRequest.SerializeToString,
    }
    response_deserializers = {
        ("ga4gh.ReadService", "GetReadGroupSet"): ga4gh.reads_pb2.ReadGroupSet.FromString,
        ("ga4gh.ReadService", "SearchReadGroupSets"): ga4gh.read_service_pb2.SearchReadGroupSetsResponse.FromString,
        ("ga4gh.ReadService", "SearchReads"): ga4gh.read_service_pb2.SearchReadsResponse.FromString,
    }
    cardinalities = {
        "GetReadGroupSet": cardinality.Cardinality.UNARY_UNARY,
        "SearchReadGroupSets": cardinality.Cardinality.UNARY_UNARY,
        "SearchReads": cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size,
    )
    return beta_implementations.dynamic_stub(channel, "ga4gh.ReadService", cardinalities, options=stub_options)
    def beta_create_Datastore_stub(channel,
                                   host=None,
                                   metadata_transformer=None,
                                   pool=None,
                                   pool_size=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_serializers = {
            ('Datastore', 'Register'): Request.SerializeToString,
        }
        response_deserializers = {
            ('Datastore', 'Register'): Response.FromString,
        }
        cardinalities = {
            'Register': cardinality.Cardinality.UNARY_STREAM,
        }
        stub_options = beta_implementations.stub_options(
            host=host,
            metadata_transformer=metadata_transformer,
            request_serializers=request_serializers,
            response_deserializers=response_deserializers,
            thread_pool=pool,
            thread_pool_size=pool_size)
        return beta_implementations.dynamic_stub(channel,
                                                 'Datastore',
                                                 cardinalities,
                                                 options=stub_options)
Example #53
0
    def beta_create_ObstacleAvoidance_stub(channel,
                                           host=None,
                                           metadata_transformer=None,
                                           pool=None,
                                           pool_size=None):
        """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
        request_serializers = {
            ('oa_rpc.ObstacleAvoidance', 'FullAutomatic'):
            FullContext.SerializeToString,
            ('oa_rpc.ObstacleAvoidance', 'SemiAutomatic'):
            SemiContext.SerializeToString,
        }
        response_deserializers = {
            ('oa_rpc.ObstacleAvoidance', 'FullAutomatic'): Strategy.FromString,
            ('oa_rpc.ObstacleAvoidance', 'SemiAutomatic'): Strategy.FromString,
        }
        cardinalities = {
            'FullAutomatic': cardinality.Cardinality.UNARY_UNARY,
            'SemiAutomatic': cardinality.Cardinality.UNARY_UNARY,
        }
        stub_options = beta_implementations.stub_options(
            host=host,
            metadata_transformer=metadata_transformer,
            request_serializers=request_serializers,
            response_deserializers=response_deserializers,
            thread_pool=pool,
            thread_pool_size=pool_size)
        return beta_implementations.dynamic_stub(channel,
                                                 'oa_rpc.ObstacleAvoidance',
                                                 cardinalities,
                                                 options=stub_options)
def beta_create_BigtableTableAdmin_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  request_serializers = {
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'CreateTable'): CreateTableRequest.SerializeToString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'DeleteTable'): DeleteTableRequest.SerializeToString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'DropRowRange'): DropRowRangeRequest.SerializeToString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'GetTable'): GetTableRequest.SerializeToString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'ListTables'): ListTablesRequest.SerializeToString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'ModifyColumnFamilies'): ModifyColumnFamiliesRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'CreateTable'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'DeleteTable'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'DropRowRange'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'GetTable'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'ListTables'): ListTablesResponse.FromString,
    ('google.bigtable.admin.v2.BigtableTableAdmin', 'ModifyColumnFamilies'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
  }
  cardinalities = {
    'CreateTable': cardinality.Cardinality.UNARY_UNARY,
    'DeleteTable': cardinality.Cardinality.UNARY_UNARY,
    'DropRowRange': cardinality.Cardinality.UNARY_UNARY,
    'GetTable': cardinality.Cardinality.UNARY_UNARY,
    'ListTables': cardinality.Cardinality.UNARY_UNARY,
    'ModifyColumnFamilies': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.bigtable.admin.v2.BigtableTableAdmin', cardinalities, options=stub_options)
def beta_create_Health_stub(channel,
                            host=None,
                            metadata_transformer=None,
                            pool=None,
                            pool_size=None):
    request_serializers = {
        ('grpc_python_example.Health', 'Check'):
        HealthCheckRequest.SerializeToString,
    }
    response_deserializers = {
        ('grpc_python_example.Health', 'Check'):
        HealthCheckResponse.FromString,
    }
    cardinalities = {
        'Check': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(
        host=host,
        metadata_transformer=metadata_transformer,
        request_serializers=request_serializers,
        response_deserializers=response_deserializers,
        thread_pool=pool,
        thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel,
                                             'grpc_python_example.Health',
                                             cardinalities,
                                             options=stub_options)
  def beta_create_Store_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('store.Store', 'AddItem'): AddItemRequest.SerializeToString,
      ('store.Store', 'AddItems'): AddItemRequest.SerializeToString,
      ('store.Store', 'ListInventory'): Empty.SerializeToString,
      ('store.Store', 'QueryQuantities'): QueryItemRequest.SerializeToString,
      ('store.Store', 'QueryQuantity'): QueryItemRequest.SerializeToString,
      ('store.Store', 'RemoveItem'): RemoveItemRequest.SerializeToString,
      ('store.Store', 'RemoveItems'): RemoveItemRequest.SerializeToString,
    }
    response_deserializers = {
      ('store.Store', 'AddItem'): Empty.FromString,
      ('store.Store', 'AddItems'): Empty.FromString,
      ('store.Store', 'ListInventory'): QuantityResponse.FromString,
      ('store.Store', 'QueryQuantities'): QuantityResponse.FromString,
      ('store.Store', 'QueryQuantity'): QuantityResponse.FromString,
      ('store.Store', 'RemoveItem'): RemoveItemResponse.FromString,
      ('store.Store', 'RemoveItems'): RemoveItemResponse.FromString,
    }
    cardinalities = {
      'AddItem': cardinality.Cardinality.UNARY_UNARY,
      'AddItems': cardinality.Cardinality.STREAM_UNARY,
      'ListInventory': cardinality.Cardinality.UNARY_STREAM,
      'QueryQuantities': cardinality.Cardinality.STREAM_STREAM,
      'QueryQuantity': cardinality.Cardinality.UNARY_UNARY,
      'RemoveItem': cardinality.Cardinality.UNARY_UNARY,
      'RemoveItems': cardinality.Cardinality.STREAM_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'store.Store', cardinalities, options=stub_options)
Example #57
0
    def setUp(self):
        self._servicer = _Servicer()
        self._method_implementations = {
            (_GROUP, _UNARY_UNARY):
            utilities.unary_unary_inline(self._servicer.unary_unary),
            (_GROUP, _UNARY_STREAM):
            utilities.unary_stream_inline(self._servicer.unary_stream),
            (_GROUP, _STREAM_UNARY):
            utilities.stream_unary_inline(self._servicer.stream_unary),
            (_GROUP, _STREAM_STREAM):
            utilities.stream_stream_inline(self._servicer.stream_stream),
        }

        self._cardinalities = {
            _UNARY_UNARY: cardinality.Cardinality.UNARY_UNARY,
            _UNARY_STREAM: cardinality.Cardinality.UNARY_STREAM,
            _STREAM_UNARY: cardinality.Cardinality.STREAM_UNARY,
            _STREAM_STREAM: cardinality.Cardinality.STREAM_STREAM,
        }

        self._server_options = implementations.server_options(
            thread_pool_size=test_constants.POOL_SIZE)
        self._server_credentials = implementations.ssl_server_credentials([
            (
                resources.private_key(),
                resources.certificate_chain(),
            ),
        ])
        self._channel_credentials = implementations.ssl_channel_credentials(
            resources.test_root_certificates())
        self._stub_options = implementations.stub_options(
            thread_pool_size=test_constants.POOL_SIZE)
Example #58
0
  def setUp(self):
    self._servicer = _Servicer()
    self._method_implementations = {
        (_GROUP, _UNARY_UNARY):
            utilities.unary_unary_inline(self._servicer.unary_unary),
        (_GROUP, _UNARY_STREAM):
            utilities.unary_stream_inline(self._servicer.unary_stream),
        (_GROUP, _STREAM_UNARY):
            utilities.stream_unary_inline(self._servicer.stream_unary),
        (_GROUP, _STREAM_STREAM):
            utilities.stream_stream_inline(self._servicer.stream_stream),
    }

    self._cardinalities = {
        _UNARY_UNARY: cardinality.Cardinality.UNARY_UNARY,
        _UNARY_STREAM: cardinality.Cardinality.UNARY_STREAM,
        _STREAM_UNARY: cardinality.Cardinality.STREAM_UNARY,
        _STREAM_STREAM: cardinality.Cardinality.STREAM_STREAM,
    }

    self._server_options = implementations.server_options(
        thread_pool_size=test_constants.POOL_SIZE)
    self._server_credentials = implementations.ssl_server_credentials(
        [(resources.private_key(), resources.certificate_chain(),),])
    self._client_credentials = implementations.ssl_client_credentials(
        resources.test_root_certificates(), None, None)
    self._stub_options = implementations.stub_options(
        thread_pool_size=test_constants.POOL_SIZE)
Example #59
0
def beta_create_Throttler_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import throttlerdata_pb2
  import throttlerdata_pb2
  import throttlerdata_pb2
  import throttlerdata_pb2
  import throttlerdata_pb2
  import throttlerdata_pb2
  import throttlerdata_pb2
  import throttlerdata_pb2
  import throttlerdata_pb2
  import throttlerdata_pb2
  request_serializers = {
    ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata_pb2.GetConfigurationRequest.SerializeToString,
    ('throttlerservice.Throttler', 'MaxRates'): throttlerdata_pb2.MaxRatesRequest.SerializeToString,
    ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata_pb2.ResetConfigurationRequest.SerializeToString,
    ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata_pb2.SetMaxRateRequest.SerializeToString,
    ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata_pb2.UpdateConfigurationRequest.SerializeToString,
  }
  response_deserializers = {
    ('throttlerservice.Throttler', 'GetConfiguration'): throttlerdata_pb2.GetConfigurationResponse.FromString,
    ('throttlerservice.Throttler', 'MaxRates'): throttlerdata_pb2.MaxRatesResponse.FromString,
    ('throttlerservice.Throttler', 'ResetConfiguration'): throttlerdata_pb2.ResetConfigurationResponse.FromString,
    ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata_pb2.SetMaxRateResponse.FromString,
    ('throttlerservice.Throttler', 'UpdateConfiguration'): throttlerdata_pb2.UpdateConfigurationResponse.FromString,
  }
  cardinalities = {
    'GetConfiguration': cardinality.Cardinality.UNARY_UNARY,
    'MaxRates': cardinality.Cardinality.UNARY_UNARY,
    'ResetConfiguration': cardinality.Cardinality.UNARY_UNARY,
    'SetMaxRate': cardinality.Cardinality.UNARY_UNARY,
    'UpdateConfiguration': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'throttlerservice.Throttler', cardinalities, options=stub_options)