use of com.google.protobuf.Api in project toolkit by googleapis.
the class ProtoConfigMerger method getPackageName.
private String getPackageName(Model model, ConfigHelper helper) {
if (model.getServiceConfig().getApisCount() > 0) {
Api api = model.getServiceConfig().getApis(0);
Interface apiInterface = model.getSymbolTable().lookupInterface(api.getName());
if (apiInterface != null) {
return apiInterface.getFile().getFullName();
}
}
helper.error(model.getLocation(), "No interface found");
return null;
}