use of com.google.api.codegen.InterfaceView in project toolkit by googleapis.
the class PythonGapicSurfaceTransformer method topLevelRequireViews.
private List<VersionIndexRequireView> topLevelRequireViews(Model model, GapicProductConfig productConfig, SurfaceNamer namer) {
ImmutableList.Builder<VersionIndexRequireView> views = ImmutableList.builder();
Iterable<Interface> apiInterfaces = new InterfaceView().getElementIterable(model);
for (Interface apiInterface : apiInterfaces) {
views.add(VersionIndexRequireView.newBuilder().clientName(namer.getApiWrapperClassName(productConfig.getInterfaceConfig(apiInterface))).localName(namer.getApiWrapperVariableName(productConfig.getInterfaceConfig(apiInterface))).fileName(namer.getNotImplementedString("VersionIndexRequireView.fileName")).build());
}
return views.build();
}
use of com.google.api.codegen.InterfaceView in project toolkit by googleapis.
the class PythonImportSectionTransformer method generateTopLevelEntryPointAppImports.
private List<ImportFileView> generateTopLevelEntryPointAppImports(Model model, GapicProductConfig productConfig, SurfaceNamer namer, boolean packageHasEnums) {
Set<ImportFileView> imports = new TreeSet<>(importFileViewComparator());
for (Interface apiInterface : new InterfaceView().getElementIterable(model)) {
imports.add(createImport(namer.getVersionedDirectoryNamespace(), namer.getApiWrapperClassName(productConfig.getInterfaceConfig(apiInterface))));
}
if (packageHasEnums) {
imports.add(createImport(namer.getVersionedDirectoryNamespace(), "enums"));
}
imports.add(createImport(namer.getVersionedDirectoryNamespace(), "types"));
return ImmutableList.<ImportFileView>builder().addAll(imports).build();
}
Aggregations