1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package io.netty.example.worldclock;
21
22 import static io.netty.util.internal.ObjectUtil.checkNotNull;
23
24 @SuppressWarnings("all")
25 public final class WorldClockProtocol {
26 private WorldClockProtocol() {}
27 public static void registerAllExtensions(
28 com.google.protobuf.ExtensionRegistry registry) {
29 }
30
31
32
33 public enum Continent
34 implements com.google.protobuf.ProtocolMessageEnum {
35
36
37
38 AFRICA(0, 0),
39
40
41
42 AMERICA(1, 1),
43
44
45
46 ANTARCTICA(2, 2),
47
48
49
50 ARCTIC(3, 3),
51
52
53
54 ASIA(4, 4),
55
56
57
58 ATLANTIC(5, 5),
59
60
61
62 AUSTRALIA(6, 6),
63
64
65
66 EUROPE(7, 7),
67
68
69
70 INDIAN(8, 8),
71
72
73
74 MIDEAST(9, 9),
75
76
77
78 PACIFIC(10, 10),
79 ;
80
81
82
83
84 public static final int AFRICA_VALUE = 0;
85
86
87
88 public static final int AMERICA_VALUE = 1;
89
90
91
92 public static final int ANTARCTICA_VALUE = 2;
93
94
95
96 public static final int ARCTIC_VALUE = 3;
97
98
99
100 public static final int ASIA_VALUE = 4;
101
102
103
104 public static final int ATLANTIC_VALUE = 5;
105
106
107
108 public static final int AUSTRALIA_VALUE = 6;
109
110
111
112 public static final int EUROPE_VALUE = 7;
113
114
115
116 public static final int INDIAN_VALUE = 8;
117
118
119
120 public static final int MIDEAST_VALUE = 9;
121
122
123
124 public static final int PACIFIC_VALUE = 10;
125
126
127 @Override
128 public final int getNumber() { return value; }
129
130 public static Continent valueOf(int value) {
131 switch (value) {
132 case 0: return AFRICA;
133 case 1: return AMERICA;
134 case 2: return ANTARCTICA;
135 case 3: return ARCTIC;
136 case 4: return ASIA;
137 case 5: return ATLANTIC;
138 case 6: return AUSTRALIA;
139 case 7: return EUROPE;
140 case 8: return INDIAN;
141 case 9: return MIDEAST;
142 case 10: return PACIFIC;
143 default: return null;
144 }
145 }
146
147 public static com.google.protobuf.Internal.EnumLiteMap<Continent>
148 internalGetValueMap() {
149 return internalValueMap;
150 }
151 private static com.google.protobuf.Internal.EnumLiteMap<Continent>
152 internalValueMap =
153 new com.google.protobuf.Internal.EnumLiteMap<Continent>() {
154 @Override
155 public Continent findValueByNumber(int number) {
156 return Continent.valueOf(number);
157 }
158 };
159
160 @Override
161 public final com.google.protobuf.Descriptors.EnumValueDescriptor
162 getValueDescriptor() {
163 return getDescriptor().getValues().get(index);
164 }
165 @Override
166 public final com.google.protobuf.Descriptors.EnumDescriptor
167 getDescriptorForType() {
168 return getDescriptor();
169 }
170 public static final com.google.protobuf.Descriptors.EnumDescriptor
171 getDescriptor() {
172 return io.netty.example.worldclock.WorldClockProtocol.getDescriptor().getEnumTypes().get(0);
173 }
174
175 private static final Continent[] VALUES = values();
176
177 public static Continent valueOf(
178 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
179 if (desc.getType() != getDescriptor()) {
180 throw new java.lang.IllegalArgumentException(
181 "EnumValueDescriptor is not for this type.");
182 }
183 return VALUES[desc.getIndex()];
184 }
185
186 private final int index;
187 private final int value;
188
189 private Continent(int index, int value) {
190 this.index = index;
191 this.value = value;
192 }
193
194
195 }
196
197
198
199
200 public enum DayOfWeek
201 implements com.google.protobuf.ProtocolMessageEnum {
202
203
204
205 SUNDAY(0, 1),
206
207
208
209 MONDAY(1, 2),
210
211
212
213 TUESDAY(2, 3),
214
215
216
217 WEDNESDAY(3, 4),
218
219
220
221 THURSDAY(4, 5),
222
223
224
225 FRIDAY(5, 6),
226
227
228
229 SATURDAY(6, 7),
230 ;
231
232
233
234
235 public static final int SUNDAY_VALUE = 1;
236
237
238
239 public static final int MONDAY_VALUE = 2;
240
241
242
243 public static final int TUESDAY_VALUE = 3;
244
245
246
247 public static final int WEDNESDAY_VALUE = 4;
248
249
250
251 public static final int THURSDAY_VALUE = 5;
252
253
254
255 public static final int FRIDAY_VALUE = 6;
256
257
258
259 public static final int SATURDAY_VALUE = 7;
260
261
262 @Override
263 public final int getNumber() { return value; }
264
265 public static DayOfWeek valueOf(int value) {
266 switch (value) {
267 case 1: return SUNDAY;
268 case 2: return MONDAY;
269 case 3: return TUESDAY;
270 case 4: return WEDNESDAY;
271 case 5: return THURSDAY;
272 case 6: return FRIDAY;
273 case 7: return SATURDAY;
274 default: return null;
275 }
276 }
277
278 public static com.google.protobuf.Internal.EnumLiteMap<DayOfWeek>
279 internalGetValueMap() {
280 return internalValueMap;
281 }
282 private static com.google.protobuf.Internal.EnumLiteMap<DayOfWeek>
283 internalValueMap =
284 new com.google.protobuf.Internal.EnumLiteMap<DayOfWeek>() {
285 @Override
286 public DayOfWeek findValueByNumber(int number) {
287 return DayOfWeek.valueOf(number);
288 }
289 };
290
291 @Override
292 public final com.google.protobuf.Descriptors.EnumValueDescriptor
293 getValueDescriptor() {
294 return getDescriptor().getValues().get(index);
295 }
296 @Override
297 public final com.google.protobuf.Descriptors.EnumDescriptor
298 getDescriptorForType() {
299 return getDescriptor();
300 }
301 public static final com.google.protobuf.Descriptors.EnumDescriptor
302 getDescriptor() {
303 return io.netty.example.worldclock.WorldClockProtocol.getDescriptor().getEnumTypes().get(1);
304 }
305
306 private static final DayOfWeek[] VALUES = values();
307
308 public static DayOfWeek valueOf(
309 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
310 if (desc.getType() != getDescriptor()) {
311 throw new java.lang.IllegalArgumentException(
312 "EnumValueDescriptor is not for this type.");
313 }
314 return VALUES[desc.getIndex()];
315 }
316
317 private final int index;
318 private final int value;
319
320 private DayOfWeek(int index, int value) {
321 this.index = index;
322 this.value = value;
323 }
324
325
326 }
327
328 public interface LocationOrBuilder
329 extends com.google.protobuf.MessageOrBuilder {
330
331
332
333
334
335 boolean hasContinent();
336
337
338
339 io.netty.example.worldclock.WorldClockProtocol.Continent getContinent();
340
341
342
343
344
345 boolean hasCity();
346
347
348
349 java.lang.String getCity();
350
351
352
353 com.google.protobuf.ByteString
354 getCityBytes();
355 }
356
357
358
359 public static final class Location extends
360 com.google.protobuf.GeneratedMessage
361 implements LocationOrBuilder {
362
363 private Location(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
364 super(builder);
365 this.unknownFields = builder.getUnknownFields();
366 }
367 private Location(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
368
369 private static final Location defaultInstance;
370 public static Location getDefaultInstance() {
371 return defaultInstance;
372 }
373
374 @Override
375 public Location getDefaultInstanceForType() {
376 return defaultInstance;
377 }
378
379 private final com.google.protobuf.UnknownFieldSet unknownFields;
380 @java.lang.Override
381 public final com.google.protobuf.UnknownFieldSet
382 getUnknownFields() {
383 return this.unknownFields;
384 }
385 private Location(
386 com.google.protobuf.CodedInputStream input,
387 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
388 throws com.google.protobuf.InvalidProtocolBufferException {
389 initFields();
390 int mutable_bitField0_ = 0;
391 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
392 com.google.protobuf.UnknownFieldSet.newBuilder();
393 try {
394 boolean done = false;
395 while (!done) {
396 int tag = input.readTag();
397 switch (tag) {
398 case 0:
399 done = true;
400 break;
401 default: {
402 if (!parseUnknownField(input, unknownFields,
403 extensionRegistry, tag)) {
404 done = true;
405 }
406 break;
407 }
408 case 8: {
409 int rawValue = input.readEnum();
410 io.netty.example.worldclock.WorldClockProtocol.Continent value = io.netty.example.worldclock.WorldClockProtocol.Continent.valueOf(rawValue);
411 if (value == null) {
412 unknownFields.mergeVarintField(1, rawValue);
413 } else {
414 bitField0_ |= 0x00000001;
415 continent_ = value;
416 }
417 break;
418 }
419 case 18: {
420 bitField0_ |= 0x00000002;
421 city_ = input.readBytes();
422 break;
423 }
424 }
425 }
426 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
427 throw e.setUnfinishedMessage(this);
428 } catch (java.io.IOException e) {
429 throw new com.google.protobuf.InvalidProtocolBufferException(
430 e.getMessage()).setUnfinishedMessage(this);
431 } finally {
432 this.unknownFields = unknownFields.build();
433 makeExtensionsImmutable();
434 }
435 }
436 public static final com.google.protobuf.Descriptors.Descriptor
437 getDescriptor() {
438 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Location_descriptor;
439 }
440
441 @Override
442 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
443 internalGetFieldAccessorTable() {
444 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Location_fieldAccessorTable
445 .ensureFieldAccessorsInitialized(
446 io.netty.example.worldclock.WorldClockProtocol.Location.class, io.netty.example.worldclock.WorldClockProtocol.Location.Builder.class);
447 }
448
449 public static com.google.protobuf.Parser<Location> PARSER =
450 new com.google.protobuf.AbstractParser<Location>() {
451 @Override
452 public Location parsePartialFrom(
453 com.google.protobuf.CodedInputStream input,
454 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
455 throws com.google.protobuf.InvalidProtocolBufferException {
456 return new Location(input, extensionRegistry);
457 }
458 };
459
460 @java.lang.Override
461 public com.google.protobuf.Parser<Location> getParserForType() {
462 return PARSER;
463 }
464
465 private int bitField0_;
466
467 public static final int CONTINENT_FIELD_NUMBER = 1;
468 private io.netty.example.worldclock.WorldClockProtocol.Continent continent_;
469
470
471
472 @Override
473 public boolean hasContinent() {
474 return ((bitField0_ & 0x00000001) == 0x00000001);
475 }
476
477
478
479 @Override
480 public io.netty.example.worldclock.WorldClockProtocol.Continent getContinent() {
481 return continent_;
482 }
483
484
485 public static final int CITY_FIELD_NUMBER = 2;
486 private java.lang.Object city_;
487
488
489
490 @Override
491 public boolean hasCity() {
492 return ((bitField0_ & 0x00000002) == 0x00000002);
493 }
494
495
496
497 @Override
498 public java.lang.String getCity() {
499 java.lang.Object ref = city_;
500 if (ref instanceof java.lang.String) {
501 return (java.lang.String) ref;
502 } else {
503 com.google.protobuf.ByteString bs =
504 (com.google.protobuf.ByteString) ref;
505 java.lang.String s = bs.toStringUtf8();
506 if (bs.isValidUtf8()) {
507 city_ = s;
508 }
509 return s;
510 }
511 }
512
513
514
515 @Override
516 public com.google.protobuf.ByteString
517 getCityBytes() {
518 java.lang.Object ref = city_;
519 if (ref instanceof java.lang.String) {
520 com.google.protobuf.ByteString b =
521 com.google.protobuf.ByteString.copyFromUtf8(
522 (java.lang.String) ref);
523 city_ = b;
524 return b;
525 } else {
526 return (com.google.protobuf.ByteString) ref;
527 }
528 }
529
530 private void initFields() {
531 continent_ = io.netty.example.worldclock.WorldClockProtocol.Continent.AFRICA;
532 city_ = "";
533 }
534 private byte memoizedIsInitialized = -1;
535 @Override
536 public final boolean isInitialized() {
537 byte isInitialized = memoizedIsInitialized;
538 if (isInitialized != -1) return isInitialized == 1;
539
540 if (!hasContinent()) {
541 memoizedIsInitialized = 0;
542 return false;
543 }
544 if (!hasCity()) {
545 memoizedIsInitialized = 0;
546 return false;
547 }
548 memoizedIsInitialized = 1;
549 return true;
550 }
551
552 @Override
553 public void writeTo(com.google.protobuf.CodedOutputStream output)
554 throws java.io.IOException {
555 getSerializedSize();
556 if (((bitField0_ & 0x00000001) == 0x00000001)) {
557 output.writeEnum(1, continent_.getNumber());
558 }
559 if (((bitField0_ & 0x00000002) == 0x00000002)) {
560 output.writeBytes(2, getCityBytes());
561 }
562 getUnknownFields().writeTo(output);
563 }
564
565 private int memoizedSerializedSize = -1;
566 @Override
567 public int getSerializedSize() {
568 int size = memoizedSerializedSize;
569 if (size != -1) return size;
570
571 size = 0;
572 if (((bitField0_ & 0x00000001) == 0x00000001)) {
573 size += com.google.protobuf.CodedOutputStream
574 .computeEnumSize(1, continent_.getNumber());
575 }
576 if (((bitField0_ & 0x00000002) == 0x00000002)) {
577 size += com.google.protobuf.CodedOutputStream
578 .computeBytesSize(2, getCityBytes());
579 }
580 size += getUnknownFields().getSerializedSize();
581 memoizedSerializedSize = size;
582 return size;
583 }
584
585 private static final long serialVersionUID = 0L;
586 @java.lang.Override
587 protected java.lang.Object writeReplace()
588 throws java.io.ObjectStreamException {
589 return super.writeReplace();
590 }
591
592 public static io.netty.example.worldclock.WorldClockProtocol.Location parseFrom(
593 com.google.protobuf.ByteString data)
594 throws com.google.protobuf.InvalidProtocolBufferException {
595 return PARSER.parseFrom(data);
596 }
597 public static io.netty.example.worldclock.WorldClockProtocol.Location parseFrom(
598 com.google.protobuf.ByteString data,
599 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
600 throws com.google.protobuf.InvalidProtocolBufferException {
601 return PARSER.parseFrom(data, extensionRegistry);
602 }
603 public static io.netty.example.worldclock.WorldClockProtocol.Location parseFrom(byte[] data)
604 throws com.google.protobuf.InvalidProtocolBufferException {
605 return PARSER.parseFrom(data);
606 }
607 public static io.netty.example.worldclock.WorldClockProtocol.Location parseFrom(
608 byte[] data,
609 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
610 throws com.google.protobuf.InvalidProtocolBufferException {
611 return PARSER.parseFrom(data, extensionRegistry);
612 }
613 public static io.netty.example.worldclock.WorldClockProtocol.Location parseFrom(java.io.InputStream input)
614 throws java.io.IOException {
615 return PARSER.parseFrom(input);
616 }
617 public static io.netty.example.worldclock.WorldClockProtocol.Location parseFrom(
618 java.io.InputStream input,
619 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
620 throws java.io.IOException {
621 return PARSER.parseFrom(input, extensionRegistry);
622 }
623 public static io.netty.example.worldclock.WorldClockProtocol.Location parseDelimitedFrom(java.io.InputStream input)
624 throws java.io.IOException {
625 return PARSER.parseDelimitedFrom(input);
626 }
627 public static io.netty.example.worldclock.WorldClockProtocol.Location parseDelimitedFrom(
628 java.io.InputStream input,
629 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
630 throws java.io.IOException {
631 return PARSER.parseDelimitedFrom(input, extensionRegistry);
632 }
633 public static io.netty.example.worldclock.WorldClockProtocol.Location parseFrom(
634 com.google.protobuf.CodedInputStream input)
635 throws java.io.IOException {
636 return PARSER.parseFrom(input);
637 }
638 public static io.netty.example.worldclock.WorldClockProtocol.Location parseFrom(
639 com.google.protobuf.CodedInputStream input,
640 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
641 throws java.io.IOException {
642 return PARSER.parseFrom(input, extensionRegistry);
643 }
644
645 public static Builder newBuilder() { return Builder.create(); }
646 @Override
647 public Builder newBuilderForType() { return newBuilder(); }
648 public static Builder newBuilder(io.netty.example.worldclock.WorldClockProtocol.Location prototype) {
649 return newBuilder().mergeFrom(prototype);
650 }
651 @Override
652 public Builder toBuilder() { return newBuilder(this); }
653
654 @java.lang.Override
655 protected Builder newBuilderForType(
656 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
657 Builder builder = new Builder(parent);
658 return builder;
659 }
660
661
662
663 public static final class Builder extends
664 com.google.protobuf.GeneratedMessage.Builder<Builder>
665 implements io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder {
666 public static final com.google.protobuf.Descriptors.Descriptor
667 getDescriptor() {
668 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Location_descriptor;
669 }
670
671 @Override
672 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
673 internalGetFieldAccessorTable() {
674 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Location_fieldAccessorTable
675 .ensureFieldAccessorsInitialized(
676 io.netty.example.worldclock.WorldClockProtocol.Location.class, io.netty.example.worldclock.WorldClockProtocol.Location.Builder.class);
677 }
678
679
680 private Builder() {
681 maybeForceBuilderInitialization();
682 }
683
684 private Builder(
685 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
686 super(parent);
687 maybeForceBuilderInitialization();
688 }
689 private void maybeForceBuilderInitialization() {
690 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
691 }
692 }
693 private static Builder create() {
694 return new Builder();
695 }
696
697 @Override
698 public Builder clear() {
699 super.clear();
700 continent_ = io.netty.example.worldclock.WorldClockProtocol.Continent.AFRICA;
701 bitField0_ = (bitField0_ & ~0x00000001);
702 city_ = "";
703 bitField0_ = (bitField0_ & ~0x00000002);
704 return this;
705 }
706
707 @Override
708 public Builder clone() {
709 return create().mergeFrom(buildPartial());
710 }
711
712 @Override
713 public com.google.protobuf.Descriptors.Descriptor
714 getDescriptorForType() {
715 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Location_descriptor;
716 }
717
718 @Override
719 public io.netty.example.worldclock.WorldClockProtocol.Location getDefaultInstanceForType() {
720 return io.netty.example.worldclock.WorldClockProtocol.Location.getDefaultInstance();
721 }
722
723 @Override
724 public io.netty.example.worldclock.WorldClockProtocol.Location build() {
725 io.netty.example.worldclock.WorldClockProtocol.Location result = buildPartial();
726 if (!result.isInitialized()) {
727 throw newUninitializedMessageException(result);
728 }
729 return result;
730 }
731
732 @Override
733 public io.netty.example.worldclock.WorldClockProtocol.Location buildPartial() {
734 io.netty.example.worldclock.WorldClockProtocol.Location result = new io.netty.example.worldclock.WorldClockProtocol.Location(this);
735 int from_bitField0_ = bitField0_;
736 int to_bitField0_ = 0;
737 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
738 to_bitField0_ |= 0x00000001;
739 }
740 result.continent_ = continent_;
741 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
742 to_bitField0_ |= 0x00000002;
743 }
744 result.city_ = city_;
745 result.bitField0_ = to_bitField0_;
746 onBuilt();
747 return result;
748 }
749
750 @Override
751 public Builder mergeFrom(com.google.protobuf.Message other) {
752 if (other instanceof io.netty.example.worldclock.WorldClockProtocol.Location) {
753 return mergeFrom((io.netty.example.worldclock.WorldClockProtocol.Location)other);
754 } else {
755 super.mergeFrom(other);
756 return this;
757 }
758 }
759
760 public Builder mergeFrom(io.netty.example.worldclock.WorldClockProtocol.Location other) {
761 if (other == io.netty.example.worldclock.WorldClockProtocol.Location.getDefaultInstance()) return this;
762 if (other.hasContinent()) {
763 setContinent(other.getContinent());
764 }
765 if (other.hasCity()) {
766 bitField0_ |= 0x00000002;
767 city_ = other.city_;
768 onChanged();
769 }
770 this.mergeUnknownFields(other.getUnknownFields());
771 return this;
772 }
773
774 @Override
775 public final boolean isInitialized() {
776 if (!hasContinent()) {
777
778 return false;
779 }
780 if (!hasCity()) {
781
782 return false;
783 }
784 return true;
785 }
786
787 @Override
788 public Builder mergeFrom(
789 com.google.protobuf.CodedInputStream input,
790 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
791 throws java.io.IOException {
792 io.netty.example.worldclock.WorldClockProtocol.Location parsedMessage = null;
793 try {
794 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
795 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
796 parsedMessage = (io.netty.example.worldclock.WorldClockProtocol.Location) e.getUnfinishedMessage();
797 throw e;
798 } finally {
799 if (parsedMessage != null) {
800 mergeFrom(parsedMessage);
801 }
802 }
803 return this;
804 }
805 private int bitField0_;
806
807
808 private io.netty.example.worldclock.WorldClockProtocol.Continent continent_ = io.netty.example.worldclock.WorldClockProtocol.Continent.AFRICA;
809
810
811
812 @Override
813 public boolean hasContinent() {
814 return ((bitField0_ & 0x00000001) == 0x00000001);
815 }
816
817
818
819 @Override
820 public io.netty.example.worldclock.WorldClockProtocol.Continent getContinent() {
821 return continent_;
822 }
823
824
825
826 public Builder setContinent(io.netty.example.worldclock.WorldClockProtocol.Continent value) {
827 checkNotNull(value, "value");
828 bitField0_ |= 0x00000001;
829 continent_ = value;
830 onChanged();
831 return this;
832 }
833
834
835
836 public Builder clearContinent() {
837 bitField0_ = (bitField0_ & ~0x00000001);
838 continent_ = io.netty.example.worldclock.WorldClockProtocol.Continent.AFRICA;
839 onChanged();
840 return this;
841 }
842
843
844 private java.lang.Object city_ = "";
845
846
847
848 @Override
849 public boolean hasCity() {
850 return ((bitField0_ & 0x00000002) == 0x00000002);
851 }
852
853
854
855 @Override
856 public java.lang.String getCity() {
857 java.lang.Object ref = city_;
858 if (!(ref instanceof java.lang.String)) {
859 java.lang.String s = ((com.google.protobuf.ByteString) ref)
860 .toStringUtf8();
861 city_ = s;
862 return s;
863 } else {
864 return (java.lang.String) ref;
865 }
866 }
867
868
869
870 @Override
871 public com.google.protobuf.ByteString
872 getCityBytes() {
873 java.lang.Object ref = city_;
874 if (ref instanceof String) {
875 com.google.protobuf.ByteString b =
876 com.google.protobuf.ByteString.copyFromUtf8(
877 (java.lang.String) ref);
878 city_ = b;
879 return b;
880 } else {
881 return (com.google.protobuf.ByteString) ref;
882 }
883 }
884
885
886
887 public Builder setCity(
888 java.lang.String value) {
889 checkNotNull(value, "value");
890 bitField0_ |= 0x00000002;
891 city_ = value;
892 onChanged();
893 return this;
894 }
895
896
897
898 public Builder clearCity() {
899 bitField0_ = (bitField0_ & ~0x00000002);
900 city_ = getDefaultInstance().getCity();
901 onChanged();
902 return this;
903 }
904
905
906
907 public Builder setCityBytes(
908 com.google.protobuf.ByteString value) {
909 checkNotNull(value, "value");
910 bitField0_ |= 0x00000002;
911 city_ = value;
912 onChanged();
913 return this;
914 }
915
916
917 }
918
919 static {
920 defaultInstance = new Location(true);
921 defaultInstance.initFields();
922 }
923
924
925 }
926
927 public interface LocationsOrBuilder
928 extends com.google.protobuf.MessageOrBuilder {
929
930
931
932
933
934 java.util.List<io.netty.example.worldclock.WorldClockProtocol.Location>
935 getLocationList();
936
937
938
939 io.netty.example.worldclock.WorldClockProtocol.Location getLocation(int index);
940
941
942
943 int getLocationCount();
944
945
946
947 java.util.List<? extends io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder>
948 getLocationOrBuilderList();
949
950
951
952 io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder getLocationOrBuilder(
953 int index);
954 }
955
956
957
958 public static final class Locations extends
959 com.google.protobuf.GeneratedMessage
960 implements LocationsOrBuilder {
961
962 private Locations(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
963 super(builder);
964 this.unknownFields = builder.getUnknownFields();
965 }
966 private Locations(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
967
968 private static final Locations defaultInstance;
969 public static Locations getDefaultInstance() {
970 return defaultInstance;
971 }
972
973 @Override
974 public Locations getDefaultInstanceForType() {
975 return defaultInstance;
976 }
977
978 private final com.google.protobuf.UnknownFieldSet unknownFields;
979 @java.lang.Override
980 public final com.google.protobuf.UnknownFieldSet
981 getUnknownFields() {
982 return this.unknownFields;
983 }
984 private Locations(
985 com.google.protobuf.CodedInputStream input,
986 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
987 throws com.google.protobuf.InvalidProtocolBufferException {
988 initFields();
989 int mutable_bitField0_ = 0;
990 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
991 com.google.protobuf.UnknownFieldSet.newBuilder();
992 try {
993 boolean done = false;
994 while (!done) {
995 int tag = input.readTag();
996 switch (tag) {
997 case 0:
998 done = true;
999 break;
1000 default: {
1001 if (!parseUnknownField(input, unknownFields,
1002 extensionRegistry, tag)) {
1003 done = true;
1004 }
1005 break;
1006 }
1007 case 10: {
1008 if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
1009 location_ = new java.util.ArrayList<io.netty.example.worldclock.WorldClockProtocol.Location>();
1010 mutable_bitField0_ |= 0x00000001;
1011 }
1012 location_.add(input.readMessage(io.netty.example.worldclock.WorldClockProtocol.Location.PARSER, extensionRegistry));
1013 break;
1014 }
1015 }
1016 }
1017 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1018 throw e.setUnfinishedMessage(this);
1019 } catch (java.io.IOException e) {
1020 throw new com.google.protobuf.InvalidProtocolBufferException(
1021 e.getMessage()).setUnfinishedMessage(this);
1022 } finally {
1023 if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
1024 location_ = java.util.Collections.unmodifiableList(location_);
1025 }
1026 this.unknownFields = unknownFields.build();
1027 makeExtensionsImmutable();
1028 }
1029 }
1030 public static final com.google.protobuf.Descriptors.Descriptor
1031 getDescriptor() {
1032 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Locations_descriptor;
1033 }
1034
1035 @Override
1036 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1037 internalGetFieldAccessorTable() {
1038 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Locations_fieldAccessorTable
1039 .ensureFieldAccessorsInitialized(
1040 io.netty.example.worldclock.WorldClockProtocol.Locations.class, io.netty.example.worldclock.WorldClockProtocol.Locations.Builder.class);
1041 }
1042
1043 public static com.google.protobuf.Parser<Locations> PARSER =
1044 new com.google.protobuf.AbstractParser<Locations>() {
1045 @Override
1046 public Locations parsePartialFrom(
1047 com.google.protobuf.CodedInputStream input,
1048 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1049 throws com.google.protobuf.InvalidProtocolBufferException {
1050 return new Locations(input, extensionRegistry);
1051 }
1052 };
1053
1054 @java.lang.Override
1055 public com.google.protobuf.Parser<Locations> getParserForType() {
1056 return PARSER;
1057 }
1058
1059
1060 public static final int LOCATION_FIELD_NUMBER = 1;
1061 private java.util.List<io.netty.example.worldclock.WorldClockProtocol.Location> location_;
1062
1063
1064
1065 @Override
1066 public java.util.List<io.netty.example.worldclock.WorldClockProtocol.Location> getLocationList() {
1067 return location_;
1068 }
1069
1070
1071
1072 @Override
1073 public java.util.List<? extends io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder>
1074 getLocationOrBuilderList() {
1075 return location_;
1076 }
1077
1078
1079
1080 @Override
1081 public int getLocationCount() {
1082 return location_.size();
1083 }
1084
1085
1086
1087 @Override
1088 public io.netty.example.worldclock.WorldClockProtocol.Location getLocation(int index) {
1089 return location_.get(index);
1090 }
1091
1092
1093
1094 @Override
1095 public io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder getLocationOrBuilder(
1096 int index) {
1097 return location_.get(index);
1098 }
1099
1100 private void initFields() {
1101 location_ = java.util.Collections.emptyList();
1102 }
1103 private byte memoizedIsInitialized = -1;
1104 @Override
1105 public final boolean isInitialized() {
1106 byte isInitialized = memoizedIsInitialized;
1107 if (isInitialized != -1) return isInitialized == 1;
1108
1109 for (int i = 0; i < getLocationCount(); i++) {
1110 if (!getLocation(i).isInitialized()) {
1111 memoizedIsInitialized = 0;
1112 return false;
1113 }
1114 }
1115 memoizedIsInitialized = 1;
1116 return true;
1117 }
1118
1119 @Override
1120 public void writeTo(com.google.protobuf.CodedOutputStream output)
1121 throws java.io.IOException {
1122 getSerializedSize();
1123 for (int i = 0; i < location_.size(); i++) {
1124 output.writeMessage(1, location_.get(i));
1125 }
1126 getUnknownFields().writeTo(output);
1127 }
1128
1129 private int memoizedSerializedSize = -1;
1130 @Override
1131 public int getSerializedSize() {
1132 int size = memoizedSerializedSize;
1133 if (size != -1) return size;
1134
1135 size = 0;
1136 for (int i = 0; i < location_.size(); i++) {
1137 size += com.google.protobuf.CodedOutputStream
1138 .computeMessageSize(1, location_.get(i));
1139 }
1140 size += getUnknownFields().getSerializedSize();
1141 memoizedSerializedSize = size;
1142 return size;
1143 }
1144
1145 private static final long serialVersionUID = 0L;
1146 @java.lang.Override
1147 protected java.lang.Object writeReplace()
1148 throws java.io.ObjectStreamException {
1149 return super.writeReplace();
1150 }
1151
1152 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseFrom(
1153 com.google.protobuf.ByteString data)
1154 throws com.google.protobuf.InvalidProtocolBufferException {
1155 return PARSER.parseFrom(data);
1156 }
1157 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseFrom(
1158 com.google.protobuf.ByteString data,
1159 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1160 throws com.google.protobuf.InvalidProtocolBufferException {
1161 return PARSER.parseFrom(data, extensionRegistry);
1162 }
1163 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseFrom(byte[] data)
1164 throws com.google.protobuf.InvalidProtocolBufferException {
1165 return PARSER.parseFrom(data);
1166 }
1167 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseFrom(
1168 byte[] data,
1169 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1170 throws com.google.protobuf.InvalidProtocolBufferException {
1171 return PARSER.parseFrom(data, extensionRegistry);
1172 }
1173 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseFrom(java.io.InputStream input)
1174 throws java.io.IOException {
1175 return PARSER.parseFrom(input);
1176 }
1177 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseFrom(
1178 java.io.InputStream input,
1179 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1180 throws java.io.IOException {
1181 return PARSER.parseFrom(input, extensionRegistry);
1182 }
1183 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseDelimitedFrom(java.io.InputStream input)
1184 throws java.io.IOException {
1185 return PARSER.parseDelimitedFrom(input);
1186 }
1187 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseDelimitedFrom(
1188 java.io.InputStream input,
1189 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1190 throws java.io.IOException {
1191 return PARSER.parseDelimitedFrom(input, extensionRegistry);
1192 }
1193 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseFrom(
1194 com.google.protobuf.CodedInputStream input)
1195 throws java.io.IOException {
1196 return PARSER.parseFrom(input);
1197 }
1198 public static io.netty.example.worldclock.WorldClockProtocol.Locations parseFrom(
1199 com.google.protobuf.CodedInputStream input,
1200 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1201 throws java.io.IOException {
1202 return PARSER.parseFrom(input, extensionRegistry);
1203 }
1204
1205 public static Builder newBuilder() { return Builder.create(); }
1206 @Override
1207 public Builder newBuilderForType() { return newBuilder(); }
1208 public static Builder newBuilder(io.netty.example.worldclock.WorldClockProtocol.Locations prototype) {
1209 return newBuilder().mergeFrom(prototype);
1210 }
1211 @Override
1212 public Builder toBuilder() { return newBuilder(this); }
1213
1214 @java.lang.Override
1215 protected Builder newBuilderForType(
1216 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1217 Builder builder = new Builder(parent);
1218 return builder;
1219 }
1220
1221
1222
1223 public static final class Builder extends
1224 com.google.protobuf.GeneratedMessage.Builder<Builder>
1225 implements io.netty.example.worldclock.WorldClockProtocol.LocationsOrBuilder {
1226 public static final com.google.protobuf.Descriptors.Descriptor
1227 getDescriptor() {
1228 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Locations_descriptor;
1229 }
1230
1231 @Override
1232 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1233 internalGetFieldAccessorTable() {
1234 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Locations_fieldAccessorTable
1235 .ensureFieldAccessorsInitialized(
1236 io.netty.example.worldclock.WorldClockProtocol.Locations.class, io.netty.example.worldclock.WorldClockProtocol.Locations.Builder.class);
1237 }
1238
1239
1240 private Builder() {
1241 maybeForceBuilderInitialization();
1242 }
1243
1244 private Builder(
1245 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1246 super(parent);
1247 maybeForceBuilderInitialization();
1248 }
1249 private void maybeForceBuilderInitialization() {
1250 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1251 getLocationFieldBuilder();
1252 }
1253 }
1254 private static Builder create() {
1255 return new Builder();
1256 }
1257
1258 @Override
1259 public Builder clear() {
1260 super.clear();
1261 if (locationBuilder_ == null) {
1262 location_ = java.util.Collections.emptyList();
1263 bitField0_ = (bitField0_ & ~0x00000001);
1264 } else {
1265 locationBuilder_.clear();
1266 }
1267 return this;
1268 }
1269
1270 @Override
1271 public Builder clone() {
1272 return create().mergeFrom(buildPartial());
1273 }
1274
1275 @Override
1276 public com.google.protobuf.Descriptors.Descriptor
1277 getDescriptorForType() {
1278 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_Locations_descriptor;
1279 }
1280
1281 @Override
1282 public io.netty.example.worldclock.WorldClockProtocol.Locations getDefaultInstanceForType() {
1283 return io.netty.example.worldclock.WorldClockProtocol.Locations.getDefaultInstance();
1284 }
1285
1286 @Override
1287 public io.netty.example.worldclock.WorldClockProtocol.Locations build() {
1288 io.netty.example.worldclock.WorldClockProtocol.Locations result = buildPartial();
1289 if (!result.isInitialized()) {
1290 throw newUninitializedMessageException(result);
1291 }
1292 return result;
1293 }
1294
1295 @Override
1296 public io.netty.example.worldclock.WorldClockProtocol.Locations buildPartial() {
1297 io.netty.example.worldclock.WorldClockProtocol.Locations result = new io.netty.example.worldclock.WorldClockProtocol.Locations(this);
1298 int from_bitField0_ = bitField0_;
1299 if (locationBuilder_ == null) {
1300 if (((bitField0_ & 0x00000001) == 0x00000001)) {
1301 location_ = java.util.Collections.unmodifiableList(location_);
1302 bitField0_ = (bitField0_ & ~0x00000001);
1303 }
1304 result.location_ = location_;
1305 } else {
1306 result.location_ = locationBuilder_.build();
1307 }
1308 onBuilt();
1309 return result;
1310 }
1311
1312 @Override
1313 public Builder mergeFrom(com.google.protobuf.Message other) {
1314 if (other instanceof io.netty.example.worldclock.WorldClockProtocol.Locations) {
1315 return mergeFrom((io.netty.example.worldclock.WorldClockProtocol.Locations)other);
1316 } else {
1317 super.mergeFrom(other);
1318 return this;
1319 }
1320 }
1321
1322 public Builder mergeFrom(io.netty.example.worldclock.WorldClockProtocol.Locations other) {
1323 if (other == io.netty.example.worldclock.WorldClockProtocol.Locations.getDefaultInstance()) return this;
1324 if (locationBuilder_ == null) {
1325 if (!other.location_.isEmpty()) {
1326 if (location_.isEmpty()) {
1327 location_ = other.location_;
1328 bitField0_ = (bitField0_ & ~0x00000001);
1329 } else {
1330 ensureLocationIsMutable();
1331 location_.addAll(other.location_);
1332 }
1333 onChanged();
1334 }
1335 } else {
1336 if (!other.location_.isEmpty()) {
1337 if (locationBuilder_.isEmpty()) {
1338 locationBuilder_.dispose();
1339 locationBuilder_ = null;
1340 location_ = other.location_;
1341 bitField0_ = (bitField0_ & ~0x00000001);
1342 locationBuilder_ =
1343 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1344 getLocationFieldBuilder() : null;
1345 } else {
1346 locationBuilder_.addAllMessages(other.location_);
1347 }
1348 }
1349 }
1350 this.mergeUnknownFields(other.getUnknownFields());
1351 return this;
1352 }
1353
1354 @Override
1355 public final boolean isInitialized() {
1356 for (int i = 0; i < getLocationCount(); i++) {
1357 if (!getLocation(i).isInitialized()) {
1358
1359 return false;
1360 }
1361 }
1362 return true;
1363 }
1364
1365 @Override
1366 public Builder mergeFrom(
1367 com.google.protobuf.CodedInputStream input,
1368 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1369 throws java.io.IOException {
1370 io.netty.example.worldclock.WorldClockProtocol.Locations parsedMessage = null;
1371 try {
1372 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1373 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1374 parsedMessage = (io.netty.example.worldclock.WorldClockProtocol.Locations) e.getUnfinishedMessage();
1375 throw e;
1376 } finally {
1377 if (parsedMessage != null) {
1378 mergeFrom(parsedMessage);
1379 }
1380 }
1381 return this;
1382 }
1383 private int bitField0_;
1384
1385
1386 private java.util.List<io.netty.example.worldclock.WorldClockProtocol.Location> location_ =
1387 java.util.Collections.emptyList();
1388 private void ensureLocationIsMutable() {
1389 if (!((bitField0_ & 0x00000001) == 0x00000001)) {
1390 location_ = new java.util.ArrayList<io.netty.example.worldclock.WorldClockProtocol.Location>(location_);
1391 bitField0_ |= 0x00000001;
1392 }
1393 }
1394
1395 private com.google.protobuf.RepeatedFieldBuilder<
1396 io.netty.example.worldclock.WorldClockProtocol.Location, io.netty.example.worldclock.WorldClockProtocol.Location.Builder, io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder> locationBuilder_;
1397
1398
1399
1400
1401 @Override
1402 public java.util.List<io.netty.example.worldclock.WorldClockProtocol.Location> getLocationList() {
1403 if (locationBuilder_ == null) {
1404 return java.util.Collections.unmodifiableList(location_);
1405 } else {
1406 return locationBuilder_.getMessageList();
1407 }
1408 }
1409
1410
1411
1412 @Override
1413 public int getLocationCount() {
1414 if (locationBuilder_ == null) {
1415 return location_.size();
1416 } else {
1417 return locationBuilder_.getCount();
1418 }
1419 }
1420
1421
1422
1423 @Override
1424 public io.netty.example.worldclock.WorldClockProtocol.Location getLocation(int index) {
1425 if (locationBuilder_ == null) {
1426 return location_.get(index);
1427 } else {
1428 return locationBuilder_.getMessage(index);
1429 }
1430 }
1431
1432
1433
1434 public Builder setLocation(
1435 int index, io.netty.example.worldclock.WorldClockProtocol.Location value) {
1436 if (locationBuilder_ == null) {
1437 checkNotNull(value, "value");
1438 ensureLocationIsMutable();
1439 location_.set(index, value);
1440 onChanged();
1441 } else {
1442 locationBuilder_.setMessage(index, value);
1443 }
1444 return this;
1445 }
1446
1447
1448
1449 public Builder setLocation(
1450 int index, io.netty.example.worldclock.WorldClockProtocol.Location.Builder builderForValue) {
1451 if (locationBuilder_ == null) {
1452 ensureLocationIsMutable();
1453 location_.set(index, builderForValue.build());
1454 onChanged();
1455 } else {
1456 locationBuilder_.setMessage(index, builderForValue.build());
1457 }
1458 return this;
1459 }
1460
1461
1462
1463 public Builder addLocation(io.netty.example.worldclock.WorldClockProtocol.Location value) {
1464 if (locationBuilder_ == null) {
1465 checkNotNull(value, "value");
1466 ensureLocationIsMutable();
1467 location_.add(value);
1468 onChanged();
1469 } else {
1470 locationBuilder_.addMessage(value);
1471 }
1472 return this;
1473 }
1474
1475
1476
1477 public Builder addLocation(
1478 int index, io.netty.example.worldclock.WorldClockProtocol.Location value) {
1479 if (locationBuilder_ == null) {
1480 checkNotNull(value, "value");
1481 ensureLocationIsMutable();
1482 location_.add(index, value);
1483 onChanged();
1484 } else {
1485 locationBuilder_.addMessage(index, value);
1486 }
1487 return this;
1488 }
1489
1490
1491
1492 public Builder addLocation(
1493 io.netty.example.worldclock.WorldClockProtocol.Location.Builder builderForValue) {
1494 if (locationBuilder_ == null) {
1495 ensureLocationIsMutable();
1496 location_.add(builderForValue.build());
1497 onChanged();
1498 } else {
1499 locationBuilder_.addMessage(builderForValue.build());
1500 }
1501 return this;
1502 }
1503
1504
1505
1506 public Builder addLocation(
1507 int index, io.netty.example.worldclock.WorldClockProtocol.Location.Builder builderForValue) {
1508 if (locationBuilder_ == null) {
1509 ensureLocationIsMutable();
1510 location_.add(index, builderForValue.build());
1511 onChanged();
1512 } else {
1513 locationBuilder_.addMessage(index, builderForValue.build());
1514 }
1515 return this;
1516 }
1517
1518
1519
1520 public Builder addAllLocation(
1521 java.lang.Iterable<? extends io.netty.example.worldclock.WorldClockProtocol.Location> values) {
1522 if (locationBuilder_ == null) {
1523 ensureLocationIsMutable();
1524 super.addAll(values, location_);
1525 onChanged();
1526 } else {
1527 locationBuilder_.addAllMessages(values);
1528 }
1529 return this;
1530 }
1531
1532
1533
1534 public Builder clearLocation() {
1535 if (locationBuilder_ == null) {
1536 location_ = java.util.Collections.emptyList();
1537 bitField0_ = (bitField0_ & ~0x00000001);
1538 onChanged();
1539 } else {
1540 locationBuilder_.clear();
1541 }
1542 return this;
1543 }
1544
1545
1546
1547 public Builder removeLocation(int index) {
1548 if (locationBuilder_ == null) {
1549 ensureLocationIsMutable();
1550 location_.remove(index);
1551 onChanged();
1552 } else {
1553 locationBuilder_.remove(index);
1554 }
1555 return this;
1556 }
1557
1558
1559
1560 public io.netty.example.worldclock.WorldClockProtocol.Location.Builder getLocationBuilder(
1561 int index) {
1562 return getLocationFieldBuilder().getBuilder(index);
1563 }
1564
1565
1566
1567 @Override
1568 public io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder getLocationOrBuilder(
1569 int index) {
1570 if (locationBuilder_ == null) {
1571 return location_.get(index); } else {
1572 return locationBuilder_.getMessageOrBuilder(index);
1573 }
1574 }
1575
1576
1577
1578 @Override
1579 public java.util.List<? extends io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder>
1580 getLocationOrBuilderList() {
1581 if (locationBuilder_ != null) {
1582 return locationBuilder_.getMessageOrBuilderList();
1583 } else {
1584 return java.util.Collections.unmodifiableList(location_);
1585 }
1586 }
1587
1588
1589
1590 public io.netty.example.worldclock.WorldClockProtocol.Location.Builder addLocationBuilder() {
1591 return getLocationFieldBuilder().addBuilder(
1592 io.netty.example.worldclock.WorldClockProtocol.Location.getDefaultInstance());
1593 }
1594
1595
1596
1597 public io.netty.example.worldclock.WorldClockProtocol.Location.Builder addLocationBuilder(
1598 int index) {
1599 return getLocationFieldBuilder().addBuilder(
1600 index, io.netty.example.worldclock.WorldClockProtocol.Location.getDefaultInstance());
1601 }
1602
1603
1604
1605 public java.util.List<io.netty.example.worldclock.WorldClockProtocol.Location.Builder>
1606 getLocationBuilderList() {
1607 return getLocationFieldBuilder().getBuilderList();
1608 }
1609 private com.google.protobuf.RepeatedFieldBuilder<
1610 io.netty.example.worldclock.WorldClockProtocol.Location, io.netty.example.worldclock.WorldClockProtocol.Location.Builder, io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder>
1611 getLocationFieldBuilder() {
1612 if (locationBuilder_ == null) {
1613 locationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1614 io.netty.example.worldclock.WorldClockProtocol.Location, io.netty.example.worldclock.WorldClockProtocol.Location.Builder, io.netty.example.worldclock.WorldClockProtocol.LocationOrBuilder>(
1615 location_,
1616 ((bitField0_ & 0x00000001) == 0x00000001),
1617 getParentForChildren(),
1618 isClean());
1619 location_ = null;
1620 }
1621 return locationBuilder_;
1622 }
1623
1624
1625 }
1626
1627 static {
1628 defaultInstance = new Locations(true);
1629 defaultInstance.initFields();
1630 }
1631
1632
1633 }
1634
1635 public interface LocalTimeOrBuilder
1636 extends com.google.protobuf.MessageOrBuilder {
1637
1638
1639
1640
1641
1642 boolean hasYear();
1643
1644
1645
1646 int getYear();
1647
1648
1649
1650
1651
1652 boolean hasMonth();
1653
1654
1655
1656 int getMonth();
1657
1658
1659
1660
1661
1662 boolean hasDayOfMonth();
1663
1664
1665
1666 int getDayOfMonth();
1667
1668
1669
1670
1671
1672 boolean hasDayOfWeek();
1673
1674
1675
1676 io.netty.example.worldclock.WorldClockProtocol.DayOfWeek getDayOfWeek();
1677
1678
1679
1680
1681
1682 boolean hasHour();
1683
1684
1685
1686 int getHour();
1687
1688
1689
1690
1691
1692 boolean hasMinute();
1693
1694
1695
1696 int getMinute();
1697
1698
1699
1700
1701
1702 boolean hasSecond();
1703
1704
1705
1706 int getSecond();
1707 }
1708
1709
1710
1711 public static final class LocalTime extends
1712 com.google.protobuf.GeneratedMessage
1713 implements LocalTimeOrBuilder {
1714
1715 private LocalTime(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1716 super(builder);
1717 this.unknownFields = builder.getUnknownFields();
1718 }
1719 private LocalTime(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1720
1721 private static final LocalTime defaultInstance;
1722 public static LocalTime getDefaultInstance() {
1723 return defaultInstance;
1724 }
1725
1726 @Override
1727 public LocalTime getDefaultInstanceForType() {
1728 return defaultInstance;
1729 }
1730
1731 private final com.google.protobuf.UnknownFieldSet unknownFields;
1732 @java.lang.Override
1733 public final com.google.protobuf.UnknownFieldSet
1734 getUnknownFields() {
1735 return this.unknownFields;
1736 }
1737 private LocalTime(
1738 com.google.protobuf.CodedInputStream input,
1739 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1740 throws com.google.protobuf.InvalidProtocolBufferException {
1741 initFields();
1742 int mutable_bitField0_ = 0;
1743 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1744 com.google.protobuf.UnknownFieldSet.newBuilder();
1745 try {
1746 boolean done = false;
1747 while (!done) {
1748 int tag = input.readTag();
1749 switch (tag) {
1750 case 0:
1751 done = true;
1752 break;
1753 default: {
1754 if (!parseUnknownField(input, unknownFields,
1755 extensionRegistry, tag)) {
1756 done = true;
1757 }
1758 break;
1759 }
1760 case 8: {
1761 bitField0_ |= 0x00000001;
1762 year_ = input.readUInt32();
1763 break;
1764 }
1765 case 16: {
1766 bitField0_ |= 0x00000002;
1767 month_ = input.readUInt32();
1768 break;
1769 }
1770 case 32: {
1771 bitField0_ |= 0x00000004;
1772 dayOfMonth_ = input.readUInt32();
1773 break;
1774 }
1775 case 40: {
1776 int rawValue = input.readEnum();
1777 io.netty.example.worldclock.WorldClockProtocol.DayOfWeek value = io.netty.example.worldclock.WorldClockProtocol.DayOfWeek.valueOf(rawValue);
1778 if (value == null) {
1779 unknownFields.mergeVarintField(5, rawValue);
1780 } else {
1781 bitField0_ |= 0x00000008;
1782 dayOfWeek_ = value;
1783 }
1784 break;
1785 }
1786 case 48: {
1787 bitField0_ |= 0x00000010;
1788 hour_ = input.readUInt32();
1789 break;
1790 }
1791 case 56: {
1792 bitField0_ |= 0x00000020;
1793 minute_ = input.readUInt32();
1794 break;
1795 }
1796 case 64: {
1797 bitField0_ |= 0x00000040;
1798 second_ = input.readUInt32();
1799 break;
1800 }
1801 }
1802 }
1803 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1804 throw e.setUnfinishedMessage(this);
1805 } catch (java.io.IOException e) {
1806 throw new com.google.protobuf.InvalidProtocolBufferException(
1807 e.getMessage()).setUnfinishedMessage(this);
1808 } finally {
1809 this.unknownFields = unknownFields.build();
1810 makeExtensionsImmutable();
1811 }
1812 }
1813 public static final com.google.protobuf.Descriptors.Descriptor
1814 getDescriptor() {
1815 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTime_descriptor;
1816 }
1817
1818 @Override
1819 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1820 internalGetFieldAccessorTable() {
1821 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTime_fieldAccessorTable
1822 .ensureFieldAccessorsInitialized(
1823 io.netty.example.worldclock.WorldClockProtocol.LocalTime.class, io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder.class);
1824 }
1825
1826 public static com.google.protobuf.Parser<LocalTime> PARSER =
1827 new com.google.protobuf.AbstractParser<LocalTime>() {
1828 @Override
1829 public LocalTime parsePartialFrom(
1830 com.google.protobuf.CodedInputStream input,
1831 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1832 throws com.google.protobuf.InvalidProtocolBufferException {
1833 return new LocalTime(input, extensionRegistry);
1834 }
1835 };
1836
1837 @java.lang.Override
1838 public com.google.protobuf.Parser<LocalTime> getParserForType() {
1839 return PARSER;
1840 }
1841
1842 private int bitField0_;
1843
1844 public static final int YEAR_FIELD_NUMBER = 1;
1845 private int year_;
1846
1847
1848
1849 @Override
1850 public boolean hasYear() {
1851 return ((bitField0_ & 0x00000001) == 0x00000001);
1852 }
1853
1854
1855
1856 @Override
1857 public int getYear() {
1858 return year_;
1859 }
1860
1861
1862 public static final int MONTH_FIELD_NUMBER = 2;
1863 private int month_;
1864
1865
1866
1867 @Override
1868 public boolean hasMonth() {
1869 return ((bitField0_ & 0x00000002) == 0x00000002);
1870 }
1871
1872
1873
1874 @Override
1875 public int getMonth() {
1876 return month_;
1877 }
1878
1879
1880 public static final int DAYOFMONTH_FIELD_NUMBER = 4;
1881 private int dayOfMonth_;
1882
1883
1884
1885 @Override
1886 public boolean hasDayOfMonth() {
1887 return ((bitField0_ & 0x00000004) == 0x00000004);
1888 }
1889
1890
1891
1892 @Override
1893 public int getDayOfMonth() {
1894 return dayOfMonth_;
1895 }
1896
1897
1898 public static final int DAYOFWEEK_FIELD_NUMBER = 5;
1899 private io.netty.example.worldclock.WorldClockProtocol.DayOfWeek dayOfWeek_;
1900
1901
1902
1903 @Override
1904 public boolean hasDayOfWeek() {
1905 return ((bitField0_ & 0x00000008) == 0x00000008);
1906 }
1907
1908
1909
1910 @Override
1911 public io.netty.example.worldclock.WorldClockProtocol.DayOfWeek getDayOfWeek() {
1912 return dayOfWeek_;
1913 }
1914
1915
1916 public static final int HOUR_FIELD_NUMBER = 6;
1917 private int hour_;
1918
1919
1920
1921 @Override
1922 public boolean hasHour() {
1923 return ((bitField0_ & 0x00000010) == 0x00000010);
1924 }
1925
1926
1927
1928 @Override
1929 public int getHour() {
1930 return hour_;
1931 }
1932
1933
1934 public static final int MINUTE_FIELD_NUMBER = 7;
1935 private int minute_;
1936
1937
1938
1939 @Override
1940 public boolean hasMinute() {
1941 return ((bitField0_ & 0x00000020) == 0x00000020);
1942 }
1943
1944
1945
1946 @Override
1947 public int getMinute() {
1948 return minute_;
1949 }
1950
1951
1952 public static final int SECOND_FIELD_NUMBER = 8;
1953 private int second_;
1954
1955
1956
1957 @Override
1958 public boolean hasSecond() {
1959 return ((bitField0_ & 0x00000040) == 0x00000040);
1960 }
1961
1962
1963
1964 @Override
1965 public int getSecond() {
1966 return second_;
1967 }
1968
1969 private void initFields() {
1970 year_ = 0;
1971 month_ = 0;
1972 dayOfMonth_ = 0;
1973 dayOfWeek_ = io.netty.example.worldclock.WorldClockProtocol.DayOfWeek.SUNDAY;
1974 hour_ = 0;
1975 minute_ = 0;
1976 second_ = 0;
1977 }
1978 private byte memoizedIsInitialized = -1;
1979 @Override
1980 public final boolean isInitialized() {
1981 byte isInitialized = memoizedIsInitialized;
1982 if (isInitialized != -1) return isInitialized == 1;
1983
1984 if (!hasYear()) {
1985 memoizedIsInitialized = 0;
1986 return false;
1987 }
1988 if (!hasMonth()) {
1989 memoizedIsInitialized = 0;
1990 return false;
1991 }
1992 if (!hasDayOfMonth()) {
1993 memoizedIsInitialized = 0;
1994 return false;
1995 }
1996 if (!hasDayOfWeek()) {
1997 memoizedIsInitialized = 0;
1998 return false;
1999 }
2000 if (!hasHour()) {
2001 memoizedIsInitialized = 0;
2002 return false;
2003 }
2004 if (!hasMinute()) {
2005 memoizedIsInitialized = 0;
2006 return false;
2007 }
2008 if (!hasSecond()) {
2009 memoizedIsInitialized = 0;
2010 return false;
2011 }
2012 memoizedIsInitialized = 1;
2013 return true;
2014 }
2015
2016 @Override
2017 public void writeTo(com.google.protobuf.CodedOutputStream output)
2018 throws java.io.IOException {
2019 getSerializedSize();
2020 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2021 output.writeUInt32(1, year_);
2022 }
2023 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2024 output.writeUInt32(2, month_);
2025 }
2026 if (((bitField0_ & 0x00000004) == 0x00000004)) {
2027 output.writeUInt32(4, dayOfMonth_);
2028 }
2029 if (((bitField0_ & 0x00000008) == 0x00000008)) {
2030 output.writeEnum(5, dayOfWeek_.getNumber());
2031 }
2032 if (((bitField0_ & 0x00000010) == 0x00000010)) {
2033 output.writeUInt32(6, hour_);
2034 }
2035 if (((bitField0_ & 0x00000020) == 0x00000020)) {
2036 output.writeUInt32(7, minute_);
2037 }
2038 if (((bitField0_ & 0x00000040) == 0x00000040)) {
2039 output.writeUInt32(8, second_);
2040 }
2041 getUnknownFields().writeTo(output);
2042 }
2043
2044 private int memoizedSerializedSize = -1;
2045 @Override
2046 public int getSerializedSize() {
2047 int size = memoizedSerializedSize;
2048 if (size != -1) return size;
2049
2050 size = 0;
2051 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2052 size += com.google.protobuf.CodedOutputStream
2053 .computeUInt32Size(1, year_);
2054 }
2055 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2056 size += com.google.protobuf.CodedOutputStream
2057 .computeUInt32Size(2, month_);
2058 }
2059 if (((bitField0_ & 0x00000004) == 0x00000004)) {
2060 size += com.google.protobuf.CodedOutputStream
2061 .computeUInt32Size(4, dayOfMonth_);
2062 }
2063 if (((bitField0_ & 0x00000008) == 0x00000008)) {
2064 size += com.google.protobuf.CodedOutputStream
2065 .computeEnumSize(5, dayOfWeek_.getNumber());
2066 }
2067 if (((bitField0_ & 0x00000010) == 0x00000010)) {
2068 size += com.google.protobuf.CodedOutputStream
2069 .computeUInt32Size(6, hour_);
2070 }
2071 if (((bitField0_ & 0x00000020) == 0x00000020)) {
2072 size += com.google.protobuf.CodedOutputStream
2073 .computeUInt32Size(7, minute_);
2074 }
2075 if (((bitField0_ & 0x00000040) == 0x00000040)) {
2076 size += com.google.protobuf.CodedOutputStream
2077 .computeUInt32Size(8, second_);
2078 }
2079 size += getUnknownFields().getSerializedSize();
2080 memoizedSerializedSize = size;
2081 return size;
2082 }
2083
2084 private static final long serialVersionUID = 0L;
2085 @java.lang.Override
2086 protected java.lang.Object writeReplace()
2087 throws java.io.ObjectStreamException {
2088 return super.writeReplace();
2089 }
2090
2091 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseFrom(
2092 com.google.protobuf.ByteString data)
2093 throws com.google.protobuf.InvalidProtocolBufferException {
2094 return PARSER.parseFrom(data);
2095 }
2096 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseFrom(
2097 com.google.protobuf.ByteString data,
2098 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2099 throws com.google.protobuf.InvalidProtocolBufferException {
2100 return PARSER.parseFrom(data, extensionRegistry);
2101 }
2102 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseFrom(byte[] data)
2103 throws com.google.protobuf.InvalidProtocolBufferException {
2104 return PARSER.parseFrom(data);
2105 }
2106 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseFrom(
2107 byte[] data,
2108 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2109 throws com.google.protobuf.InvalidProtocolBufferException {
2110 return PARSER.parseFrom(data, extensionRegistry);
2111 }
2112 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseFrom(java.io.InputStream input)
2113 throws java.io.IOException {
2114 return PARSER.parseFrom(input);
2115 }
2116 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseFrom(
2117 java.io.InputStream input,
2118 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2119 throws java.io.IOException {
2120 return PARSER.parseFrom(input, extensionRegistry);
2121 }
2122 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseDelimitedFrom(java.io.InputStream input)
2123 throws java.io.IOException {
2124 return PARSER.parseDelimitedFrom(input);
2125 }
2126 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseDelimitedFrom(
2127 java.io.InputStream input,
2128 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2129 throws java.io.IOException {
2130 return PARSER.parseDelimitedFrom(input, extensionRegistry);
2131 }
2132 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseFrom(
2133 com.google.protobuf.CodedInputStream input)
2134 throws java.io.IOException {
2135 return PARSER.parseFrom(input);
2136 }
2137 public static io.netty.example.worldclock.WorldClockProtocol.LocalTime parseFrom(
2138 com.google.protobuf.CodedInputStream input,
2139 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2140 throws java.io.IOException {
2141 return PARSER.parseFrom(input, extensionRegistry);
2142 }
2143
2144 public static Builder newBuilder() { return Builder.create(); }
2145 @Override
2146 public Builder newBuilderForType() { return newBuilder(); }
2147 public static Builder newBuilder(io.netty.example.worldclock.WorldClockProtocol.LocalTime prototype) {
2148 return newBuilder().mergeFrom(prototype);
2149 }
2150 @Override
2151 public Builder toBuilder() { return newBuilder(this); }
2152
2153 @java.lang.Override
2154 protected Builder newBuilderForType(
2155 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2156 Builder builder = new Builder(parent);
2157 return builder;
2158 }
2159
2160
2161
2162 public static final class Builder extends
2163 com.google.protobuf.GeneratedMessage.Builder<Builder>
2164 implements io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder {
2165 public static final com.google.protobuf.Descriptors.Descriptor
2166 getDescriptor() {
2167 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTime_descriptor;
2168 }
2169
2170 @Override
2171 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2172 internalGetFieldAccessorTable() {
2173 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTime_fieldAccessorTable
2174 .ensureFieldAccessorsInitialized(
2175 io.netty.example.worldclock.WorldClockProtocol.LocalTime.class, io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder.class);
2176 }
2177
2178
2179 private Builder() {
2180 maybeForceBuilderInitialization();
2181 }
2182
2183 private Builder(
2184 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2185 super(parent);
2186 maybeForceBuilderInitialization();
2187 }
2188 private void maybeForceBuilderInitialization() {
2189 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2190 }
2191 }
2192 private static Builder create() {
2193 return new Builder();
2194 }
2195
2196 @Override
2197 public Builder clear() {
2198 super.clear();
2199 year_ = 0;
2200 bitField0_ = (bitField0_ & ~0x00000001);
2201 month_ = 0;
2202 bitField0_ = (bitField0_ & ~0x00000002);
2203 dayOfMonth_ = 0;
2204 bitField0_ = (bitField0_ & ~0x00000004);
2205 dayOfWeek_ = io.netty.example.worldclock.WorldClockProtocol.DayOfWeek.SUNDAY;
2206 bitField0_ = (bitField0_ & ~0x00000008);
2207 hour_ = 0;
2208 bitField0_ = (bitField0_ & ~0x00000010);
2209 minute_ = 0;
2210 bitField0_ = (bitField0_ & ~0x00000020);
2211 second_ = 0;
2212 bitField0_ = (bitField0_ & ~0x00000040);
2213 return this;
2214 }
2215
2216 @Override
2217 public Builder clone() {
2218 return create().mergeFrom(buildPartial());
2219 }
2220
2221 @Override
2222 public com.google.protobuf.Descriptors.Descriptor
2223 getDescriptorForType() {
2224 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTime_descriptor;
2225 }
2226
2227 @Override
2228 public io.netty.example.worldclock.WorldClockProtocol.LocalTime getDefaultInstanceForType() {
2229 return io.netty.example.worldclock.WorldClockProtocol.LocalTime.getDefaultInstance();
2230 }
2231
2232 @Override
2233 public io.netty.example.worldclock.WorldClockProtocol.LocalTime build() {
2234 io.netty.example.worldclock.WorldClockProtocol.LocalTime result = buildPartial();
2235 if (!result.isInitialized()) {
2236 throw newUninitializedMessageException(result);
2237 }
2238 return result;
2239 }
2240
2241 @Override
2242 public io.netty.example.worldclock.WorldClockProtocol.LocalTime buildPartial() {
2243 io.netty.example.worldclock.WorldClockProtocol.LocalTime result = new io.netty.example.worldclock.WorldClockProtocol.LocalTime(this);
2244 int from_bitField0_ = bitField0_;
2245 int to_bitField0_ = 0;
2246 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2247 to_bitField0_ |= 0x00000001;
2248 }
2249 result.year_ = year_;
2250 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2251 to_bitField0_ |= 0x00000002;
2252 }
2253 result.month_ = month_;
2254 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
2255 to_bitField0_ |= 0x00000004;
2256 }
2257 result.dayOfMonth_ = dayOfMonth_;
2258 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
2259 to_bitField0_ |= 0x00000008;
2260 }
2261 result.dayOfWeek_ = dayOfWeek_;
2262 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
2263 to_bitField0_ |= 0x00000010;
2264 }
2265 result.hour_ = hour_;
2266 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
2267 to_bitField0_ |= 0x00000020;
2268 }
2269 result.minute_ = minute_;
2270 if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
2271 to_bitField0_ |= 0x00000040;
2272 }
2273 result.second_ = second_;
2274 result.bitField0_ = to_bitField0_;
2275 onBuilt();
2276 return result;
2277 }
2278
2279 @Override
2280 public Builder mergeFrom(com.google.protobuf.Message other) {
2281 if (other instanceof io.netty.example.worldclock.WorldClockProtocol.LocalTime) {
2282 return mergeFrom((io.netty.example.worldclock.WorldClockProtocol.LocalTime)other);
2283 } else {
2284 super.mergeFrom(other);
2285 return this;
2286 }
2287 }
2288
2289 public Builder mergeFrom(io.netty.example.worldclock.WorldClockProtocol.LocalTime other) {
2290 if (other == io.netty.example.worldclock.WorldClockProtocol.LocalTime.getDefaultInstance()) return this;
2291 if (other.hasYear()) {
2292 setYear(other.getYear());
2293 }
2294 if (other.hasMonth()) {
2295 setMonth(other.getMonth());
2296 }
2297 if (other.hasDayOfMonth()) {
2298 setDayOfMonth(other.getDayOfMonth());
2299 }
2300 if (other.hasDayOfWeek()) {
2301 setDayOfWeek(other.getDayOfWeek());
2302 }
2303 if (other.hasHour()) {
2304 setHour(other.getHour());
2305 }
2306 if (other.hasMinute()) {
2307 setMinute(other.getMinute());
2308 }
2309 if (other.hasSecond()) {
2310 setSecond(other.getSecond());
2311 }
2312 this.mergeUnknownFields(other.getUnknownFields());
2313 return this;
2314 }
2315
2316 @Override
2317 public final boolean isInitialized() {
2318 if (!hasYear()) {
2319
2320 return false;
2321 }
2322 if (!hasMonth()) {
2323
2324 return false;
2325 }
2326 if (!hasDayOfMonth()) {
2327
2328 return false;
2329 }
2330 if (!hasDayOfWeek()) {
2331
2332 return false;
2333 }
2334 if (!hasHour()) {
2335
2336 return false;
2337 }
2338 if (!hasMinute()) {
2339
2340 return false;
2341 }
2342 if (!hasSecond()) {
2343
2344 return false;
2345 }
2346 return true;
2347 }
2348
2349 @Override
2350 public Builder mergeFrom(
2351 com.google.protobuf.CodedInputStream input,
2352 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2353 throws java.io.IOException {
2354 io.netty.example.worldclock.WorldClockProtocol.LocalTime parsedMessage = null;
2355 try {
2356 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2357 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2358 parsedMessage = (io.netty.example.worldclock.WorldClockProtocol.LocalTime) e.getUnfinishedMessage();
2359 throw e;
2360 } finally {
2361 if (parsedMessage != null) {
2362 mergeFrom(parsedMessage);
2363 }
2364 }
2365 return this;
2366 }
2367 private int bitField0_;
2368
2369
2370 private int year_ ;
2371
2372
2373
2374 @Override
2375 public boolean hasYear() {
2376 return ((bitField0_ & 0x00000001) == 0x00000001);
2377 }
2378
2379
2380
2381 @Override
2382 public int getYear() {
2383 return year_;
2384 }
2385
2386
2387
2388 public Builder setYear(int value) {
2389 bitField0_ |= 0x00000001;
2390 year_ = value;
2391 onChanged();
2392 return this;
2393 }
2394
2395
2396
2397 public Builder clearYear() {
2398 bitField0_ = (bitField0_ & ~0x00000001);
2399 year_ = 0;
2400 onChanged();
2401 return this;
2402 }
2403
2404
2405 private int month_ ;
2406
2407
2408
2409 @Override
2410 public boolean hasMonth() {
2411 return ((bitField0_ & 0x00000002) == 0x00000002);
2412 }
2413
2414
2415
2416 @Override
2417 public int getMonth() {
2418 return month_;
2419 }
2420
2421
2422
2423 public Builder setMonth(int value) {
2424 bitField0_ |= 0x00000002;
2425 month_ = value;
2426 onChanged();
2427 return this;
2428 }
2429
2430
2431
2432 public Builder clearMonth() {
2433 bitField0_ = (bitField0_ & ~0x00000002);
2434 month_ = 0;
2435 onChanged();
2436 return this;
2437 }
2438
2439
2440 private int dayOfMonth_ ;
2441
2442
2443
2444 @Override
2445 public boolean hasDayOfMonth() {
2446 return ((bitField0_ & 0x00000004) == 0x00000004);
2447 }
2448
2449
2450
2451 @Override
2452 public int getDayOfMonth() {
2453 return dayOfMonth_;
2454 }
2455
2456
2457
2458 public Builder setDayOfMonth(int value) {
2459 bitField0_ |= 0x00000004;
2460 dayOfMonth_ = value;
2461 onChanged();
2462 return this;
2463 }
2464
2465
2466
2467 public Builder clearDayOfMonth() {
2468 bitField0_ = (bitField0_ & ~0x00000004);
2469 dayOfMonth_ = 0;
2470 onChanged();
2471 return this;
2472 }
2473
2474
2475 private io.netty.example.worldclock.WorldClockProtocol.DayOfWeek dayOfWeek_ = io.netty.example.worldclock.WorldClockProtocol.DayOfWeek.SUNDAY;
2476
2477
2478
2479 @Override
2480 public boolean hasDayOfWeek() {
2481 return ((bitField0_ & 0x00000008) == 0x00000008);
2482 }
2483
2484
2485
2486 @Override
2487 public io.netty.example.worldclock.WorldClockProtocol.DayOfWeek getDayOfWeek() {
2488 return dayOfWeek_;
2489 }
2490
2491
2492
2493 public Builder setDayOfWeek(io.netty.example.worldclock.WorldClockProtocol.DayOfWeek value) {
2494 checkNotNull(value, "value");
2495 bitField0_ |= 0x00000008;
2496 dayOfWeek_ = value;
2497 onChanged();
2498 return this;
2499 }
2500
2501
2502
2503 public Builder clearDayOfWeek() {
2504 bitField0_ = (bitField0_ & ~0x00000008);
2505 dayOfWeek_ = io.netty.example.worldclock.WorldClockProtocol.DayOfWeek.SUNDAY;
2506 onChanged();
2507 return this;
2508 }
2509
2510
2511 private int hour_ ;
2512
2513
2514
2515 @Override
2516 public boolean hasHour() {
2517 return ((bitField0_ & 0x00000010) == 0x00000010);
2518 }
2519
2520
2521
2522 @Override
2523 public int getHour() {
2524 return hour_;
2525 }
2526
2527
2528
2529 public Builder setHour(int value) {
2530 bitField0_ |= 0x00000010;
2531 hour_ = value;
2532 onChanged();
2533 return this;
2534 }
2535
2536
2537
2538 public Builder clearHour() {
2539 bitField0_ = (bitField0_ & ~0x00000010);
2540 hour_ = 0;
2541 onChanged();
2542 return this;
2543 }
2544
2545
2546 private int minute_ ;
2547
2548
2549
2550 @Override
2551 public boolean hasMinute() {
2552 return ((bitField0_ & 0x00000020) == 0x00000020);
2553 }
2554
2555
2556
2557 @Override
2558 public int getMinute() {
2559 return minute_;
2560 }
2561
2562
2563
2564 public Builder setMinute(int value) {
2565 bitField0_ |= 0x00000020;
2566 minute_ = value;
2567 onChanged();
2568 return this;
2569 }
2570
2571
2572
2573 public Builder clearMinute() {
2574 bitField0_ = (bitField0_ & ~0x00000020);
2575 minute_ = 0;
2576 onChanged();
2577 return this;
2578 }
2579
2580
2581 private int second_ ;
2582
2583
2584
2585 @Override
2586 public boolean hasSecond() {
2587 return ((bitField0_ & 0x00000040) == 0x00000040);
2588 }
2589
2590
2591
2592 @Override
2593 public int getSecond() {
2594 return second_;
2595 }
2596
2597
2598
2599 public Builder setSecond(int value) {
2600 bitField0_ |= 0x00000040;
2601 second_ = value;
2602 onChanged();
2603 return this;
2604 }
2605
2606
2607
2608 public Builder clearSecond() {
2609 bitField0_ = (bitField0_ & ~0x00000040);
2610 second_ = 0;
2611 onChanged();
2612 return this;
2613 }
2614
2615
2616 }
2617
2618 static {
2619 defaultInstance = new LocalTime(true);
2620 defaultInstance.initFields();
2621 }
2622
2623
2624 }
2625
2626 public interface LocalTimesOrBuilder
2627 extends com.google.protobuf.MessageOrBuilder {
2628
2629
2630
2631
2632
2633 java.util.List<io.netty.example.worldclock.WorldClockProtocol.LocalTime>
2634 getLocalTimeList();
2635
2636
2637
2638 io.netty.example.worldclock.WorldClockProtocol.LocalTime getLocalTime(int index);
2639
2640
2641
2642 int getLocalTimeCount();
2643
2644
2645
2646 java.util.List<? extends io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder>
2647 getLocalTimeOrBuilderList();
2648
2649
2650
2651 io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder getLocalTimeOrBuilder(
2652 int index);
2653 }
2654
2655
2656
2657 public static final class LocalTimes extends
2658 com.google.protobuf.GeneratedMessage
2659 implements LocalTimesOrBuilder {
2660
2661 private LocalTimes(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2662 super(builder);
2663 this.unknownFields = builder.getUnknownFields();
2664 }
2665 private LocalTimes(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2666
2667 private static final LocalTimes defaultInstance;
2668 public static LocalTimes getDefaultInstance() {
2669 return defaultInstance;
2670 }
2671
2672 @Override
2673 public LocalTimes getDefaultInstanceForType() {
2674 return defaultInstance;
2675 }
2676
2677 private final com.google.protobuf.UnknownFieldSet unknownFields;
2678 @java.lang.Override
2679 public final com.google.protobuf.UnknownFieldSet
2680 getUnknownFields() {
2681 return this.unknownFields;
2682 }
2683 private LocalTimes(
2684 com.google.protobuf.CodedInputStream input,
2685 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2686 throws com.google.protobuf.InvalidProtocolBufferException {
2687 initFields();
2688 int mutable_bitField0_ = 0;
2689 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2690 com.google.protobuf.UnknownFieldSet.newBuilder();
2691 try {
2692 boolean done = false;
2693 while (!done) {
2694 int tag = input.readTag();
2695 switch (tag) {
2696 case 0:
2697 done = true;
2698 break;
2699 default: {
2700 if (!parseUnknownField(input, unknownFields,
2701 extensionRegistry, tag)) {
2702 done = true;
2703 }
2704 break;
2705 }
2706 case 10: {
2707 if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
2708 localTime_ = new java.util.ArrayList<io.netty.example.worldclock.WorldClockProtocol.LocalTime>();
2709 mutable_bitField0_ |= 0x00000001;
2710 }
2711 localTime_.add(input.readMessage(io.netty.example.worldclock.WorldClockProtocol.LocalTime.PARSER, extensionRegistry));
2712 break;
2713 }
2714 }
2715 }
2716 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2717 throw e.setUnfinishedMessage(this);
2718 } catch (java.io.IOException e) {
2719 throw new com.google.protobuf.InvalidProtocolBufferException(
2720 e.getMessage()).setUnfinishedMessage(this);
2721 } finally {
2722 if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
2723 localTime_ = java.util.Collections.unmodifiableList(localTime_);
2724 }
2725 this.unknownFields = unknownFields.build();
2726 makeExtensionsImmutable();
2727 }
2728 }
2729 public static final com.google.protobuf.Descriptors.Descriptor
2730 getDescriptor() {
2731 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTimes_descriptor;
2732 }
2733
2734 @Override
2735 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2736 internalGetFieldAccessorTable() {
2737 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTimes_fieldAccessorTable
2738 .ensureFieldAccessorsInitialized(
2739 io.netty.example.worldclock.WorldClockProtocol.LocalTimes.class, io.netty.example.worldclock.WorldClockProtocol.LocalTimes.Builder.class);
2740 }
2741
2742 public static com.google.protobuf.Parser<LocalTimes> PARSER =
2743 new com.google.protobuf.AbstractParser<LocalTimes>() {
2744 @Override
2745 public LocalTimes parsePartialFrom(
2746 com.google.protobuf.CodedInputStream input,
2747 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2748 throws com.google.protobuf.InvalidProtocolBufferException {
2749 return new LocalTimes(input, extensionRegistry);
2750 }
2751 };
2752
2753 @java.lang.Override
2754 public com.google.protobuf.Parser<LocalTimes> getParserForType() {
2755 return PARSER;
2756 }
2757
2758
2759 public static final int LOCALTIME_FIELD_NUMBER = 1;
2760 private java.util.List<io.netty.example.worldclock.WorldClockProtocol.LocalTime> localTime_;
2761
2762
2763
2764 @Override
2765 public java.util.List<io.netty.example.worldclock.WorldClockProtocol.LocalTime> getLocalTimeList() {
2766 return localTime_;
2767 }
2768
2769
2770
2771 @Override
2772 public java.util.List<? extends io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder>
2773 getLocalTimeOrBuilderList() {
2774 return localTime_;
2775 }
2776
2777
2778
2779 @Override
2780 public int getLocalTimeCount() {
2781 return localTime_.size();
2782 }
2783
2784
2785
2786 @Override
2787 public io.netty.example.worldclock.WorldClockProtocol.LocalTime getLocalTime(int index) {
2788 return localTime_.get(index);
2789 }
2790
2791
2792
2793 @Override
2794 public io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder getLocalTimeOrBuilder(
2795 int index) {
2796 return localTime_.get(index);
2797 }
2798
2799 private void initFields() {
2800 localTime_ = java.util.Collections.emptyList();
2801 }
2802 private byte memoizedIsInitialized = -1;
2803 @Override
2804 public final boolean isInitialized() {
2805 byte isInitialized = memoizedIsInitialized;
2806 if (isInitialized != -1) return isInitialized == 1;
2807
2808 for (int i = 0; i < getLocalTimeCount(); i++) {
2809 if (!getLocalTime(i).isInitialized()) {
2810 memoizedIsInitialized = 0;
2811 return false;
2812 }
2813 }
2814 memoizedIsInitialized = 1;
2815 return true;
2816 }
2817
2818 @Override
2819 public void writeTo(com.google.protobuf.CodedOutputStream output)
2820 throws java.io.IOException {
2821 getSerializedSize();
2822 for (int i = 0; i < localTime_.size(); i++) {
2823 output.writeMessage(1, localTime_.get(i));
2824 }
2825 getUnknownFields().writeTo(output);
2826 }
2827
2828 private int memoizedSerializedSize = -1;
2829 @Override
2830 public int getSerializedSize() {
2831 int size = memoizedSerializedSize;
2832 if (size != -1) return size;
2833
2834 size = 0;
2835 for (int i = 0; i < localTime_.size(); i++) {
2836 size += com.google.protobuf.CodedOutputStream
2837 .computeMessageSize(1, localTime_.get(i));
2838 }
2839 size += getUnknownFields().getSerializedSize();
2840 memoizedSerializedSize = size;
2841 return size;
2842 }
2843
2844 private static final long serialVersionUID = 0L;
2845 @java.lang.Override
2846 protected java.lang.Object writeReplace()
2847 throws java.io.ObjectStreamException {
2848 return super.writeReplace();
2849 }
2850
2851 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseFrom(
2852 com.google.protobuf.ByteString data)
2853 throws com.google.protobuf.InvalidProtocolBufferException {
2854 return PARSER.parseFrom(data);
2855 }
2856 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseFrom(
2857 com.google.protobuf.ByteString data,
2858 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2859 throws com.google.protobuf.InvalidProtocolBufferException {
2860 return PARSER.parseFrom(data, extensionRegistry);
2861 }
2862 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseFrom(byte[] data)
2863 throws com.google.protobuf.InvalidProtocolBufferException {
2864 return PARSER.parseFrom(data);
2865 }
2866 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseFrom(
2867 byte[] data,
2868 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2869 throws com.google.protobuf.InvalidProtocolBufferException {
2870 return PARSER.parseFrom(data, extensionRegistry);
2871 }
2872 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseFrom(java.io.InputStream input)
2873 throws java.io.IOException {
2874 return PARSER.parseFrom(input);
2875 }
2876 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseFrom(
2877 java.io.InputStream input,
2878 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2879 throws java.io.IOException {
2880 return PARSER.parseFrom(input, extensionRegistry);
2881 }
2882 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseDelimitedFrom(java.io.InputStream input)
2883 throws java.io.IOException {
2884 return PARSER.parseDelimitedFrom(input);
2885 }
2886 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseDelimitedFrom(
2887 java.io.InputStream input,
2888 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2889 throws java.io.IOException {
2890 return PARSER.parseDelimitedFrom(input, extensionRegistry);
2891 }
2892 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseFrom(
2893 com.google.protobuf.CodedInputStream input)
2894 throws java.io.IOException {
2895 return PARSER.parseFrom(input);
2896 }
2897 public static io.netty.example.worldclock.WorldClockProtocol.LocalTimes parseFrom(
2898 com.google.protobuf.CodedInputStream input,
2899 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2900 throws java.io.IOException {
2901 return PARSER.parseFrom(input, extensionRegistry);
2902 }
2903
2904 public static Builder newBuilder() { return Builder.create(); }
2905 @Override
2906 public Builder newBuilderForType() { return newBuilder(); }
2907 public static Builder newBuilder(io.netty.example.worldclock.WorldClockProtocol.LocalTimes prototype) {
2908 return newBuilder().mergeFrom(prototype);
2909 }
2910 @Override
2911 public Builder toBuilder() { return newBuilder(this); }
2912
2913 @java.lang.Override
2914 protected Builder newBuilderForType(
2915 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2916 Builder builder = new Builder(parent);
2917 return builder;
2918 }
2919
2920
2921
2922 public static final class Builder extends
2923 com.google.protobuf.GeneratedMessage.Builder<Builder>
2924 implements io.netty.example.worldclock.WorldClockProtocol.LocalTimesOrBuilder {
2925 public static final com.google.protobuf.Descriptors.Descriptor
2926 getDescriptor() {
2927 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTimes_descriptor;
2928 }
2929
2930 @Override
2931 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2932 internalGetFieldAccessorTable() {
2933 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTimes_fieldAccessorTable
2934 .ensureFieldAccessorsInitialized(
2935 io.netty.example.worldclock.WorldClockProtocol.LocalTimes.class, io.netty.example.worldclock.WorldClockProtocol.LocalTimes.Builder.class);
2936 }
2937
2938
2939 private Builder() {
2940 maybeForceBuilderInitialization();
2941 }
2942
2943 private Builder(
2944 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2945 super(parent);
2946 maybeForceBuilderInitialization();
2947 }
2948 private void maybeForceBuilderInitialization() {
2949 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2950 getLocalTimeFieldBuilder();
2951 }
2952 }
2953 private static Builder create() {
2954 return new Builder();
2955 }
2956
2957 @Override
2958 public Builder clear() {
2959 super.clear();
2960 if (localTimeBuilder_ == null) {
2961 localTime_ = java.util.Collections.emptyList();
2962 bitField0_ = (bitField0_ & ~0x00000001);
2963 } else {
2964 localTimeBuilder_.clear();
2965 }
2966 return this;
2967 }
2968
2969 @Override
2970 public Builder clone() {
2971 return create().mergeFrom(buildPartial());
2972 }
2973
2974 @Override
2975 public com.google.protobuf.Descriptors.Descriptor
2976 getDescriptorForType() {
2977 return io.netty.example.worldclock.WorldClockProtocol.internal_static_io_netty_example_worldclock_LocalTimes_descriptor;
2978 }
2979
2980 @Override
2981 public io.netty.example.worldclock.WorldClockProtocol.LocalTimes getDefaultInstanceForType() {
2982 return io.netty.example.worldclock.WorldClockProtocol.LocalTimes.getDefaultInstance();
2983 }
2984
2985 @Override
2986 public io.netty.example.worldclock.WorldClockProtocol.LocalTimes build() {
2987 io.netty.example.worldclock.WorldClockProtocol.LocalTimes result = buildPartial();
2988 if (!result.isInitialized()) {
2989 throw newUninitializedMessageException(result);
2990 }
2991 return result;
2992 }
2993
2994 @Override
2995 public io.netty.example.worldclock.WorldClockProtocol.LocalTimes buildPartial() {
2996 io.netty.example.worldclock.WorldClockProtocol.LocalTimes result = new io.netty.example.worldclock.WorldClockProtocol.LocalTimes(this);
2997 int from_bitField0_ = bitField0_;
2998 if (localTimeBuilder_ == null) {
2999 if (((bitField0_ & 0x00000001) == 0x00000001)) {
3000 localTime_ = java.util.Collections.unmodifiableList(localTime_);
3001 bitField0_ = (bitField0_ & ~0x00000001);
3002 }
3003 result.localTime_ = localTime_;
3004 } else {
3005 result.localTime_ = localTimeBuilder_.build();
3006 }
3007 onBuilt();
3008 return result;
3009 }
3010
3011 @Override
3012 public Builder mergeFrom(com.google.protobuf.Message other) {
3013 if (other instanceof io.netty.example.worldclock.WorldClockProtocol.LocalTimes) {
3014 return mergeFrom((io.netty.example.worldclock.WorldClockProtocol.LocalTimes)other);
3015 } else {
3016 super.mergeFrom(other);
3017 return this;
3018 }
3019 }
3020
3021 public Builder mergeFrom(io.netty.example.worldclock.WorldClockProtocol.LocalTimes other) {
3022 if (other == io.netty.example.worldclock.WorldClockProtocol.LocalTimes.getDefaultInstance()) return this;
3023 if (localTimeBuilder_ == null) {
3024 if (!other.localTime_.isEmpty()) {
3025 if (localTime_.isEmpty()) {
3026 localTime_ = other.localTime_;
3027 bitField0_ = (bitField0_ & ~0x00000001);
3028 } else {
3029 ensureLocalTimeIsMutable();
3030 localTime_.addAll(other.localTime_);
3031 }
3032 onChanged();
3033 }
3034 } else {
3035 if (!other.localTime_.isEmpty()) {
3036 if (localTimeBuilder_.isEmpty()) {
3037 localTimeBuilder_.dispose();
3038 localTimeBuilder_ = null;
3039 localTime_ = other.localTime_;
3040 bitField0_ = (bitField0_ & ~0x00000001);
3041 localTimeBuilder_ =
3042 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
3043 getLocalTimeFieldBuilder() : null;
3044 } else {
3045 localTimeBuilder_.addAllMessages(other.localTime_);
3046 }
3047 }
3048 }
3049 this.mergeUnknownFields(other.getUnknownFields());
3050 return this;
3051 }
3052
3053 @Override
3054 public final boolean isInitialized() {
3055 for (int i = 0; i < getLocalTimeCount(); i++) {
3056 if (!getLocalTime(i).isInitialized()) {
3057
3058 return false;
3059 }
3060 }
3061 return true;
3062 }
3063
3064 @Override
3065 public Builder mergeFrom(
3066 com.google.protobuf.CodedInputStream input,
3067 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3068 throws java.io.IOException {
3069 io.netty.example.worldclock.WorldClockProtocol.LocalTimes parsedMessage = null;
3070 try {
3071 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3072 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3073 parsedMessage = (io.netty.example.worldclock.WorldClockProtocol.LocalTimes) e.getUnfinishedMessage();
3074 throw e;
3075 } finally {
3076 if (parsedMessage != null) {
3077 mergeFrom(parsedMessage);
3078 }
3079 }
3080 return this;
3081 }
3082 private int bitField0_;
3083
3084
3085 private java.util.List<io.netty.example.worldclock.WorldClockProtocol.LocalTime> localTime_ =
3086 java.util.Collections.emptyList();
3087 private void ensureLocalTimeIsMutable() {
3088 if (!((bitField0_ & 0x00000001) == 0x00000001)) {
3089 localTime_ = new java.util.ArrayList<io.netty.example.worldclock.WorldClockProtocol.LocalTime>(localTime_);
3090 bitField0_ |= 0x00000001;
3091 }
3092 }
3093
3094 private com.google.protobuf.RepeatedFieldBuilder<
3095 io.netty.example.worldclock.WorldClockProtocol.LocalTime, io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder, io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder> localTimeBuilder_;
3096
3097
3098
3099
3100 @Override
3101 public java.util.List<io.netty.example.worldclock.WorldClockProtocol.LocalTime> getLocalTimeList() {
3102 if (localTimeBuilder_ == null) {
3103 return java.util.Collections.unmodifiableList(localTime_);
3104 } else {
3105 return localTimeBuilder_.getMessageList();
3106 }
3107 }
3108
3109
3110
3111 @Override
3112 public int getLocalTimeCount() {
3113 if (localTimeBuilder_ == null) {
3114 return localTime_.size();
3115 } else {
3116 return localTimeBuilder_.getCount();
3117 }
3118 }
3119
3120
3121
3122 @Override
3123 public io.netty.example.worldclock.WorldClockProtocol.LocalTime getLocalTime(int index) {
3124 if (localTimeBuilder_ == null) {
3125 return localTime_.get(index);
3126 } else {
3127 return localTimeBuilder_.getMessage(index);
3128 }
3129 }
3130
3131
3132
3133 public Builder setLocalTime(
3134 int index, io.netty.example.worldclock.WorldClockProtocol.LocalTime value) {
3135 if (localTimeBuilder_ == null) {
3136 checkNotNull(value, "value");
3137 ensureLocalTimeIsMutable();
3138 localTime_.set(index, value);
3139 onChanged();
3140 } else {
3141 localTimeBuilder_.setMessage(index, value);
3142 }
3143 return this;
3144 }
3145
3146
3147
3148 public Builder setLocalTime(
3149 int index, io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder builderForValue) {
3150 if (localTimeBuilder_ == null) {
3151 ensureLocalTimeIsMutable();
3152 localTime_.set(index, builderForValue.build());
3153 onChanged();
3154 } else {
3155 localTimeBuilder_.setMessage(index, builderForValue.build());
3156 }
3157 return this;
3158 }
3159
3160
3161
3162 public Builder addLocalTime(io.netty.example.worldclock.WorldClockProtocol.LocalTime value) {
3163 if (localTimeBuilder_ == null) {
3164 checkNotNull(value, "value");
3165 ensureLocalTimeIsMutable();
3166 localTime_.add(value);
3167 onChanged();
3168 } else {
3169 localTimeBuilder_.addMessage(value);
3170 }
3171 return this;
3172 }
3173
3174
3175
3176 public Builder addLocalTime(
3177 int index, io.netty.example.worldclock.WorldClockProtocol.LocalTime value) {
3178 if (localTimeBuilder_ == null) {
3179 checkNotNull(value, "value");
3180 ensureLocalTimeIsMutable();
3181 localTime_.add(index, value);
3182 onChanged();
3183 } else {
3184 localTimeBuilder_.addMessage(index, value);
3185 }
3186 return this;
3187 }
3188
3189
3190
3191 public Builder addLocalTime(
3192 io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder builderForValue) {
3193 if (localTimeBuilder_ == null) {
3194 ensureLocalTimeIsMutable();
3195 localTime_.add(builderForValue.build());
3196 onChanged();
3197 } else {
3198 localTimeBuilder_.addMessage(builderForValue.build());
3199 }
3200 return this;
3201 }
3202
3203
3204
3205 public Builder addLocalTime(
3206 int index, io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder builderForValue) {
3207 if (localTimeBuilder_ == null) {
3208 ensureLocalTimeIsMutable();
3209 localTime_.add(index, builderForValue.build());
3210 onChanged();
3211 } else {
3212 localTimeBuilder_.addMessage(index, builderForValue.build());
3213 }
3214 return this;
3215 }
3216
3217
3218
3219 public Builder addAllLocalTime(
3220 java.lang.Iterable<? extends io.netty.example.worldclock.WorldClockProtocol.LocalTime> values) {
3221 if (localTimeBuilder_ == null) {
3222 ensureLocalTimeIsMutable();
3223 super.addAll(values, localTime_);
3224 onChanged();
3225 } else {
3226 localTimeBuilder_.addAllMessages(values);
3227 }
3228 return this;
3229 }
3230
3231
3232
3233 public Builder clearLocalTime() {
3234 if (localTimeBuilder_ == null) {
3235 localTime_ = java.util.Collections.emptyList();
3236 bitField0_ = (bitField0_ & ~0x00000001);
3237 onChanged();
3238 } else {
3239 localTimeBuilder_.clear();
3240 }
3241 return this;
3242 }
3243
3244
3245
3246 public Builder removeLocalTime(int index) {
3247 if (localTimeBuilder_ == null) {
3248 ensureLocalTimeIsMutable();
3249 localTime_.remove(index);
3250 onChanged();
3251 } else {
3252 localTimeBuilder_.remove(index);
3253 }
3254 return this;
3255 }
3256
3257
3258
3259 public io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder getLocalTimeBuilder(
3260 int index) {
3261 return getLocalTimeFieldBuilder().getBuilder(index);
3262 }
3263
3264
3265
3266 @Override
3267 public io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder getLocalTimeOrBuilder(
3268 int index) {
3269 if (localTimeBuilder_ == null) {
3270 return localTime_.get(index); } else {
3271 return localTimeBuilder_.getMessageOrBuilder(index);
3272 }
3273 }
3274
3275
3276
3277 @Override
3278 public java.util.List<? extends io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder>
3279 getLocalTimeOrBuilderList() {
3280 if (localTimeBuilder_ != null) {
3281 return localTimeBuilder_.getMessageOrBuilderList();
3282 } else {
3283 return java.util.Collections.unmodifiableList(localTime_);
3284 }
3285 }
3286
3287
3288
3289 public io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder addLocalTimeBuilder() {
3290 return getLocalTimeFieldBuilder().addBuilder(
3291 io.netty.example.worldclock.WorldClockProtocol.LocalTime.getDefaultInstance());
3292 }
3293
3294
3295
3296 public io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder addLocalTimeBuilder(
3297 int index) {
3298 return getLocalTimeFieldBuilder().addBuilder(
3299 index, io.netty.example.worldclock.WorldClockProtocol.LocalTime.getDefaultInstance());
3300 }
3301
3302
3303
3304 public java.util.List<io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder>
3305 getLocalTimeBuilderList() {
3306 return getLocalTimeFieldBuilder().getBuilderList();
3307 }
3308 private com.google.protobuf.RepeatedFieldBuilder<
3309 io.netty.example.worldclock.WorldClockProtocol.LocalTime, io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder, io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder>
3310 getLocalTimeFieldBuilder() {
3311 if (localTimeBuilder_ == null) {
3312 localTimeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
3313 io.netty.example.worldclock.WorldClockProtocol.LocalTime, io.netty.example.worldclock.WorldClockProtocol.LocalTime.Builder, io.netty.example.worldclock.WorldClockProtocol.LocalTimeOrBuilder>(
3314 localTime_,
3315 ((bitField0_ & 0x00000001) == 0x00000001),
3316 getParentForChildren(),
3317 isClean());
3318 localTime_ = null;
3319 }
3320 return localTimeBuilder_;
3321 }
3322
3323
3324 }
3325
3326 static {
3327 defaultInstance = new LocalTimes(true);
3328 defaultInstance.initFields();
3329 }
3330
3331
3332 }
3333
3334 private static com.google.protobuf.Descriptors.Descriptor
3335 internal_static_io_netty_example_worldclock_Location_descriptor;
3336 private static
3337 com.google.protobuf.GeneratedMessage.FieldAccessorTable
3338 internal_static_io_netty_example_worldclock_Location_fieldAccessorTable;
3339 private static com.google.protobuf.Descriptors.Descriptor
3340 internal_static_io_netty_example_worldclock_Locations_descriptor;
3341 private static
3342 com.google.protobuf.GeneratedMessage.FieldAccessorTable
3343 internal_static_io_netty_example_worldclock_Locations_fieldAccessorTable;
3344 private static com.google.protobuf.Descriptors.Descriptor
3345 internal_static_io_netty_example_worldclock_LocalTime_descriptor;
3346 private static
3347 com.google.protobuf.GeneratedMessage.FieldAccessorTable
3348 internal_static_io_netty_example_worldclock_LocalTime_fieldAccessorTable;
3349 private static com.google.protobuf.Descriptors.Descriptor
3350 internal_static_io_netty_example_worldclock_LocalTimes_descriptor;
3351 private static
3352 com.google.protobuf.GeneratedMessage.FieldAccessorTable
3353 internal_static_io_netty_example_worldclock_LocalTimes_fieldAccessorTable;
3354
3355 public static com.google.protobuf.Descriptors.FileDescriptor
3356 getDescriptor() {
3357 return descriptor;
3358 }
3359 private static com.google.protobuf.Descriptors.FileDescriptor
3360 descriptor;
3361 static {
3362 java.lang.String[] descriptorData = {
3363 "\nBsrc/main/java/io/netty/example/worldcl" +
3364 "ock/WorldClockProtocol.proto\022\033io.netty.e" +
3365 "xample.worldclock\"S\n\010Location\0229\n\tcontine" +
3366 "nt\030\001 \002(\0162&.io.netty.example.worldclock.C" +
3367 "ontinent\022\014\n\004city\030\002 \002(\t\"D\n\tLocations\0227\n\010l" +
3368 "ocation\030\001 \003(\0132%.io.netty.example.worldcl" +
3369 "ock.Location\"\245\001\n\tLocalTime\022\014\n\004year\030\001 \002(\r" +
3370 "\022\r\n\005month\030\002 \002(\r\022\022\n\ndayOfMonth\030\004 \002(\r\0229\n\td" +
3371 "ayOfWeek\030\005 \002(\0162&.io.netty.example.worldc" +
3372 "lock.DayOfWeek\022\014\n\004hour\030\006 \002(\r\022\016\n\006minute\030\007",
3373 " \002(\r\022\016\n\006second\030\010 \002(\r\"G\n\nLocalTimes\0229\n\tlo" +
3374 "calTime\030\001 \003(\0132&.io.netty.example.worldcl" +
3375 "ock.LocalTime*\231\001\n\tContinent\022\n\n\006AFRICA\020\000\022" +
3376 "\013\n\007AMERICA\020\001\022\016\n\nANTARCTICA\020\002\022\n\n\006ARCTIC\020\003" +
3377 "\022\010\n\004ASIA\020\004\022\014\n\010ATLANTIC\020\005\022\r\n\tAUSTRALIA\020\006\022" +
3378 "\n\n\006EUROPE\020\007\022\n\n\006INDIAN\020\010\022\013\n\007MIDEAST\020\t\022\013\n\007" +
3379 "PACIFIC\020\n*g\n\tDayOfWeek\022\n\n\006SUNDAY\020\001\022\n\n\006MO" +
3380 "NDAY\020\002\022\013\n\007TUESDAY\020\003\022\r\n\tWEDNESDAY\020\004\022\014\n\010TH" +
3381 "URSDAY\020\005\022\n\n\006FRIDAY\020\006\022\014\n\010SATURDAY\020\007B\002H\001"
3382 };
3383 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
3384 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
3385 @Override
3386 public com.google.protobuf.ExtensionRegistry assignDescriptors(
3387 com.google.protobuf.Descriptors.FileDescriptor root) {
3388 descriptor = root;
3389 internal_static_io_netty_example_worldclock_Location_descriptor =
3390 getDescriptor().getMessageTypes().get(0);
3391 internal_static_io_netty_example_worldclock_Location_fieldAccessorTable = new
3392 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3393 internal_static_io_netty_example_worldclock_Location_descriptor,
3394 new java.lang.String[] { "Continent", "City", });
3395 internal_static_io_netty_example_worldclock_Locations_descriptor =
3396 getDescriptor().getMessageTypes().get(1);
3397 internal_static_io_netty_example_worldclock_Locations_fieldAccessorTable = new
3398 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3399 internal_static_io_netty_example_worldclock_Locations_descriptor,
3400 new java.lang.String[] { "Location", });
3401 internal_static_io_netty_example_worldclock_LocalTime_descriptor =
3402 getDescriptor().getMessageTypes().get(2);
3403 internal_static_io_netty_example_worldclock_LocalTime_fieldAccessorTable = new
3404 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3405 internal_static_io_netty_example_worldclock_LocalTime_descriptor,
3406 new java.lang.String[] { "Year", "Month", "DayOfMonth", "DayOfWeek", "Hour", "Minute", "Second", });
3407 internal_static_io_netty_example_worldclock_LocalTimes_descriptor =
3408 getDescriptor().getMessageTypes().get(3);
3409 internal_static_io_netty_example_worldclock_LocalTimes_fieldAccessorTable = new
3410 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3411 internal_static_io_netty_example_worldclock_LocalTimes_descriptor,
3412 new java.lang.String[] { "LocalTime", });
3413 return null;
3414 }
3415 };
3416 com.google.protobuf.Descriptors.FileDescriptor
3417 .internalBuildGeneratedFileFrom(descriptorData,
3418 new com.google.protobuf.Descriptors.FileDescriptor[] {
3419 }, assigner);
3420 }
3421
3422
3423 }