use of com.google.api.codegen.viewmodel.ReroutedGrpcView in project toolkit by googleapis.
the class CSharpCommonTransformer method generateReroutedGrpcView.
public List<ReroutedGrpcView> generateReroutedGrpcView(GapicInterfaceContext context) {
SurfaceNamer namer = context.getNamer();
Set<ReroutedGrpcView> reroutedViews = new LinkedHashSet<>();
for (MethodModel method : getSupportedMethods(context)) {
MethodConfig methodConfig = context.getMethodConfig(method);
String reroute = methodConfig.getRerouteToGrpcInterface();
if (reroute != null) {
ReroutedGrpcView rerouted = ReroutedGrpcView.newBuilder().grpcClientVarName(namer.getReroutedGrpcClientVarName(methodConfig)).typeName(namer.getReroutedGrpcTypeName(context.getImportTypeTable(), methodConfig)).getMethodName(namer.getReroutedGrpcMethodName(methodConfig)).build();
reroutedViews.add(rerouted);
}
}
return new ArrayList<ReroutedGrpcView>(reroutedViews);
}
Aggregations