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