Пример #1
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)
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)
Пример #3
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)
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)
Пример #5
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)
Пример #6
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)
Пример #7
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)
Пример #8
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)
Пример #9
0
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)
Пример #10
0
  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)
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)
Пример #12
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)
Пример #13
0
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)
  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)
Пример #15
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)
Пример #16
0
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)
Пример #17
0
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)
Пример #18
0
    def test_stub_context(self):
        server = implementations.server(
            self._method_implementations, options=self._server_options)
        port = server.add_secure_port('[::]:0', self._server_credentials)
        server.start()

        channel = test_utilities.not_really_secure_channel(
            'localhost', port, self._channel_credentials, _SERVER_HOST_OVERRIDE)
        dynamic_stub = implementations.dynamic_stub(
            channel, _GROUP, self._cardinalities, options=self._stub_options)
        for _ in range(100):
            with dynamic_stub:
                pass
        for _ in range(10):
            with dynamic_stub:
                call_options = interfaces.grpc_call_options(
                    disable_compression=True)
                response = getattr(dynamic_stub, _UNARY_UNARY)(
                    _REQUEST,
                    test_constants.LONG_TIMEOUT,
                    protocol_options=call_options)
                self.assertEqual(_RESPONSE, response)
                self.assertIsNotNone(self._servicer.peer())

        server.stop(test_constants.SHORT_TIMEOUT).wait()
Пример #19
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)
Пример #20
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)
Пример #21
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)
Пример #22
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)
Пример #23
0
  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
Пример #24
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)
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_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)
Пример #27
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_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)
Пример #29
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)
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)
def beta_create_LoggingServiceV2_stub(channel,
                                      host=None,
                                      metadata_transformer=None,
                                      pool=None,
                                      pool_size=None):
    request_serializers = {
        ('google.logging.v2.LoggingServiceV2', 'DeleteLog'):
        DeleteLogRequest.SerializeToString,
        ('google.logging.v2.LoggingServiceV2', 'ListLogEntries'):
        ListLogEntriesRequest.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', 'ListMonitoredResourceDescriptors'):
        ListMonitoredResourceDescriptorsResponse.FromString,
        ('google.logging.v2.LoggingServiceV2', 'WriteLogEntries'):
        WriteLogEntriesResponse.FromString,
    }
    cardinalities = {
        'DeleteLog': cardinality.Cardinality.UNARY_UNARY,
        'ListLogEntries': 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)
Пример #32
0
    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
Пример #33
0
    def beta_create_RosBridgeService_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 = {
            ('rosbridge_service.RosBridgeService', 'readEncoderData'):
            EncoderDesc.SerializeToString,
            ('rosbridge_service.RosBridgeService', 'streamTwistData'):
            TwistData.SerializeToString,
            ('rosbridge_service.RosBridgeService', 'writeTwistData'):
            TwistData.SerializeToString,
        }
        response_deserializers = {
            ('rosbridge_service.RosBridgeService', 'readEncoderData'):
            EncoderData.FromString,
            ('rosbridge_service.RosBridgeService', 'streamTwistData'):
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            ('rosbridge_service.RosBridgeService', 'writeTwistData'):
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        }
        cardinalities = {
            'readEncoderData': cardinality.Cardinality.UNARY_STREAM,
            'streamTwistData': cardinality.Cardinality.STREAM_UNARY,
            'writeTwistData': 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,
            'rosbridge_service.RosBridgeService',
            cardinalities,
            options=stub_options)
    def beta_create_Synchronization_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 = {
            ('Synchronization', 'BlockFrom'): Message.SerializeToString,
            ('Synchronization', 'BlockTo'): Block.SerializeToString,
            ('Synchronization', 'ExchangeBlock'): Block.SerializeToString,
            ('Synchronization', 'TransactionFrom'): Message.SerializeToString,
            ('Synchronization', 'TransactionTo'):
            Transaction.SerializeToString,
        }
        response_deserializers = {
            ('Synchronization', 'BlockFrom'): Block.FromString,
            ('Synchronization', 'BlockTo'): Message.FromString,
            ('Synchronization', 'ExchangeBlock'): Block.FromString,
            ('Synchronization', 'TransactionFrom'): Transaction.FromString,
            ('Synchronization', 'TransactionTo'): Message.FromString,
        }
        cardinalities = {
            'BlockFrom': cardinality.Cardinality.UNARY_UNARY,
            'BlockTo': cardinality.Cardinality.UNARY_UNARY,
            'ExchangeBlock': cardinality.Cardinality.UNARY_UNARY,
            'TransactionFrom': cardinality.Cardinality.UNARY_UNARY,
            'TransactionTo': 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,
                                                 'Synchronization',
                                                 cardinalities,
                                                 options=stub_options)
Пример #35
0
    def beta_create_Calculator_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 = {
            ('Calculator', 'Chat'):
            Number.SerializeToString,
            ('Calculator', 'ReceiveEvents'):
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ('Calculator', 'SendEvents'):
            Number.SerializeToString,
            ('Calculator', 'SquareRoot'):
            Number.SerializeToString,
        }
        response_deserializers = {
            ('Calculator', 'Chat'): Number.FromString,
            ('Calculator', 'ReceiveEvents'): Number.FromString,
            ('Calculator', 'SendEvents'): Number.FromString,
            ('Calculator', 'SquareRoot'): Number.FromString,
        }
        cardinalities = {
            'Chat': cardinality.Cardinality.STREAM_STREAM,
            'ReceiveEvents': cardinality.Cardinality.UNARY_STREAM,
            'SendEvents': cardinality.Cardinality.STREAM_UNARY,
            'SquareRoot': 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,
                                                 'Calculator',
                                                 cardinalities,
                                                 options=stub_options)
Пример #36
0
    def beta_create_CorkTypeService_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 = {
            ('CorkTypeService', 'EventReact'):
            EventReactRequest.SerializeToString,
            ('CorkTypeService', 'Kill'):
            KillRequest.SerializeToString,
            ('CorkTypeService', 'StageExecute'):
            StageExecuteRequest.SerializeToString,
            ('CorkTypeService', 'VolumesToMountGet'):
            VolumesToMountGetRequest.SerializeToString,
        }
        response_deserializers = {
            ('CorkTypeService', 'EventReact'): Response.FromString,
            ('CorkTypeService', 'Kill'): Response.FromString,
            ('CorkTypeService', 'StageExecute'): ExecuteEvent.FromString,
            ('CorkTypeService', 'VolumesToMountGet'): Response.FromString,
        }
        cardinalities = {
            'EventReact': cardinality.Cardinality.UNARY_UNARY,
            'Kill': cardinality.Cardinality.UNARY_UNARY,
            'StageExecute': cardinality.Cardinality.UNARY_STREAM,
            'VolumesToMountGet': 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,
                                                 'CorkTypeService',
                                                 cardinalities,
                                                 options=stub_options)
Пример #37
0
def beta_create_Admin_stub(channel,
                           host=None,
                           metadata_transformer=None,
                           pool=None,
                           pool_size=None):
    import google.protobuf.empty_pb2
    import server_admin_pb2
    import google.protobuf.empty_pb2
    import server_admin_pb2
    import google.protobuf.empty_pb2
    import server_admin_pb2
    request_serializers = {
        ('protos.Admin', 'GetStatus'):
        google.protobuf.empty_pb2.Empty.SerializeToString,
        ('protos.Admin', 'StartServer'):
        google.protobuf.empty_pb2.Empty.SerializeToString,
        ('protos.Admin', 'StopServer'):
        google.protobuf.empty_pb2.Empty.SerializeToString,
    }
    response_deserializers = {
        ('protos.Admin', 'GetStatus'):
        server_admin_pb2.ServerStatus.FromString,
        ('protos.Admin', 'StartServer'):
        server_admin_pb2.ServerStatus.FromString,
        ('protos.Admin', 'StopServer'):
        server_admin_pb2.ServerStatus.FromString,
    }
    cardinalities = {
        'GetStatus': 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)
Пример #38
0
def beta_create_Search_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import search_pb2
  import search_pb2
  import search_pb2
  import search_pb2
  request_serializers = {
    ('search.Search', 'Index'): search_pb2.IndexRequest.SerializeToString,
    ('search.Search', 'Search'): search_pb2.SearchRequest.SerializeToString,
  }
  response_deserializers = {
    ('search.Search', 'Index'): search_pb2.IndexReply.FromString,
    ('search.Search', 'Search'): search_pb2.SearchReply.FromString,
  }
  cardinalities = {
    'Index': cardinality.Cardinality.UNARY_UNARY,
    'Search': 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, 'search.Search', cardinalities, options=stub_options)
Пример #39
0
def beta_create_gRPCExec_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import cisco_ems_grpc_pb2
  import cisco_ems_grpc_pb2
  import cisco_ems_grpc_pb2
  import cisco_ems_grpc_pb2
  request_serializers = {
    ('IOSXRExtensibleManagabilityService.gRPCExec', 'ShowCmdJSONOutput'): cisco_ems_grpc_pb2.ShowCmdArgs.SerializeToString,
    ('IOSXRExtensibleManagabilityService.gRPCExec', 'ShowCmdTextOutput'): cisco_ems_grpc_pb2.ShowCmdArgs.SerializeToString,
  }
  response_deserializers = {
    ('IOSXRExtensibleManagabilityService.gRPCExec', 'ShowCmdJSONOutput'): cisco_ems_grpc_pb2.ShowCmdJSONReply.FromString,
    ('IOSXRExtensibleManagabilityService.gRPCExec', 'ShowCmdTextOutput'): cisco_ems_grpc_pb2.ShowCmdTextReply.FromString,
  }
  cardinalities = {
    'ShowCmdJSONOutput': cardinality.Cardinality.UNARY_STREAM,
    'ShowCmdTextOutput': 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, 'IOSXRExtensibleManagabilityService.gRPCExec', cardinalities, options=stub_options)
Пример #40
0
    def beta_create_FileService_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 = {
            ('luci.swarming.bot.FileService', 'Contains'):
            ContainsRequest.SerializeToString,
            ('luci.swarming.bot.FileService', 'FetchBlobs'):
            FetchBlobsRequest.SerializeToString,
            ('luci.swarming.bot.FileService', 'PushBlobs'):
            PushBlobsRequest.SerializeToString,
        }
        response_deserializers = {
            ('luci.swarming.bot.FileService', 'Contains'):
            ContainsReply.FromString,
            ('luci.swarming.bot.FileService', 'FetchBlobs'):
            FetchBlobsReply.FromString,
            ('luci.swarming.bot.FileService', 'PushBlobs'):
            PushBlobsReply.FromString,
        }
        cardinalities = {
            'Contains': cardinality.Cardinality.UNARY_UNARY,
            'FetchBlobs': cardinality.Cardinality.UNARY_STREAM,
            'PushBlobs': 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,
            'luci.swarming.bot.FileService',
            cardinalities,
            options=stub_options)
Пример #41
0
 def beta_create_DistanceService_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 = {
         ('distance_server.DistanceService', 'getDistance'):
         google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
         ('distance_server.DistanceService', 'getDistances'):
         ClientInfo.SerializeToString,
         ('distance_server.DistanceService', 'registerClient'):
         ClientInfo.SerializeToString,
     }
     response_deserializers = {
         ('distance_server.DistanceService', 'getDistance'):
         Distance.FromString,
         ('distance_server.DistanceService', 'getDistances'):
         Distance.FromString,
         ('distance_server.DistanceService', 'registerClient'):
         ServerInfo.FromString,
     }
     cardinalities = {
         'getDistance': cardinality.Cardinality.UNARY_UNARY,
         'getDistances': cardinality.Cardinality.UNARY_STREAM,
         'registerClient': 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,
         'distance_server.DistanceService',
         cardinalities,
         options=stub_options)
Пример #42
0
def beta_create_EncoderDecoder_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import playcloud_pb2
  import playcloud_pb2
  import playcloud_pb2
  import playcloud_pb2
  request_serializers = {
    ('EncoderDecoder', 'Decode'): playcloud_pb2.DecodeRequest.SerializeToString,
    ('EncoderDecoder', 'Encode'): playcloud_pb2.EncodeRequest.SerializeToString,
  }
  response_deserializers = {
    ('EncoderDecoder', 'Decode'): playcloud_pb2.DecodeReply.FromString,
    ('EncoderDecoder', 'Encode'): playcloud_pb2.EncodeReply.FromString,
  }
  cardinalities = {
    'Decode': cardinality.Cardinality.UNARY_UNARY,
    'Encode': 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, 'EncoderDecoder', cardinalities, options=stub_options)
Пример #43
0
    def beta_create_SwapClient_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 = {
            ('looprpc.SwapClient', 'LoopOut'):
            LoopOutRequest.SerializeToString,
            ('looprpc.SwapClient', 'LoopOutQuote'):
            QuoteRequest.SerializeToString,
            ('looprpc.SwapClient', 'LoopOutTerms'):
            TermsRequest.SerializeToString,
            ('looprpc.SwapClient', 'Monitor'):
            MonitorRequest.SerializeToString,
        }
        response_deserializers = {
            ('looprpc.SwapClient', 'LoopOut'): SwapResponse.FromString,
            ('looprpc.SwapClient', 'LoopOutQuote'): QuoteResponse.FromString,
            ('looprpc.SwapClient', 'LoopOutTerms'): TermsResponse.FromString,
            ('looprpc.SwapClient', 'Monitor'): SwapStatus.FromString,
        }
        cardinalities = {
            'LoopOut': cardinality.Cardinality.UNARY_UNARY,
            'LoopOutQuote': cardinality.Cardinality.UNARY_UNARY,
            'LoopOutTerms': cardinality.Cardinality.UNARY_UNARY,
            'Monitor': 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,
                                                 'looprpc.SwapClient',
                                                 cardinalities,
                                                 options=stub_options)
Пример #44
0
    def beta_create_Greeter_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 = {
            ('helloworld.Greeter', 'Category'):
            CategoryRequest.SerializeToString,
            ('helloworld.Greeter', 'MakeModel'):
            MakeModelRequest.SerializeToString,
            ('helloworld.Greeter', 'SayHello'):
            HelloRequest.SerializeToString,
            ('helloworld.Greeter', 'SayHelloAgain'):
            HelloRequest.SerializeToString,
        }
        response_deserializers = {
            ('helloworld.Greeter', 'Category'): CategoryReply.FromString,
            ('helloworld.Greeter', 'MakeModel'): MakeModelReply.FromString,
            ('helloworld.Greeter', 'SayHello'): HelloReply.FromString,
            ('helloworld.Greeter', 'SayHelloAgain'): HelloReply.FromString,
        }
        cardinalities = {
            'Category': cardinality.Cardinality.UNARY_UNARY,
            'MakeModel': cardinality.Cardinality.UNARY_UNARY,
            'SayHello': cardinality.Cardinality.UNARY_UNARY,
            'SayHelloAgain': 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)
Пример #45
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
    request_serializers = {
        ('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', 'RunMysqlUpgrade'):
        mysqlctl_pb2.RunMysqlUpgradeResponse.FromString,
        ('mysqlctl.MysqlCtl', 'Shutdown'):
        mysqlctl_pb2.ShutdownResponse.FromString,
        ('mysqlctl.MysqlCtl', 'Start'):
        mysqlctl_pb2.StartResponse.FromString,
    }
    cardinalities = {
        '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)
Пример #46
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)
Пример #47
0
def beta_create_UpdateStream_stub(channel,
                                  host=None,
                                  metadata_transformer=None,
                                  pool=None,
                                  pool_size=None):
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    import binlogdata_pb2
    request_serializers = {
        ('binlogservice.UpdateStream', 'StreamKeyRange'):
        binlogdata_pb2.StreamKeyRangeRequest.SerializeToString,
        ('binlogservice.UpdateStream', 'StreamTables'):
        binlogdata_pb2.StreamTablesRequest.SerializeToString,
        ('binlogservice.UpdateStream', 'StreamUpdate'):
        binlogdata_pb2.StreamUpdateRequest.SerializeToString,
    }
    response_deserializers = {
        ('binlogservice.UpdateStream', 'StreamKeyRange'):
        binlogdata_pb2.StreamKeyRangeResponse.FromString,
        ('binlogservice.UpdateStream', 'StreamTables'):
        binlogdata_pb2.StreamTablesResponse.FromString,
        ('binlogservice.UpdateStream', 'StreamUpdate'):
        binlogdata_pb2.StreamUpdateResponse.FromString,
    }
    cardinalities = {
        'StreamKeyRange': cardinality.Cardinality.UNARY_STREAM,
        'StreamTables': cardinality.Cardinality.UNARY_STREAM,
        'StreamUpdate': 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,
                                             'binlogservice.UpdateStream',
                                             cardinalities,
                                             options=stub_options)
Пример #48
0
def beta_create_mnist_Inference_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import mnist_DNN_pb2
  import mnist_DNN_pb2
  import mnist_DNN_pb2
  import mnist_DNN_pb2
  request_serializers = {
    ('mnist_DNN.mnist_Inference', 'GetInput'): mnist_DNN_pb2.ImageArray.SerializeToString,
    ('mnist_DNN.mnist_Inference', 'GetMultiInput'): mnist_DNN_pb2.ImageArray.SerializeToString,
  }
  response_deserializers = {
    ('mnist_DNN.mnist_Inference', 'GetInput'): mnist_DNN_pb2.Digit.FromString,
    ('mnist_DNN.mnist_Inference', 'GetMultiInput'): mnist_DNN_pb2.Digit.FromString,
  }
  cardinalities = {
    'GetInput': cardinality.Cardinality.UNARY_UNARY,
    'GetMultiInput': 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, 'mnist_DNN.mnist_Inference', cardinalities, options=stub_options)
Пример #49
0
    def beta_create_Bots_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.devtools.remoteworkers.v1test2.Bots', 'CreateBotSession'):
            CreateBotSessionRequest.SerializeToString,
            ('google.devtools.remoteworkers.v1test2.Bots', 'PostBotEventTemp'):
            PostBotEventTempRequest.SerializeToString,
            ('google.devtools.remoteworkers.v1test2.Bots', 'UpdateBotSession'):
            UpdateBotSessionRequest.SerializeToString,
        }
        response_deserializers = {
            ('google.devtools.remoteworkers.v1test2.Bots', 'CreateBotSession'):
            BotSession.FromString,
            ('google.devtools.remoteworkers.v1test2.Bots', 'PostBotEventTemp'):
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            ('google.devtools.remoteworkers.v1test2.Bots', 'UpdateBotSession'):
            BotSession.FromString,
        }
        cardinalities = {
            'CreateBotSession': cardinality.Cardinality.UNARY_UNARY,
            'PostBotEventTemp': cardinality.Cardinality.UNARY_UNARY,
            'UpdateBotSession': 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.devtools.remoteworkers.v1test2.Bots',
            cardinalities,
            options=stub_options)
Пример #50
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
  request_serializers = {
    ('throttlerservice.Throttler', 'MaxRates'): throttlerdata_pb2.MaxRatesRequest.SerializeToString,
    ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata_pb2.SetMaxRateRequest.SerializeToString,
  }
  response_deserializers = {
    ('throttlerservice.Throttler', 'MaxRates'): throttlerdata_pb2.MaxRatesResponse.FromString,
    ('throttlerservice.Throttler', 'SetMaxRate'): throttlerdata_pb2.SetMaxRateResponse.FromString,
  }
  cardinalities = {
    'MaxRates': cardinality.Cardinality.UNARY_UNARY,
    'SetMaxRate': 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)
Пример #51
0
    def beta_create_ByteStream_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.bytestream.ByteStream', 'QueryWriteStatus'):
            QueryWriteStatusRequest.SerializeToString,
            ('google.bytestream.ByteStream', 'Read'):
            ReadRequest.SerializeToString,
            ('google.bytestream.ByteStream', 'Write'):
            WriteRequest.SerializeToString,
        }
        response_deserializers = {
            ('google.bytestream.ByteStream', 'QueryWriteStatus'):
            QueryWriteStatusResponse.FromString,
            ('google.bytestream.ByteStream', 'Read'):
            ReadResponse.FromString,
            ('google.bytestream.ByteStream', 'Write'):
            WriteResponse.FromString,
        }
        cardinalities = {
            'QueryWriteStatus': cardinality.Cardinality.UNARY_UNARY,
            'Read': cardinality.Cardinality.UNARY_STREAM,
            'Write': 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,
            'google.bytestream.ByteStream',
            cardinalities,
            options=stub_options)
Пример #52
0
    def beta_create_QR_QuotationService_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 = {
            ('QUANTAXIS_Runtime_Quotation.QR_QuotationService', 'QA_quotation_p2s'):
            quotation_req.SerializeToString,
            ('QUANTAXIS_Runtime_Quotation.QR_QuotationService', 'QA_quotation_s2s'):
            quotation_req.SerializeToString,
            ('QUANTAXIS_Runtime_Quotation.QR_QuotationService', 'QR_quotation_p2p'):
            quotation_req.SerializeToString,
        }
        response_deserializers = {
            ('QUANTAXIS_Runtime_Quotation.QR_QuotationService', 'QA_quotation_p2s'):
            quotation_rep.FromString,
            ('QUANTAXIS_Runtime_Quotation.QR_QuotationService', 'QA_quotation_s2s'):
            quotation_rep.FromString,
            ('QUANTAXIS_Runtime_Quotation.QR_QuotationService', 'QR_quotation_p2p'):
            quotation_rep.FromString,
        }
        cardinalities = {
            'QA_quotation_p2s': cardinality.Cardinality.UNARY_STREAM,
            'QA_quotation_s2s': cardinality.Cardinality.STREAM_STREAM,
            'QR_quotation_p2p': 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,
            'QUANTAXIS_Runtime_Quotation.QR_QuotationService',
            cardinalities,
            options=stub_options)
Пример #53
0
    def beta_create_OcrService_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 = {
            ('com.abcft.pdfextract.rpc.ocr.OcrService', 'batchPredictText'):
            BatchOcrRequest.SerializeToString,
            ('com.abcft.pdfextract.rpc.ocr.OcrService', 'detectElement'):
            OcrRequest.SerializeToString,
            ('com.abcft.pdfextract.rpc.ocr.OcrService', 'predictText'):
            OcrRequest.SerializeToString,
        }
        response_deserializers = {
            ('com.abcft.pdfextract.rpc.ocr.OcrService', 'batchPredictText'):
            TextReply.FromString,
            ('com.abcft.pdfextract.rpc.ocr.OcrService', 'detectElement'):
            ElementReply.FromString,
            ('com.abcft.pdfextract.rpc.ocr.OcrService', 'predictText'):
            TextReply.FromString,
        }
        cardinalities = {
            'batchPredictText': cardinality.Cardinality.UNARY_UNARY,
            'detectElement': cardinality.Cardinality.UNARY_UNARY,
            'predictText': 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,
            'com.abcft.pdfextract.rpc.ocr.OcrService',
            cardinalities,
            options=stub_options)
Пример #54
0
    def beta_create_RobotService_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 = {
            ('robot.RobotService', 'PutEnvironmentInfo'):
            EnvironmentInfo.SerializeToString,
            ('robot.RobotService', 'PutFlowerpotInfo'):
            FlowerpotInfo.SerializeToString,
            ('robot.RobotService', 'PutHumanCommonInfo'):
            HumanCommonInfo.SerializeToString,
            ('robot.RobotService', 'PutHumanHeartInfo'):
            HumanHeartInfo.SerializeToString,
        }
        response_deserializers = {
            ('robot.RobotService', 'PutEnvironmentInfo'): Empty.FromString,
            ('robot.RobotService', 'PutFlowerpotInfo'): Empty.FromString,
            ('robot.RobotService', 'PutHumanCommonInfo'): Empty.FromString,
            ('robot.RobotService', 'PutHumanHeartInfo'): Empty.FromString,
        }
        cardinalities = {
            'PutEnvironmentInfo': cardinality.Cardinality.UNARY_UNARY,
            'PutFlowerpotInfo': cardinality.Cardinality.UNARY_UNARY,
            'PutHumanCommonInfo': cardinality.Cardinality.UNARY_UNARY,
            'PutHumanHeartInfo': 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,
                                                 'robot.RobotService',
                                                 cardinalities,
                                                 options=stub_options)
Пример #55
0
def beta_create_Peer_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import fabric_pb2
  import fabric_pb2
  import fabric_pb2
  import fabric_pb2
  request_serializers = {
    ('protos.Peer', 'Chat'): fabric_pb2.Message.SerializeToString,
    ('protos.Peer', 'ProcessTransaction'): fabric_pb2.Transaction.SerializeToString,
  }
  response_deserializers = {
    ('protos.Peer', 'Chat'): fabric_pb2.Message.FromString,
    ('protos.Peer', 'ProcessTransaction'): fabric_pb2.Response.FromString,
  }
  cardinalities = {
    'Chat': cardinality.Cardinality.STREAM_STREAM,
    'ProcessTransaction': 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.Peer', cardinalities, options=stub_options)
Пример #56
0
def beta_create_RPCSeqAlloc_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import seq_alloc_pb2
  import seq_alloc_pb2
  import seq_alloc_pb2
  import seq_alloc_pb2
  request_serializers = {
    ('Proto.RPCSeqAlloc', 'GetCurSeq'): seq_alloc_pb2.GetCurSeqReq.SerializeToString,
    ('Proto.RPCSeqAlloc', 'GetNewSeq'): seq_alloc_pb2.GetNewSeqReq.SerializeToString,
  }
  response_deserializers = {
    ('Proto.RPCSeqAlloc', 'GetCurSeq'): seq_alloc_pb2.GetCurSeqRsp.FromString,
    ('Proto.RPCSeqAlloc', 'GetNewSeq'): seq_alloc_pb2.GetNewSeqRsp.FromString,
  }
  cardinalities = {
    'GetCurSeq': cardinality.Cardinality.UNARY_UNARY,
    'GetNewSeq': 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, 'Proto.RPCSeqAlloc', cardinalities, options=stub_options)
Пример #57
0
def beta_create_DataRetrieval_stub(channel,
                                   host=None,
                                   metadata_transformer=None,
                                   pool=None,
                                   pool_size=None):
    import service_pb2
    import service_pb2
    import service_pb2
    import service_pb2
    import service_pb2
    import service_pb2
    request_serializers = {
        ('exercise.DataRetrieval', 'GetDeck'):
        service_pb2.DeckRequest.SerializeToString,
        ('exercise.DataRetrieval', 'GetDetailedUserDeck'):
        service_pb2.UserDeckRequest.SerializeToString,
        ('exercise.DataRetrieval', 'GetUserDeck'):
        service_pb2.UserDeckRequest.SerializeToString,
    }
    response_deserializers = {
        ('exercise.DataRetrieval', 'GetDeck'):
        service_pb2.DeckResponse.FromString,
        ('exercise.DataRetrieval', 'GetDetailedUserDeck'):
        service_pb2.UserDeckResponse.FromString,
        ('exercise.DataRetrieval', 'GetUserDeck'):
        service_pb2.UserDeckResponse.FromString,
    }
    cardinalities = {
        'GetDeck': cardinality.Cardinality.UNARY_UNARY,
        'GetDetailedUserDeck': cardinality.Cardinality.UNARY_UNARY,
        'GetUserDeck': 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,
                                             'exercise.DataRetrieval',
                                             cardinalities,
                                             options=stub_options)
Пример #58
0
    def beta_create_TraceService_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.devtools.cloudtrace.v1.TraceService', 'GetTrace'):
            GetTraceRequest.SerializeToString,
            ('google.devtools.cloudtrace.v1.TraceService', 'ListTraces'):
            ListTracesRequest.SerializeToString,
            ('google.devtools.cloudtrace.v1.TraceService', 'PatchTraces'):
            PatchTracesRequest.SerializeToString,
        }
        response_deserializers = {
            ('google.devtools.cloudtrace.v1.TraceService', 'GetTrace'):
            Trace.FromString,
            ('google.devtools.cloudtrace.v1.TraceService', 'ListTraces'):
            ListTracesResponse.FromString,
            ('google.devtools.cloudtrace.v1.TraceService', 'PatchTraces'):
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        }
        cardinalities = {
            'GetTrace': cardinality.Cardinality.UNARY_UNARY,
            'ListTraces': cardinality.Cardinality.UNARY_UNARY,
            'PatchTraces': 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.devtools.cloudtrace.v1.TraceService',
            cardinalities,
            options=stub_options)
Пример #59
0
    def beta_create_AggregatedDiscoveryService_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.discovery.v2.AggregatedDiscoveryService', 'DeltaAggregatedResources'):
            envoy_dot_api_dot_v2_dot_discovery__pb2.DeltaDiscoveryRequest.
            SerializeToString,
            ('envoy.service.discovery.v2.AggregatedDiscoveryService', 'StreamAggregatedResources'):
            envoy_dot_api_dot_v2_dot_discovery__pb2.DiscoveryRequest.
            SerializeToString,
        }
        response_deserializers = {
            ('envoy.service.discovery.v2.AggregatedDiscoveryService', 'DeltaAggregatedResources'):
            envoy_dot_api_dot_v2_dot_discovery__pb2.DeltaDiscoveryResponse.
            FromString,
            ('envoy.service.discovery.v2.AggregatedDiscoveryService', 'StreamAggregatedResources'):
            envoy_dot_api_dot_v2_dot_discovery__pb2.DiscoveryResponse.
            FromString,
        }
        cardinalities = {
            'DeltaAggregatedResources': cardinality.Cardinality.STREAM_STREAM,
            'StreamAggregatedResources': 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,
            'envoy.service.discovery.v2.AggregatedDiscoveryService',
            cardinalities,
            options=stub_options)
    def beta_create_HillClimberService_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 = {
            ('hcfi.HillClimberService', 'InitTransaction'):
            messages__pb2.InitTransactionRequest.SerializeToString,
            ('hcfi.HillClimberService', 'SendFitness'):
            messages__pb2.FitnessRequest.SerializeToString,
            ('hcfi.HillClimberService', 'StopTransaction'):
            messages__pb2.StopRequest.SerializeToString,
        }
        response_deserializers = {
            ('hcfi.HillClimberService', 'InitTransaction'):
            messages__pb2.FitnessResponse.FromString,
            ('hcfi.HillClimberService', 'SendFitness'):
            messages__pb2.FitnessResponse.FromString,
            ('hcfi.HillClimberService', 'StopTransaction'):
            messages__pb2.StopResponse.FromString,
        }
        cardinalities = {
            'InitTransaction': cardinality.Cardinality.UNARY_UNARY,
            'SendFitness': cardinality.Cardinality.UNARY_UNARY,
            'StopTransaction': 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,
                                                 'hcfi.HillClimberService',
                                                 cardinalities,
                                                 options=stub_options)