use of com.google.api.codegen.FlatteningGroupProto in project toolkit by googleapis.
the class MethodConfig method createFlattening.
@Nullable
static ImmutableList<FlatteningConfig> createFlattening(DiagCollector diagCollector, ResourceNameMessageConfigs messageConfigs, ImmutableMap<String, ResourceNameConfig> resourceNameConfigs, MethodConfigProto methodConfigProto, MethodModel method) {
boolean missing = false;
ImmutableList.Builder<FlatteningConfig> flatteningGroupsBuilder = ImmutableList.builder();
for (FlatteningGroupProto flatteningGroup : methodConfigProto.getFlattening().getGroupsList()) {
FlatteningConfig groupConfig = FlatteningConfig.createFlattening(diagCollector, messageConfigs, resourceNameConfigs, methodConfigProto, flatteningGroup, method);
if (groupConfig == null) {
missing = true;
} else {
flatteningGroupsBuilder.add(groupConfig);
}
}
if (missing) {
return null;
}
return flatteningGroupsBuilder.build();
}
Aggregations