Search in sources :

Example 11 with PageStreamingConfig

use of com.google.api.codegen.config.PageStreamingConfig in project toolkit by googleapis.

the class CSharpGapicSnippetsTransformer method generatePagedRequestAsyncMethod.

private StaticLangApiMethodSnippetView generatePagedRequestAsyncMethod(MethodContext methodContext) {
    StaticLangApiMethodView method = apiMethodTransformer.generatePagedRequestObjectAsyncMethod(methodContext, csharpCommonTransformer.pagedMethodAdditionalParams());
    SurfaceNamer namer = methodContext.getNamer();
    PageStreamingConfig pageStreaming = methodContext.getMethodConfig().getPageStreaming();
    FieldConfig resourceFieldConfig = pageStreaming.getResourcesFieldConfig();
    String callerResponseTypeName = namer.getAndSaveCallerAsyncPagedResponseTypeName(methodContext, resourceFieldConfig);
    return StaticLangApiMethodSnippetView.newBuilder().method(method).snippetMethodName(method.name() + "_RequestObject").callerResponseTypeName(callerResponseTypeName).apiClassName(namer.getApiWrapperClassName(methodContext.getInterfaceConfig())).apiVariableName(method.apiVariableName()).build();
}
Also used : StaticLangApiMethodView(com.google.api.codegen.viewmodel.StaticLangApiMethodView) FieldConfig(com.google.api.codegen.config.FieldConfig) PageStreamingConfig(com.google.api.codegen.config.PageStreamingConfig) SurfaceNamer(com.google.api.codegen.transformer.SurfaceNamer)

Aggregations

PageStreamingConfig (com.google.api.codegen.config.PageStreamingConfig)11 FieldConfig (com.google.api.codegen.config.FieldConfig)8 MethodModel (com.google.api.codegen.config.MethodModel)5 StaticLangApiMethodView (com.google.api.codegen.viewmodel.StaticLangApiMethodView)5 FieldModel (com.google.api.codegen.config.FieldModel)4 SurfaceNamer (com.google.api.codegen.transformer.SurfaceNamer)4 MethodConfig (com.google.api.codegen.config.MethodConfig)2 BatchingConfig (com.google.api.codegen.config.BatchingConfig)1 DiscoveryMethodModel (com.google.api.codegen.config.DiscoveryMethodModel)1 GrpcStreamingConfig (com.google.api.codegen.config.GrpcStreamingConfig)1 InitCodeLineType (com.google.api.codegen.metacode.InitCodeLineType)1 InitCodeNode (com.google.api.codegen.metacode.InitCodeNode)1 ApiCallableView (com.google.api.codegen.viewmodel.ApiCallableView)1 PageStreamingDescriptorClassView (com.google.api.codegen.viewmodel.PageStreamingDescriptorClassView)1 PageStreamingDescriptorView (com.google.api.codegen.viewmodel.PageStreamingDescriptorView)1 PagedListResponseFactoryClassView (com.google.api.codegen.viewmodel.PagedListResponseFactoryClassView)1 Builder (com.google.api.codegen.viewmodel.StaticLangApiMethodView.Builder)1 UnpagedListCallableMethodDetailView (com.google.api.codegen.viewmodel.UnpagedListCallableMethodDetailView)1 ImmutableList (com.google.common.collect.ImmutableList)1 ArrayList (java.util.ArrayList)1