use of com.google.api.codegen.CollectionOneofProto in project toolkit by googleapis.
the class GapicProductConfig method createResourceNameOneofConfigs.
private static ImmutableMap<String, ResourceNameOneofConfig> createResourceNameOneofConfigs(DiagCollector diagCollector, Iterable<CollectionOneofProto> oneofConfigProtos, ImmutableMap<String, SingleResourceNameConfig> singleResourceNameConfigs, ImmutableMap<String, FixedResourceNameConfig> fixedResourceNameConfigs, @Nullable ProtoFile file) {
ImmutableMap.Builder<String, ResourceNameOneofConfig> oneofConfigBuilder = ImmutableMap.builder();
for (CollectionOneofProto oneofProto : oneofConfigProtos) {
ResourceNameOneofConfig oneofConfig = ResourceNameOneofConfig.createResourceNameOneof(diagCollector, oneofProto, singleResourceNameConfigs, fixedResourceNameConfigs, file);
if (oneofConfig == null) {
continue;
}
oneofConfigBuilder.put(oneofConfig.getEntityId(), oneofConfig);
}
return oneofConfigBuilder.build();
}
Aggregations