Search in sources :

Example 1 with Api

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;
}
Also used : Api(com.google.protobuf.Api) Interface(com.google.api.tools.framework.model.Interface)

Aggregations

Interface (com.google.api.tools.framework.model.Interface)1 Api (com.google.protobuf.Api)1