Search in sources :

Example 1 with MethodView

use of com.google.api.codegen.configgen.viewmodel.MethodView in project toolkit by googleapis.

the class MethodTransformer method generateMethods.

public List<MethodView> generateMethods(InterfaceModel apiInterface, Map<String, String> collectionNameMap) {
    ImmutableList.Builder<MethodView> methods = ImmutableList.builder();
    for (MethodModel method : apiInterface.getMethods()) {
        MethodView.Builder methodView = MethodView.newBuilder();
        methodView.name(method.getRawName());
        generateField(method, methodView);
        generatePageStreaming(method, methodView);
        generateRetry(method, methodView);
        generateFieldNamePatterns(method, methodView, collectionNameMap);
        methodView.timeoutMillis("60000");
        methods.add(methodView.build());
    }
    return methods.build();
}
Also used : MethodModel(com.google.api.codegen.config.MethodModel) ImmutableList(com.google.common.collect.ImmutableList) MethodView(com.google.api.codegen.configgen.viewmodel.MethodView)

Aggregations

MethodModel (com.google.api.codegen.config.MethodModel)1 MethodView (com.google.api.codegen.configgen.viewmodel.MethodView)1 ImmutableList (com.google.common.collect.ImmutableList)1