Search in sources :

Example 1 with CollectionOneofProto

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();
}
Also used : ImmutableMap(com.google.common.collect.ImmutableMap) CollectionOneofProto(com.google.api.codegen.CollectionOneofProto)

Aggregations

CollectionOneofProto (com.google.api.codegen.CollectionOneofProto)1 ImmutableMap (com.google.common.collect.ImmutableMap)1