• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc.  All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 //     * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //     * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 //     * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 package com.google.protobuf;
32 
33 import com.google.protobuf.testing.Proto3Testing.Proto3Message;
34 import com.google.protobuf.testing.Proto3Testing.Proto3MessageWithMaps;
35 import java.util.HashMap;
36 import java.util.Map;
37 
38 /** Creates instances of {@link Proto3Message} based on the tree configuration. */
39 public final class Proto3MessageFactory implements ExperimentalMessageFactory<Proto3Message> {
40   private final int numRepeatedFields;
41   private final int branchingFactor;
42   private final Proto3MessageFactory nextLevel;
43   private final ExperimentalTestDataProvider data;
44 
Proto3MessageFactory( int numRepeatedFields, int stringLength, int branchingFactor, int treeDepth)45   public Proto3MessageFactory(
46       int numRepeatedFields, int stringLength, int branchingFactor, int treeDepth) {
47     this(
48         new ExperimentalTestDataProvider(stringLength),
49         numRepeatedFields,
50         branchingFactor,
51         treeDepth);
52   }
53 
Proto3MessageFactory( ExperimentalTestDataProvider data, int numRepeatedFields, int branchingFactor, int treeDepth)54   private Proto3MessageFactory(
55       ExperimentalTestDataProvider data,
56       int numRepeatedFields,
57       int branchingFactor,
58       int treeDepth) {
59     this.numRepeatedFields = numRepeatedFields;
60     this.branchingFactor = branchingFactor;
61     this.data = data;
62     if (treeDepth > 0) {
63       nextLevel = new Proto3MessageFactory(data, numRepeatedFields, branchingFactor, treeDepth - 1);
64     } else {
65       nextLevel = null;
66     }
67   }
68 
69   @Override
dataProvider()70   public ExperimentalTestDataProvider dataProvider() {
71     return data;
72   }
73 
74   @Override
newMessage()75   public Proto3Message newMessage() {
76     Proto3Message.Builder builder = Proto3Message.newBuilder();
77     builder.setFieldDouble1(data.getDouble());
78     builder.setFieldFloat2(data.getFloat());
79     builder.setFieldInt643(data.getLong());
80     builder.setFieldUint644(data.getLong());
81     builder.setFieldInt325(data.getInt());
82     builder.setFieldFixed646(data.getLong());
83     builder.setFieldFixed327(data.getInt());
84     builder.setFieldBool8(data.getBool());
85     builder.setFieldString9(data.getString());
86     // We don't populate the message field. Instead we apply the branching factor to the
87     // repeated message field below.
88     builder.setFieldBytes11(data.getBytes());
89     builder.setFieldUint3212(data.getInt());
90     builder.setFieldEnum13Value(data.getEnum());
91     builder.setFieldSfixed3214(data.getInt());
92     builder.setFieldSfixed6415(data.getLong());
93     builder.setFieldSint3216(data.getInt());
94     builder.setFieldSint6417(data.getLong());
95 
96     for (int i = 0; i < numRepeatedFields; ++i) {
97       builder.addFieldDoubleList18(data.getDouble());
98       builder.addFieldFloatList19(data.getFloat());
99       builder.addFieldInt64List20(data.getLong());
100       builder.addFieldUint64List21(data.getLong());
101       builder.addFieldInt32List22(data.getInt());
102       builder.addFieldFixed64List23(data.getLong());
103       builder.addFieldFixed32List24(data.getInt());
104       builder.addFieldBoolList25(data.getBool());
105       builder.addFieldStringList26(data.getString());
106       // Repeated message field is controlled by the branching factor below.
107       builder.addFieldBytesList28(data.getBytes());
108       builder.addFieldUint32List29(data.getInt());
109       builder.addFieldEnumList30Value(data.getEnum());
110       builder.addFieldSfixed32List31(data.getInt());
111       builder.addFieldSfixed64List32(data.getLong());
112       builder.addFieldSint32List33(data.getInt());
113       builder.addFieldSint64List34(data.getLong());
114 
115       builder.addFieldDoubleListPacked35(data.getDouble());
116       builder.addFieldFloatListPacked36(data.getFloat());
117       builder.addFieldInt64ListPacked37(data.getLong());
118       builder.addFieldUint64ListPacked38(data.getLong());
119       builder.addFieldInt32ListPacked39(data.getInt());
120       builder.addFieldFixed64ListPacked40(data.getLong());
121       builder.addFieldFixed32ListPacked41(data.getInt());
122       builder.addFieldBoolListPacked42(data.getBool());
123       builder.addFieldUint32ListPacked43(data.getInt());
124       builder.addFieldEnumListPacked44Value(data.getEnum());
125       builder.addFieldSfixed32ListPacked45(data.getInt());
126       builder.addFieldSfixed64ListPacked46(data.getLong());
127       builder.addFieldSint32ListPacked47(data.getInt());
128       builder.addFieldSint64ListPacked48(data.getLong());
129     }
130 
131     // Handle the branching factor.
132     if (nextLevel != null) {
133       for (int i = 0; i < branchingFactor; ++i) {
134         builder.addFieldMessageList27(nextLevel.newMessage());
135       }
136     }
137 
138     return builder.build();
139   }
140 
141   private interface MapValueProvider<T> {
getValue()142     public T getValue();
143   }
144 
145   private final MapValueProvider<Integer> integerProvider =
146       new MapValueProvider<Integer>() {
147         @Override
148         public Integer getValue() {
149           return data.getInt();
150         }
151       };
152   private final MapValueProvider<Long> longProvider =
153       new MapValueProvider<Long>() {
154         @Override
155         public Long getValue() {
156           return data.getLong();
157         }
158       };
159   private final MapValueProvider<String> stringProvider =
160       new MapValueProvider<String>() {
161         @Override
162         public String getValue() {
163           return data.getString();
164         }
165       };
166   private final MapValueProvider<ByteString> bytesProvider =
167       new MapValueProvider<ByteString>() {
168         @Override
169         public ByteString getValue() {
170           return data.getBytes();
171         }
172       };
173   private final MapValueProvider<Boolean> booleanProvider =
174       new MapValueProvider<Boolean>() {
175         @Override
176         public Boolean getValue() {
177           return data.getBool();
178         }
179       };
180   private final MapValueProvider<Float> floatProvider =
181       new MapValueProvider<Float>() {
182         @Override
183         public Float getValue() {
184           return data.getFloat();
185         }
186       };
187   private final MapValueProvider<Double> doubleProvider =
188       new MapValueProvider<Double>() {
189         @Override
190         public Double getValue() {
191           return data.getDouble();
192         }
193       };
194   private final MapValueProvider<Proto3Message> messageProvider =
195       new MapValueProvider<Proto3Message>() {
196         @Override
197         public Proto3Message getValue() {
198           return newMessage();
199         }
200       };
201   private final MapValueProvider<Proto3Message.TestEnum> enumProvider =
202       new MapValueProvider<Proto3Message.TestEnum>() {
203         @Override
204         public Proto3Message.TestEnum getValue() {
205           return Proto3Message.TestEnum.forNumber(data.getEnum());
206         }
207       };
208 
populateIntegerMap(MapValueProvider<V> provider)209   private <V> Map<Integer, V> populateIntegerMap(MapValueProvider<V> provider) {
210     Map<Integer, V> map = new HashMap<>();
211     for (int i = 0; i < numRepeatedFields; ++i) {
212       map.put(data.getInt(), provider.getValue());
213     }
214     return map;
215   }
216 
populateLongMap(MapValueProvider<V> provider)217   private <V> Map<Long, V> populateLongMap(MapValueProvider<V> provider) {
218     Map<Long, V> map = new HashMap<>();
219     for (int i = 0; i < numRepeatedFields; ++i) {
220       map.put(data.getLong(), provider.getValue());
221     }
222     return map;
223   }
224 
populateStringMap(MapValueProvider<V> provider)225   private <V> Map<String, V> populateStringMap(MapValueProvider<V> provider) {
226     Map<String, V> map = new HashMap<>();
227     for (int i = 0; i < numRepeatedFields; ++i) {
228       map.put(data.getString(), provider.getValue());
229     }
230     return map;
231   }
232 
populateBooleanMap(MapValueProvider<V> provider)233   private <V> Map<Boolean, V> populateBooleanMap(MapValueProvider<V> provider) {
234     Map<Boolean, V> map = new HashMap<>();
235     map.put(false, provider.getValue());
236     map.put(true, provider.getValue());
237     return map;
238   }
239 
newMessageWithMaps()240   public Proto3MessageWithMaps newMessageWithMaps() {
241     Proto3MessageWithMaps.Builder builder = Proto3MessageWithMaps.newBuilder();
242 
243     builder.putAllFieldMapBoolBool1(populateBooleanMap(booleanProvider));
244     builder.putAllFieldMapBoolBytes2(populateBooleanMap(bytesProvider));
245     builder.putAllFieldMapBoolDouble3(populateBooleanMap(doubleProvider));
246     builder.putAllFieldMapBoolEnum4(populateBooleanMap(enumProvider));
247     builder.putAllFieldMapBoolFixed325(populateBooleanMap(integerProvider));
248     builder.putAllFieldMapBoolFixed646(populateBooleanMap(longProvider));
249     builder.putAllFieldMapBoolFloat7(populateBooleanMap(floatProvider));
250     builder.putAllFieldMapBoolInt328(populateBooleanMap(integerProvider));
251     builder.putAllFieldMapBoolInt649(populateBooleanMap(longProvider));
252     builder.putAllFieldMapBoolMessage10(populateBooleanMap(messageProvider));
253     builder.putAllFieldMapBoolSfixed3211(populateBooleanMap(integerProvider));
254     builder.putAllFieldMapBoolSfixed6412(populateBooleanMap(longProvider));
255     builder.putAllFieldMapBoolSint3213(populateBooleanMap(integerProvider));
256     builder.putAllFieldMapBoolSint6414(populateBooleanMap(longProvider));
257     builder.putAllFieldMapBoolString15(populateBooleanMap(stringProvider));
258     builder.putAllFieldMapBoolUint3216(populateBooleanMap(integerProvider));
259     builder.putAllFieldMapBoolUint6417(populateBooleanMap(longProvider));
260     builder.putAllFieldMapFixed32Bool18(populateIntegerMap(booleanProvider));
261     builder.putAllFieldMapFixed32Bytes19(populateIntegerMap(bytesProvider));
262     builder.putAllFieldMapFixed32Double20(populateIntegerMap(doubleProvider));
263     builder.putAllFieldMapFixed32Enum21(populateIntegerMap(enumProvider));
264     builder.putAllFieldMapFixed32Fixed3222(populateIntegerMap(integerProvider));
265     builder.putAllFieldMapFixed32Fixed6423(populateIntegerMap(longProvider));
266     builder.putAllFieldMapFixed32Float24(populateIntegerMap(floatProvider));
267     builder.putAllFieldMapFixed32Int3225(populateIntegerMap(integerProvider));
268     builder.putAllFieldMapFixed32Int6426(populateIntegerMap(longProvider));
269     builder.putAllFieldMapFixed32Message27(populateIntegerMap(messageProvider));
270     builder.putAllFieldMapFixed32Sfixed3228(populateIntegerMap(integerProvider));
271     builder.putAllFieldMapFixed32Sfixed6429(populateIntegerMap(longProvider));
272     builder.putAllFieldMapFixed32Sint3230(populateIntegerMap(integerProvider));
273     builder.putAllFieldMapFixed32Sint6431(populateIntegerMap(longProvider));
274     builder.putAllFieldMapFixed32String32(populateIntegerMap(stringProvider));
275     builder.putAllFieldMapFixed32Uint3233(populateIntegerMap(integerProvider));
276     builder.putAllFieldMapFixed32Uint6434(populateIntegerMap(longProvider));
277     builder.putAllFieldMapFixed64Bool35(populateLongMap(booleanProvider));
278     builder.putAllFieldMapFixed64Bytes36(populateLongMap(bytesProvider));
279     builder.putAllFieldMapFixed64Double37(populateLongMap(doubleProvider));
280     builder.putAllFieldMapFixed64Enum38(populateLongMap(enumProvider));
281     builder.putAllFieldMapFixed64Fixed3239(populateLongMap(integerProvider));
282     builder.putAllFieldMapFixed64Fixed6440(populateLongMap(longProvider));
283     builder.putAllFieldMapFixed64Float41(populateLongMap(floatProvider));
284     builder.putAllFieldMapFixed64Int3242(populateLongMap(integerProvider));
285     builder.putAllFieldMapFixed64Int6443(populateLongMap(longProvider));
286     builder.putAllFieldMapFixed64Message44(populateLongMap(messageProvider));
287     builder.putAllFieldMapFixed64Sfixed3245(populateLongMap(integerProvider));
288     builder.putAllFieldMapFixed64Sfixed6446(populateLongMap(longProvider));
289     builder.putAllFieldMapFixed64Sint3247(populateLongMap(integerProvider));
290     builder.putAllFieldMapFixed64Sint6448(populateLongMap(longProvider));
291     builder.putAllFieldMapFixed64String49(populateLongMap(stringProvider));
292     builder.putAllFieldMapFixed64Uint3250(populateLongMap(integerProvider));
293     builder.putAllFieldMapFixed64Uint6451(populateLongMap(longProvider));
294     builder.putAllFieldMapInt32Bool52(populateIntegerMap(booleanProvider));
295     builder.putAllFieldMapInt32Bytes53(populateIntegerMap(bytesProvider));
296     builder.putAllFieldMapInt32Double54(populateIntegerMap(doubleProvider));
297     builder.putAllFieldMapInt32Enum55(populateIntegerMap(enumProvider));
298     builder.putAllFieldMapInt32Fixed3256(populateIntegerMap(integerProvider));
299     builder.putAllFieldMapInt32Fixed6457(populateIntegerMap(longProvider));
300     builder.putAllFieldMapInt32Float58(populateIntegerMap(floatProvider));
301     builder.putAllFieldMapInt32Int3259(populateIntegerMap(integerProvider));
302     builder.putAllFieldMapInt32Int6460(populateIntegerMap(longProvider));
303     builder.putAllFieldMapInt32Message61(populateIntegerMap(messageProvider));
304     builder.putAllFieldMapInt32Sfixed3262(populateIntegerMap(integerProvider));
305     builder.putAllFieldMapInt32Sfixed6463(populateIntegerMap(longProvider));
306     builder.putAllFieldMapInt32Sint3264(populateIntegerMap(integerProvider));
307     builder.putAllFieldMapInt32Sint6465(populateIntegerMap(longProvider));
308     builder.putAllFieldMapInt32String66(populateIntegerMap(stringProvider));
309     builder.putAllFieldMapInt32Uint3267(populateIntegerMap(integerProvider));
310     builder.putAllFieldMapInt32Uint6468(populateIntegerMap(longProvider));
311     builder.putAllFieldMapInt64Bool69(populateLongMap(booleanProvider));
312     builder.putAllFieldMapInt64Bytes70(populateLongMap(bytesProvider));
313     builder.putAllFieldMapInt64Double71(populateLongMap(doubleProvider));
314     builder.putAllFieldMapInt64Enum72(populateLongMap(enumProvider));
315     builder.putAllFieldMapInt64Fixed3273(populateLongMap(integerProvider));
316     builder.putAllFieldMapInt64Fixed6474(populateLongMap(longProvider));
317     builder.putAllFieldMapInt64Float75(populateLongMap(floatProvider));
318     builder.putAllFieldMapInt64Int3276(populateLongMap(integerProvider));
319     builder.putAllFieldMapInt64Int6477(populateLongMap(longProvider));
320     builder.putAllFieldMapInt64Message78(populateLongMap(messageProvider));
321     builder.putAllFieldMapInt64Sfixed3279(populateLongMap(integerProvider));
322     builder.putAllFieldMapInt64Sfixed6480(populateLongMap(longProvider));
323     builder.putAllFieldMapInt64Sint3281(populateLongMap(integerProvider));
324     builder.putAllFieldMapInt64Sint6482(populateLongMap(longProvider));
325     builder.putAllFieldMapInt64String83(populateLongMap(stringProvider));
326     builder.putAllFieldMapInt64Uint3284(populateLongMap(integerProvider));
327     builder.putAllFieldMapInt64Uint6485(populateLongMap(longProvider));
328     builder.putAllFieldMapSfixed32Bool86(populateIntegerMap(booleanProvider));
329     builder.putAllFieldMapSfixed32Bytes87(populateIntegerMap(bytesProvider));
330     builder.putAllFieldMapSfixed32Double88(populateIntegerMap(doubleProvider));
331     builder.putAllFieldMapSfixed32Enum89(populateIntegerMap(enumProvider));
332     builder.putAllFieldMapSfixed32Fixed3290(populateIntegerMap(integerProvider));
333     builder.putAllFieldMapSfixed32Fixed6491(populateIntegerMap(longProvider));
334     builder.putAllFieldMapSfixed32Float92(populateIntegerMap(floatProvider));
335     builder.putAllFieldMapSfixed32Int3293(populateIntegerMap(integerProvider));
336     builder.putAllFieldMapSfixed32Int6494(populateIntegerMap(longProvider));
337     builder.putAllFieldMapSfixed32Message95(populateIntegerMap(messageProvider));
338     builder.putAllFieldMapSfixed32Sfixed3296(populateIntegerMap(integerProvider));
339     builder.putAllFieldMapSfixed32Sfixed6497(populateIntegerMap(longProvider));
340     builder.putAllFieldMapSfixed32Sint3298(populateIntegerMap(integerProvider));
341     builder.putAllFieldMapSfixed32Sint6499(populateIntegerMap(longProvider));
342     builder.putAllFieldMapSfixed32String100(populateIntegerMap(stringProvider));
343     builder.putAllFieldMapSfixed32Uint32101(populateIntegerMap(integerProvider));
344     builder.putAllFieldMapSfixed32Uint64102(populateIntegerMap(longProvider));
345     builder.putAllFieldMapSfixed64Bool103(populateLongMap(booleanProvider));
346     builder.putAllFieldMapSfixed64Bytes104(populateLongMap(bytesProvider));
347     builder.putAllFieldMapSfixed64Double105(populateLongMap(doubleProvider));
348     builder.putAllFieldMapSfixed64Enum106(populateLongMap(enumProvider));
349     builder.putAllFieldMapSfixed64Fixed32107(populateLongMap(integerProvider));
350     builder.putAllFieldMapSfixed64Fixed64108(populateLongMap(longProvider));
351     builder.putAllFieldMapSfixed64Float109(populateLongMap(floatProvider));
352     builder.putAllFieldMapSfixed64Int32110(populateLongMap(integerProvider));
353     builder.putAllFieldMapSfixed64Int64111(populateLongMap(longProvider));
354     builder.putAllFieldMapSfixed64Message112(populateLongMap(messageProvider));
355     builder.putAllFieldMapSfixed64Sfixed32113(populateLongMap(integerProvider));
356     builder.putAllFieldMapSfixed64Sfixed64114(populateLongMap(longProvider));
357     builder.putAllFieldMapSfixed64Sint32115(populateLongMap(integerProvider));
358     builder.putAllFieldMapSfixed64Sint64116(populateLongMap(longProvider));
359     builder.putAllFieldMapSfixed64String117(populateLongMap(stringProvider));
360     builder.putAllFieldMapSfixed64Uint32118(populateLongMap(integerProvider));
361     builder.putAllFieldMapSfixed64Uint64119(populateLongMap(longProvider));
362     builder.putAllFieldMapSint32Bool120(populateIntegerMap(booleanProvider));
363     builder.putAllFieldMapSint32Bytes121(populateIntegerMap(bytesProvider));
364     builder.putAllFieldMapSint32Double122(populateIntegerMap(doubleProvider));
365     builder.putAllFieldMapSint32Enum123(populateIntegerMap(enumProvider));
366     builder.putAllFieldMapSint32Fixed32124(populateIntegerMap(integerProvider));
367     builder.putAllFieldMapSint32Fixed64125(populateIntegerMap(longProvider));
368     builder.putAllFieldMapSint32Float126(populateIntegerMap(floatProvider));
369     builder.putAllFieldMapSint32Int32127(populateIntegerMap(integerProvider));
370     builder.putAllFieldMapSint32Int64128(populateIntegerMap(longProvider));
371     builder.putAllFieldMapSint32Message129(populateIntegerMap(messageProvider));
372     builder.putAllFieldMapSint32Sfixed32130(populateIntegerMap(integerProvider));
373     builder.putAllFieldMapSint32Sfixed64131(populateIntegerMap(longProvider));
374     builder.putAllFieldMapSint32Sint32132(populateIntegerMap(integerProvider));
375     builder.putAllFieldMapSint32Sint64133(populateIntegerMap(longProvider));
376     builder.putAllFieldMapSint32String134(populateIntegerMap(stringProvider));
377     builder.putAllFieldMapSint32Uint32135(populateIntegerMap(integerProvider));
378     builder.putAllFieldMapSint32Uint64136(populateIntegerMap(longProvider));
379     builder.putAllFieldMapSint64Bool137(populateLongMap(booleanProvider));
380     builder.putAllFieldMapSint64Bytes138(populateLongMap(bytesProvider));
381     builder.putAllFieldMapSint64Double139(populateLongMap(doubleProvider));
382     builder.putAllFieldMapSint64Enum140(populateLongMap(enumProvider));
383     builder.putAllFieldMapSint64Fixed32141(populateLongMap(integerProvider));
384     builder.putAllFieldMapSint64Fixed64142(populateLongMap(longProvider));
385     builder.putAllFieldMapSint64Float143(populateLongMap(floatProvider));
386     builder.putAllFieldMapSint64Int32144(populateLongMap(integerProvider));
387     builder.putAllFieldMapSint64Int64145(populateLongMap(longProvider));
388     builder.putAllFieldMapSint64Message146(populateLongMap(messageProvider));
389     builder.putAllFieldMapSint64Sfixed32147(populateLongMap(integerProvider));
390     builder.putAllFieldMapSint64Sfixed64148(populateLongMap(longProvider));
391     builder.putAllFieldMapSint64Sint32149(populateLongMap(integerProvider));
392     builder.putAllFieldMapSint64Sint64150(populateLongMap(longProvider));
393     builder.putAllFieldMapSint64String151(populateLongMap(stringProvider));
394     builder.putAllFieldMapSint64Uint32152(populateLongMap(integerProvider));
395     builder.putAllFieldMapSint64Uint64153(populateLongMap(longProvider));
396     builder.putAllFieldMapStringBool154(populateStringMap(booleanProvider));
397     builder.putAllFieldMapStringBytes155(populateStringMap(bytesProvider));
398     builder.putAllFieldMapStringDouble156(populateStringMap(doubleProvider));
399     builder.putAllFieldMapStringEnum157(populateStringMap(enumProvider));
400     builder.putAllFieldMapStringFixed32158(populateStringMap(integerProvider));
401     builder.putAllFieldMapStringFixed64159(populateStringMap(longProvider));
402     builder.putAllFieldMapStringFloat160(populateStringMap(floatProvider));
403     builder.putAllFieldMapStringInt32161(populateStringMap(integerProvider));
404     builder.putAllFieldMapStringInt64162(populateStringMap(longProvider));
405     builder.putAllFieldMapStringMessage163(populateStringMap(messageProvider));
406     builder.putAllFieldMapStringSfixed32164(populateStringMap(integerProvider));
407     builder.putAllFieldMapStringSfixed64165(populateStringMap(longProvider));
408     builder.putAllFieldMapStringSint32166(populateStringMap(integerProvider));
409     builder.putAllFieldMapStringSint64167(populateStringMap(longProvider));
410     builder.putAllFieldMapStringString168(populateStringMap(stringProvider));
411     builder.putAllFieldMapStringUint32169(populateStringMap(integerProvider));
412     builder.putAllFieldMapStringUint64170(populateStringMap(longProvider));
413     builder.putAllFieldMapUint32Bool171(populateIntegerMap(booleanProvider));
414     builder.putAllFieldMapUint32Bytes172(populateIntegerMap(bytesProvider));
415     builder.putAllFieldMapUint32Double173(populateIntegerMap(doubleProvider));
416     builder.putAllFieldMapUint32Enum174(populateIntegerMap(enumProvider));
417     builder.putAllFieldMapUint32Fixed32175(populateIntegerMap(integerProvider));
418     builder.putAllFieldMapUint32Fixed64176(populateIntegerMap(longProvider));
419     builder.putAllFieldMapUint32Float177(populateIntegerMap(floatProvider));
420     builder.putAllFieldMapUint32Int32178(populateIntegerMap(integerProvider));
421     builder.putAllFieldMapUint32Int64179(populateIntegerMap(longProvider));
422     builder.putAllFieldMapUint32Message180(populateIntegerMap(messageProvider));
423     builder.putAllFieldMapUint32Sfixed32181(populateIntegerMap(integerProvider));
424     builder.putAllFieldMapUint32Sfixed64182(populateIntegerMap(longProvider));
425     builder.putAllFieldMapUint32Sint32183(populateIntegerMap(integerProvider));
426     builder.putAllFieldMapUint32Sint64184(populateIntegerMap(longProvider));
427     builder.putAllFieldMapUint32String185(populateIntegerMap(stringProvider));
428     builder.putAllFieldMapUint32Uint32186(populateIntegerMap(integerProvider));
429     builder.putAllFieldMapUint32Uint64187(populateIntegerMap(longProvider));
430     builder.putAllFieldMapUint64Bool188(populateLongMap(booleanProvider));
431     builder.putAllFieldMapUint64Bytes189(populateLongMap(bytesProvider));
432     builder.putAllFieldMapUint64Double190(populateLongMap(doubleProvider));
433     builder.putAllFieldMapUint64Enum191(populateLongMap(enumProvider));
434     builder.putAllFieldMapUint64Fixed32192(populateLongMap(integerProvider));
435     builder.putAllFieldMapUint64Fixed64193(populateLongMap(longProvider));
436     builder.putAllFieldMapUint64Float194(populateLongMap(floatProvider));
437     builder.putAllFieldMapUint64Int32195(populateLongMap(integerProvider));
438     builder.putAllFieldMapUint64Int64196(populateLongMap(longProvider));
439     builder.putAllFieldMapUint64Message197(populateLongMap(messageProvider));
440     builder.putAllFieldMapUint64Sfixed32198(populateLongMap(integerProvider));
441     builder.putAllFieldMapUint64Sfixed64199(populateLongMap(longProvider));
442     builder.putAllFieldMapUint64Sint32200(populateLongMap(integerProvider));
443     builder.putAllFieldMapUint64Sint64201(populateLongMap(longProvider));
444     builder.putAllFieldMapUint64String202(populateLongMap(stringProvider));
445     builder.putAllFieldMapUint64Uint32203(populateLongMap(integerProvider));
446     builder.putAllFieldMapUint64Uint64204(populateLongMap(longProvider));
447 
448     return builder.build();
449   }
450 }
451