Search in sources :

Example 11 with OptionalArrayMethodView

use of com.google.api.codegen.viewmodel.OptionalArrayMethodView 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

OptionalArrayMethodView (com.google.api.codegen.viewmodel.OptionalArrayMethodView)11 InitCodeView (com.google.api.codegen.viewmodel.InitCodeView)7 DynamicLangApiMethodTransformer (com.google.api.codegen.transformer.DynamicLangApiMethodTransformer)6 InitCodeTransformer (com.google.api.codegen.transformer.InitCodeTransformer)6 MethodModel (com.google.api.codegen.config.MethodModel)5 FlatteningConfig (com.google.api.codegen.config.FlatteningConfig)4 GapicMethodContext (com.google.api.codegen.transformer.GapicMethodContext)4 SurfaceNamer (com.google.api.codegen.transformer.SurfaceNamer)4 FileHeaderView (com.google.api.codegen.viewmodel.FileHeaderView)3 SmokeTestClassView (com.google.api.codegen.viewmodel.testing.SmokeTestClassView)3 TestCaseTransformer (com.google.api.codegen.transformer.TestCaseTransformer)2 ImportSectionView (com.google.api.codegen.viewmodel.ImportSectionView)2 FieldConfig (com.google.api.codegen.config.FieldConfig)1 GrpcStreamingType (com.google.api.codegen.config.GrpcStreamingConfig.GrpcStreamingType)1 InitCodeOutputType (com.google.api.codegen.metacode.InitCodeContext.InitCodeOutputType)1 SymbolTable (com.google.api.codegen.util.SymbolTable)1 RequestObjectParamView (com.google.api.codegen.viewmodel.RequestObjectParamView)1