use of com.google.api.codegen.transformer.DynamicLangApiMethodTransformer in project toolkit by googleapis.
the class PythonGapicSurfaceTestTransformer method createSmokeTestCaseApiMethodView.
private OptionalArrayMethodView createSmokeTestCaseApiMethodView(GapicMethodContext context) {
OptionalArrayMethodView initialApiMethodView = new DynamicLangApiMethodTransformer(new PythonApiMethodParamTransformer()).generateMethod(context);
OptionalArrayMethodView.Builder apiMethodView = initialApiMethodView.toBuilder();
InitCodeTransformer initCodeTransformer = new InitCodeTransformer();
InitCodeView initCodeView = initCodeTransformer.generateInitCode(context, testCaseTransformer.createSmokeTestInitContext(context));
apiMethodView.initCode(initCodeView);
return apiMethodView.build();
}
use of com.google.api.codegen.transformer.DynamicLangApiMethodTransformer in project toolkit by googleapis.
the class RubyGapicSurfaceTestTransformer method createSmokeTestCaseApiMethodView.
private OptionalArrayMethodView createSmokeTestCaseApiMethodView(GapicMethodContext context, boolean packageHasMultipleServices) {
OptionalArrayMethodView initialApiMethodView = new DynamicLangApiMethodTransformer(new RubyApiMethodParamTransformer()).generateMethod(context, packageHasMultipleServices);
OptionalArrayMethodView.Builder apiMethodView = initialApiMethodView.toBuilder();
TestCaseTransformer testCaseTransformer = new TestCaseTransformer(valueProducer, packageHasMultipleServices);
InitCodeTransformer initCodeTransformer = new InitCodeTransformer(false);
InitCodeView initCodeView = initCodeTransformer.generateInitCode(context, testCaseTransformer.createSmokeTestInitContext(context));
apiMethodView.initCode(initCodeView);
return apiMethodView.build();
}
use of com.google.api.codegen.transformer.DynamicLangApiMethodTransformer in project toolkit by googleapis.
the class NodeJSGapicSurfaceTestTransformer method createSmokeTestCaseApiMethodView.
private OptionalArrayMethodView createSmokeTestCaseApiMethodView(GapicMethodContext context, boolean packageHasMultipleServices) {
OptionalArrayMethodView initialApiMethodView = new DynamicLangApiMethodTransformer(new NodeJSApiMethodParamTransformer()).generateMethod(context, packageHasMultipleServices);
OptionalArrayMethodView.Builder apiMethodView = initialApiMethodView.toBuilder();
InitCodeTransformer initCodeTransformer = new InitCodeTransformer();
InitCodeView initCodeView = initCodeTransformer.generateInitCode(context, testCaseTransformer.createSmokeTestInitContext(context));
apiMethodView.initCode(initCodeView);
apiMethodView.packageName("../src");
return apiMethodView.build();
}
use of com.google.api.codegen.transformer.DynamicLangApiMethodTransformer in project toolkit by googleapis.
the class NodeJSPackageMetadataTransformer method createExampleApiMethodView.
private OptionalArrayMethodView createExampleApiMethodView(GapicMethodContext context, boolean packageHasMultipleServices) {
OptionalArrayMethodView initialApiMethodView = new DynamicLangApiMethodTransformer(new NodeJSApiMethodParamTransformer()).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();
}
use of com.google.api.codegen.transformer.DynamicLangApiMethodTransformer in project toolkit by googleapis.
the class PhpGapicSurfaceTestTransformer method createSmokeTestCaseApiMethodView.
private OptionalArrayMethodView createSmokeTestCaseApiMethodView(GapicMethodContext context) {
OptionalArrayMethodView initialApiMethodView = new DynamicLangApiMethodTransformer(new PhpApiMethodParamTransformer()).generateMethod(context);
OptionalArrayMethodView.Builder apiMethodView = initialApiMethodView.toBuilder();
InitCodeTransformer initCodeTransformer = new InitCodeTransformer();
InitCodeView initCodeView = initCodeTransformer.generateInitCode(context, testCaseTransformer.createSmokeTestInitContext(context));
apiMethodView.initCode(initCodeView);
return apiMethodView.build();
}
Aggregations