Search in sources :

Example 6 with DynamicLangApiMethodTransformer

use of com.google.api.codegen.transformer.DynamicLangApiMethodTransformer in project toolkit by googleapis.

the class RubyPackageMetadataTransformer method createExampleApiMethodView.

private OptionalArrayMethodView createExampleApiMethodView(GapicMethodContext context, boolean packageHasMultipleServices) {
    OptionalArrayMethodView initialApiMethodView = new DynamicLangApiMethodTransformer(new RubyApiMethodParamTransformer()).generateMethod(context, packageHasMultipleServices);
    OptionalArrayMethodView.Builder apiMethodView = initialApiMethodView.toBuilder();
    InitCodeTransformer initCodeTransformer = new InitCodeTransformer();
    InitCodeView initCodeView = initCodeTransformer.generateInitCode(context, testCaseTransformer.createSmokeTestInitContext(context));
    apiMethodView.initCode(initCodeView);
    return apiMethodView.build();
}
Also used : OptionalArrayMethodView(com.google.api.codegen.viewmodel.OptionalArrayMethodView) DynamicLangApiMethodTransformer(com.google.api.codegen.transformer.DynamicLangApiMethodTransformer) InitCodeTransformer(com.google.api.codegen.transformer.InitCodeTransformer) InitCodeView(com.google.api.codegen.viewmodel.InitCodeView)

Aggregations

DynamicLangApiMethodTransformer (com.google.api.codegen.transformer.DynamicLangApiMethodTransformer)6 InitCodeTransformer (com.google.api.codegen.transformer.InitCodeTransformer)6 InitCodeView (com.google.api.codegen.viewmodel.InitCodeView)6 OptionalArrayMethodView (com.google.api.codegen.viewmodel.OptionalArrayMethodView)6 TestCaseTransformer (com.google.api.codegen.transformer.TestCaseTransformer)1