Store diagnostic response payload as a byte array in protobuf.
[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 bytes payload = 7;
1504     /**
1505      * <code>optional bytes payload = 7;</code>
1506      *
1507      * <pre>
1508      * TODO we are capping this at 8 bytes for now - need to change when we
1509      * support multi-frame responses
1510      * </pre>
1511      */
1512     boolean hasPayload();
1513     /**
1514      * <code>optional bytes payload = 7;</code>
1515      *
1516      * <pre>
1517      * TODO we are capping this at 8 bytes for now - need to change when we
1518      * support multi-frame responses
1519      * </pre>
1520      */
1521     com.google.protobuf.ByteString getPayload();
1522   }
1523   /**
1524    * Protobuf type {@code openxc.DiagnosticMessage}
1525    */
1526   public static final class DiagnosticMessage extends
1527       com.google.protobuf.GeneratedMessage
1528       implements DiagnosticMessageOrBuilder {
1529     // Use DiagnosticMessage.newBuilder() to construct.
1530     private DiagnosticMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1531       super(builder);
1532       this.unknownFields = builder.getUnknownFields();
1533     }
1534     private DiagnosticMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1535
1536     private static final DiagnosticMessage defaultInstance;
1537     public static DiagnosticMessage getDefaultInstance() {
1538       return defaultInstance;
1539     }
1540
1541     public DiagnosticMessage getDefaultInstanceForType() {
1542       return defaultInstance;
1543     }
1544
1545     private final com.google.protobuf.UnknownFieldSet unknownFields;
1546     @java.lang.Override
1547     public final com.google.protobuf.UnknownFieldSet
1548         getUnknownFields() {
1549       return this.unknownFields;
1550     }
1551     private DiagnosticMessage(
1552         com.google.protobuf.CodedInputStream input,
1553         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1554         throws com.google.protobuf.InvalidProtocolBufferException {
1555       initFields();
1556       int mutable_bitField0_ = 0;
1557       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1558           com.google.protobuf.UnknownFieldSet.newBuilder();
1559       try {
1560         boolean done = false;
1561         while (!done) {
1562           int tag = input.readTag();
1563           switch (tag) {
1564             case 0:
1565               done = true;
1566               break;
1567             default: {
1568               if (!parseUnknownField(input, unknownFields,
1569                                      extensionRegistry, tag)) {
1570                 done = true;
1571               }
1572               break;
1573             }
1574             case 8: {
1575               bitField0_ |= 0x00000001;
1576               bus_ = input.readInt32();
1577               break;
1578             }
1579             case 16: {
1580               bitField0_ |= 0x00000002;
1581               messageId_ = input.readUInt32();
1582               break;
1583             }
1584             case 24: {
1585               bitField0_ |= 0x00000004;
1586               mode_ = input.readUInt32();
1587               break;
1588             }
1589             case 32: {
1590               bitField0_ |= 0x00000008;
1591               pid_ = input.readUInt32();
1592               break;
1593             }
1594             case 40: {
1595               bitField0_ |= 0x00000010;
1596               success_ = input.readBool();
1597               break;
1598             }
1599             case 48: {
1600               bitField0_ |= 0x00000020;
1601               negativeResponseCode_ = input.readUInt32();
1602               break;
1603             }
1604             case 58: {
1605               bitField0_ |= 0x00000040;
1606               payload_ = input.readBytes();
1607               break;
1608             }
1609           }
1610         }
1611       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1612         throw e.setUnfinishedMessage(this);
1613       } catch (java.io.IOException e) {
1614         throw new com.google.protobuf.InvalidProtocolBufferException(
1615             e.getMessage()).setUnfinishedMessage(this);
1616       } finally {
1617         this.unknownFields = unknownFields.build();
1618         makeExtensionsImmutable();
1619       }
1620     }
1621     public static final com.google.protobuf.Descriptors.Descriptor
1622         getDescriptor() {
1623       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor;
1624     }
1625
1626     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1627         internalGetFieldAccessorTable() {
1628       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_fieldAccessorTable
1629           .ensureFieldAccessorsInitialized(
1630               com.openxc.BinaryMessages.DiagnosticMessage.class, com.openxc.BinaryMessages.DiagnosticMessage.Builder.class);
1631     }
1632
1633     public static com.google.protobuf.Parser<DiagnosticMessage> PARSER =
1634         new com.google.protobuf.AbstractParser<DiagnosticMessage>() {
1635       public DiagnosticMessage parsePartialFrom(
1636           com.google.protobuf.CodedInputStream input,
1637           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1638           throws com.google.protobuf.InvalidProtocolBufferException {
1639         return new DiagnosticMessage(input, extensionRegistry);
1640       }
1641     };
1642
1643     @java.lang.Override
1644     public com.google.protobuf.Parser<DiagnosticMessage> getParserForType() {
1645       return PARSER;
1646     }
1647
1648     private int bitField0_;
1649     // optional int32 bus = 1;
1650     public static final int BUS_FIELD_NUMBER = 1;
1651     private int bus_;
1652     /**
1653      * <code>optional int32 bus = 1;</code>
1654      */
1655     public boolean hasBus() {
1656       return ((bitField0_ & 0x00000001) == 0x00000001);
1657     }
1658     /**
1659      * <code>optional int32 bus = 1;</code>
1660      */
1661     public int getBus() {
1662       return bus_;
1663     }
1664
1665     // optional uint32 message_id = 2;
1666     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
1667     private int messageId_;
1668     /**
1669      * <code>optional uint32 message_id = 2;</code>
1670      */
1671     public boolean hasMessageId() {
1672       return ((bitField0_ & 0x00000002) == 0x00000002);
1673     }
1674     /**
1675      * <code>optional uint32 message_id = 2;</code>
1676      */
1677     public int getMessageId() {
1678       return messageId_;
1679     }
1680
1681     // optional uint32 mode = 3;
1682     public static final int MODE_FIELD_NUMBER = 3;
1683     private int mode_;
1684     /**
1685      * <code>optional uint32 mode = 3;</code>
1686      */
1687     public boolean hasMode() {
1688       return ((bitField0_ & 0x00000004) == 0x00000004);
1689     }
1690     /**
1691      * <code>optional uint32 mode = 3;</code>
1692      */
1693     public int getMode() {
1694       return mode_;
1695     }
1696
1697     // optional uint32 pid = 4;
1698     public static final int PID_FIELD_NUMBER = 4;
1699     private int pid_;
1700     /**
1701      * <code>optional uint32 pid = 4;</code>
1702      */
1703     public boolean hasPid() {
1704       return ((bitField0_ & 0x00000008) == 0x00000008);
1705     }
1706     /**
1707      * <code>optional uint32 pid = 4;</code>
1708      */
1709     public int getPid() {
1710       return pid_;
1711     }
1712
1713     // optional bool success = 5;
1714     public static final int SUCCESS_FIELD_NUMBER = 5;
1715     private boolean success_;
1716     /**
1717      * <code>optional bool success = 5;</code>
1718      */
1719     public boolean hasSuccess() {
1720       return ((bitField0_ & 0x00000010) == 0x00000010);
1721     }
1722     /**
1723      * <code>optional bool success = 5;</code>
1724      */
1725     public boolean getSuccess() {
1726       return success_;
1727     }
1728
1729     // optional uint32 negative_response_code = 6;
1730     public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6;
1731     private int negativeResponseCode_;
1732     /**
1733      * <code>optional uint32 negative_response_code = 6;</code>
1734      */
1735     public boolean hasNegativeResponseCode() {
1736       return ((bitField0_ & 0x00000020) == 0x00000020);
1737     }
1738     /**
1739      * <code>optional uint32 negative_response_code = 6;</code>
1740      */
1741     public int getNegativeResponseCode() {
1742       return negativeResponseCode_;
1743     }
1744
1745     // optional bytes payload = 7;
1746     public static final int PAYLOAD_FIELD_NUMBER = 7;
1747     private com.google.protobuf.ByteString payload_;
1748     /**
1749      * <code>optional bytes payload = 7;</code>
1750      *
1751      * <pre>
1752      * TODO we are capping this at 8 bytes for now - need to change when we
1753      * support multi-frame responses
1754      * </pre>
1755      */
1756     public boolean hasPayload() {
1757       return ((bitField0_ & 0x00000040) == 0x00000040);
1758     }
1759     /**
1760      * <code>optional bytes payload = 7;</code>
1761      *
1762      * <pre>
1763      * TODO we are capping this at 8 bytes for now - need to change when we
1764      * support multi-frame responses
1765      * </pre>
1766      */
1767     public com.google.protobuf.ByteString getPayload() {
1768       return payload_;
1769     }
1770
1771     private void initFields() {
1772       bus_ = 0;
1773       messageId_ = 0;
1774       mode_ = 0;
1775       pid_ = 0;
1776       success_ = false;
1777       negativeResponseCode_ = 0;
1778       payload_ = com.google.protobuf.ByteString.EMPTY;
1779     }
1780     private byte memoizedIsInitialized = -1;
1781     public final boolean isInitialized() {
1782       byte isInitialized = memoizedIsInitialized;
1783       if (isInitialized != -1) return isInitialized == 1;
1784
1785       memoizedIsInitialized = 1;
1786       return true;
1787     }
1788
1789     public void writeTo(com.google.protobuf.CodedOutputStream output)
1790                         throws java.io.IOException {
1791       getSerializedSize();
1792       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1793         output.writeInt32(1, bus_);
1794       }
1795       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1796         output.writeUInt32(2, messageId_);
1797       }
1798       if (((bitField0_ & 0x00000004) == 0x00000004)) {
1799         output.writeUInt32(3, mode_);
1800       }
1801       if (((bitField0_ & 0x00000008) == 0x00000008)) {
1802         output.writeUInt32(4, pid_);
1803       }
1804       if (((bitField0_ & 0x00000010) == 0x00000010)) {
1805         output.writeBool(5, success_);
1806       }
1807       if (((bitField0_ & 0x00000020) == 0x00000020)) {
1808         output.writeUInt32(6, negativeResponseCode_);
1809       }
1810       if (((bitField0_ & 0x00000040) == 0x00000040)) {
1811         output.writeBytes(7, payload_);
1812       }
1813       getUnknownFields().writeTo(output);
1814     }
1815
1816     private int memoizedSerializedSize = -1;
1817     public int getSerializedSize() {
1818       int size = memoizedSerializedSize;
1819       if (size != -1) return size;
1820
1821       size = 0;
1822       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1823         size += com.google.protobuf.CodedOutputStream
1824           .computeInt32Size(1, bus_);
1825       }
1826       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1827         size += com.google.protobuf.CodedOutputStream
1828           .computeUInt32Size(2, messageId_);
1829       }
1830       if (((bitField0_ & 0x00000004) == 0x00000004)) {
1831         size += com.google.protobuf.CodedOutputStream
1832           .computeUInt32Size(3, mode_);
1833       }
1834       if (((bitField0_ & 0x00000008) == 0x00000008)) {
1835         size += com.google.protobuf.CodedOutputStream
1836           .computeUInt32Size(4, pid_);
1837       }
1838       if (((bitField0_ & 0x00000010) == 0x00000010)) {
1839         size += com.google.protobuf.CodedOutputStream
1840           .computeBoolSize(5, success_);
1841       }
1842       if (((bitField0_ & 0x00000020) == 0x00000020)) {
1843         size += com.google.protobuf.CodedOutputStream
1844           .computeUInt32Size(6, negativeResponseCode_);
1845       }
1846       if (((bitField0_ & 0x00000040) == 0x00000040)) {
1847         size += com.google.protobuf.CodedOutputStream
1848           .computeBytesSize(7, payload_);
1849       }
1850       size += getUnknownFields().getSerializedSize();
1851       memoizedSerializedSize = size;
1852       return size;
1853     }
1854
1855     private static final long serialVersionUID = 0L;
1856     @java.lang.Override
1857     protected java.lang.Object writeReplace()
1858         throws java.io.ObjectStreamException {
1859       return super.writeReplace();
1860     }
1861
1862     public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1863         com.google.protobuf.ByteString data)
1864         throws com.google.protobuf.InvalidProtocolBufferException {
1865       return PARSER.parseFrom(data);
1866     }
1867     public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1868         com.google.protobuf.ByteString data,
1869         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1870         throws com.google.protobuf.InvalidProtocolBufferException {
1871       return PARSER.parseFrom(data, extensionRegistry);
1872     }
1873     public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(byte[] data)
1874         throws com.google.protobuf.InvalidProtocolBufferException {
1875       return PARSER.parseFrom(data);
1876     }
1877     public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1878         byte[] data,
1879         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1880         throws com.google.protobuf.InvalidProtocolBufferException {
1881       return PARSER.parseFrom(data, extensionRegistry);
1882     }
1883     public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(java.io.InputStream input)
1884         throws java.io.IOException {
1885       return PARSER.parseFrom(input);
1886     }
1887     public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1888         java.io.InputStream input,
1889         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1890         throws java.io.IOException {
1891       return PARSER.parseFrom(input, extensionRegistry);
1892     }
1893     public static com.openxc.BinaryMessages.DiagnosticMessage parseDelimitedFrom(java.io.InputStream input)
1894         throws java.io.IOException {
1895       return PARSER.parseDelimitedFrom(input);
1896     }
1897     public static com.openxc.BinaryMessages.DiagnosticMessage parseDelimitedFrom(
1898         java.io.InputStream input,
1899         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1900         throws java.io.IOException {
1901       return PARSER.parseDelimitedFrom(input, extensionRegistry);
1902     }
1903     public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1904         com.google.protobuf.CodedInputStream input)
1905         throws java.io.IOException {
1906       return PARSER.parseFrom(input);
1907     }
1908     public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1909         com.google.protobuf.CodedInputStream input,
1910         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1911         throws java.io.IOException {
1912       return PARSER.parseFrom(input, extensionRegistry);
1913     }
1914
1915     public static Builder newBuilder() { return Builder.create(); }
1916     public Builder newBuilderForType() { return newBuilder(); }
1917     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticMessage prototype) {
1918       return newBuilder().mergeFrom(prototype);
1919     }
1920     public Builder toBuilder() { return newBuilder(this); }
1921
1922     @java.lang.Override
1923     protected Builder newBuilderForType(
1924         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1925       Builder builder = new Builder(parent);
1926       return builder;
1927     }
1928     /**
1929      * Protobuf type {@code openxc.DiagnosticMessage}
1930      */
1931     public static final class Builder extends
1932         com.google.protobuf.GeneratedMessage.Builder<Builder>
1933        implements com.openxc.BinaryMessages.DiagnosticMessageOrBuilder {
1934       public static final com.google.protobuf.Descriptors.Descriptor
1935           getDescriptor() {
1936         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor;
1937       }
1938
1939       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1940           internalGetFieldAccessorTable() {
1941         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_fieldAccessorTable
1942             .ensureFieldAccessorsInitialized(
1943                 com.openxc.BinaryMessages.DiagnosticMessage.class, com.openxc.BinaryMessages.DiagnosticMessage.Builder.class);
1944       }
1945
1946       // Construct using com.openxc.BinaryMessages.DiagnosticMessage.newBuilder()
1947       private Builder() {
1948         maybeForceBuilderInitialization();
1949       }
1950
1951       private Builder(
1952           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1953         super(parent);
1954         maybeForceBuilderInitialization();
1955       }
1956       private void maybeForceBuilderInitialization() {
1957         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1958         }
1959       }
1960       private static Builder create() {
1961         return new Builder();
1962       }
1963
1964       public Builder clear() {
1965         super.clear();
1966         bus_ = 0;
1967         bitField0_ = (bitField0_ & ~0x00000001);
1968         messageId_ = 0;
1969         bitField0_ = (bitField0_ & ~0x00000002);
1970         mode_ = 0;
1971         bitField0_ = (bitField0_ & ~0x00000004);
1972         pid_ = 0;
1973         bitField0_ = (bitField0_ & ~0x00000008);
1974         success_ = false;
1975         bitField0_ = (bitField0_ & ~0x00000010);
1976         negativeResponseCode_ = 0;
1977         bitField0_ = (bitField0_ & ~0x00000020);
1978         payload_ = com.google.protobuf.ByteString.EMPTY;
1979         bitField0_ = (bitField0_ & ~0x00000040);
1980         return this;
1981       }
1982
1983       public Builder clone() {
1984         return create().mergeFrom(buildPartial());
1985       }
1986
1987       public com.google.protobuf.Descriptors.Descriptor
1988           getDescriptorForType() {
1989         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor;
1990       }
1991
1992       public com.openxc.BinaryMessages.DiagnosticMessage getDefaultInstanceForType() {
1993         return com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance();
1994       }
1995
1996       public com.openxc.BinaryMessages.DiagnosticMessage build() {
1997         com.openxc.BinaryMessages.DiagnosticMessage result = buildPartial();
1998         if (!result.isInitialized()) {
1999           throw newUninitializedMessageException(result);
2000         }
2001         return result;
2002       }
2003
2004       public com.openxc.BinaryMessages.DiagnosticMessage buildPartial() {
2005         com.openxc.BinaryMessages.DiagnosticMessage result = new com.openxc.BinaryMessages.DiagnosticMessage(this);
2006         int from_bitField0_ = bitField0_;
2007         int to_bitField0_ = 0;
2008         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2009           to_bitField0_ |= 0x00000001;
2010         }
2011         result.bus_ = bus_;
2012         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2013           to_bitField0_ |= 0x00000002;
2014         }
2015         result.messageId_ = messageId_;
2016         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
2017           to_bitField0_ |= 0x00000004;
2018         }
2019         result.mode_ = mode_;
2020         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
2021           to_bitField0_ |= 0x00000008;
2022         }
2023         result.pid_ = pid_;
2024         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
2025           to_bitField0_ |= 0x00000010;
2026         }
2027         result.success_ = success_;
2028         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
2029           to_bitField0_ |= 0x00000020;
2030         }
2031         result.negativeResponseCode_ = negativeResponseCode_;
2032         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
2033           to_bitField0_ |= 0x00000040;
2034         }
2035         result.payload_ = payload_;
2036         result.bitField0_ = to_bitField0_;
2037         onBuilt();
2038         return result;
2039       }
2040
2041       public Builder mergeFrom(com.google.protobuf.Message other) {
2042         if (other instanceof com.openxc.BinaryMessages.DiagnosticMessage) {
2043           return mergeFrom((com.openxc.BinaryMessages.DiagnosticMessage)other);
2044         } else {
2045           super.mergeFrom(other);
2046           return this;
2047         }
2048       }
2049
2050       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticMessage other) {
2051         if (other == com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance()) return this;
2052         if (other.hasBus()) {
2053           setBus(other.getBus());
2054         }
2055         if (other.hasMessageId()) {
2056           setMessageId(other.getMessageId());
2057         }
2058         if (other.hasMode()) {
2059           setMode(other.getMode());
2060         }
2061         if (other.hasPid()) {
2062           setPid(other.getPid());
2063         }
2064         if (other.hasSuccess()) {
2065           setSuccess(other.getSuccess());
2066         }
2067         if (other.hasNegativeResponseCode()) {
2068           setNegativeResponseCode(other.getNegativeResponseCode());
2069         }
2070         if (other.hasPayload()) {
2071           setPayload(other.getPayload());
2072         }
2073         this.mergeUnknownFields(other.getUnknownFields());
2074         return this;
2075       }
2076
2077       public final boolean isInitialized() {
2078         return true;
2079       }
2080
2081       public Builder mergeFrom(
2082           com.google.protobuf.CodedInputStream input,
2083           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2084           throws java.io.IOException {
2085         com.openxc.BinaryMessages.DiagnosticMessage parsedMessage = null;
2086         try {
2087           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2088         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2089           parsedMessage = (com.openxc.BinaryMessages.DiagnosticMessage) e.getUnfinishedMessage();
2090           throw e;
2091         } finally {
2092           if (parsedMessage != null) {
2093             mergeFrom(parsedMessage);
2094           }
2095         }
2096         return this;
2097       }
2098       private int bitField0_;
2099
2100       // optional int32 bus = 1;
2101       private int bus_ ;
2102       /**
2103        * <code>optional int32 bus = 1;</code>
2104        */
2105       public boolean hasBus() {
2106         return ((bitField0_ & 0x00000001) == 0x00000001);
2107       }
2108       /**
2109        * <code>optional int32 bus = 1;</code>
2110        */
2111       public int getBus() {
2112         return bus_;
2113       }
2114       /**
2115        * <code>optional int32 bus = 1;</code>
2116        */
2117       public Builder setBus(int value) {
2118         bitField0_ |= 0x00000001;
2119         bus_ = value;
2120         onChanged();
2121         return this;
2122       }
2123       /**
2124        * <code>optional int32 bus = 1;</code>
2125        */
2126       public Builder clearBus() {
2127         bitField0_ = (bitField0_ & ~0x00000001);
2128         bus_ = 0;
2129         onChanged();
2130         return this;
2131       }
2132
2133       // optional uint32 message_id = 2;
2134       private int messageId_ ;
2135       /**
2136        * <code>optional uint32 message_id = 2;</code>
2137        */
2138       public boolean hasMessageId() {
2139         return ((bitField0_ & 0x00000002) == 0x00000002);
2140       }
2141       /**
2142        * <code>optional uint32 message_id = 2;</code>
2143        */
2144       public int getMessageId() {
2145         return messageId_;
2146       }
2147       /**
2148        * <code>optional uint32 message_id = 2;</code>
2149        */
2150       public Builder setMessageId(int value) {
2151         bitField0_ |= 0x00000002;
2152         messageId_ = value;
2153         onChanged();
2154         return this;
2155       }
2156       /**
2157        * <code>optional uint32 message_id = 2;</code>
2158        */
2159       public Builder clearMessageId() {
2160         bitField0_ = (bitField0_ & ~0x00000002);
2161         messageId_ = 0;
2162         onChanged();
2163         return this;
2164       }
2165
2166       // optional uint32 mode = 3;
2167       private int mode_ ;
2168       /**
2169        * <code>optional uint32 mode = 3;</code>
2170        */
2171       public boolean hasMode() {
2172         return ((bitField0_ & 0x00000004) == 0x00000004);
2173       }
2174       /**
2175        * <code>optional uint32 mode = 3;</code>
2176        */
2177       public int getMode() {
2178         return mode_;
2179       }
2180       /**
2181        * <code>optional uint32 mode = 3;</code>
2182        */
2183       public Builder setMode(int value) {
2184         bitField0_ |= 0x00000004;
2185         mode_ = value;
2186         onChanged();
2187         return this;
2188       }
2189       /**
2190        * <code>optional uint32 mode = 3;</code>
2191        */
2192       public Builder clearMode() {
2193         bitField0_ = (bitField0_ & ~0x00000004);
2194         mode_ = 0;
2195         onChanged();
2196         return this;
2197       }
2198
2199       // optional uint32 pid = 4;
2200       private int pid_ ;
2201       /**
2202        * <code>optional uint32 pid = 4;</code>
2203        */
2204       public boolean hasPid() {
2205         return ((bitField0_ & 0x00000008) == 0x00000008);
2206       }
2207       /**
2208        * <code>optional uint32 pid = 4;</code>
2209        */
2210       public int getPid() {
2211         return pid_;
2212       }
2213       /**
2214        * <code>optional uint32 pid = 4;</code>
2215        */
2216       public Builder setPid(int value) {
2217         bitField0_ |= 0x00000008;
2218         pid_ = value;
2219         onChanged();
2220         return this;
2221       }
2222       /**
2223        * <code>optional uint32 pid = 4;</code>
2224        */
2225       public Builder clearPid() {
2226         bitField0_ = (bitField0_ & ~0x00000008);
2227         pid_ = 0;
2228         onChanged();
2229         return this;
2230       }
2231
2232       // optional bool success = 5;
2233       private boolean success_ ;
2234       /**
2235        * <code>optional bool success = 5;</code>
2236        */
2237       public boolean hasSuccess() {
2238         return ((bitField0_ & 0x00000010) == 0x00000010);
2239       }
2240       /**
2241        * <code>optional bool success = 5;</code>
2242        */
2243       public boolean getSuccess() {
2244         return success_;
2245       }
2246       /**
2247        * <code>optional bool success = 5;</code>
2248        */
2249       public Builder setSuccess(boolean value) {
2250         bitField0_ |= 0x00000010;
2251         success_ = value;
2252         onChanged();
2253         return this;
2254       }
2255       /**
2256        * <code>optional bool success = 5;</code>
2257        */
2258       public Builder clearSuccess() {
2259         bitField0_ = (bitField0_ & ~0x00000010);
2260         success_ = false;
2261         onChanged();
2262         return this;
2263       }
2264
2265       // optional uint32 negative_response_code = 6;
2266       private int negativeResponseCode_ ;
2267       /**
2268        * <code>optional uint32 negative_response_code = 6;</code>
2269        */
2270       public boolean hasNegativeResponseCode() {
2271         return ((bitField0_ & 0x00000020) == 0x00000020);
2272       }
2273       /**
2274        * <code>optional uint32 negative_response_code = 6;</code>
2275        */
2276       public int getNegativeResponseCode() {
2277         return negativeResponseCode_;
2278       }
2279       /**
2280        * <code>optional uint32 negative_response_code = 6;</code>
2281        */
2282       public Builder setNegativeResponseCode(int value) {
2283         bitField0_ |= 0x00000020;
2284         negativeResponseCode_ = value;
2285         onChanged();
2286         return this;
2287       }
2288       /**
2289        * <code>optional uint32 negative_response_code = 6;</code>
2290        */
2291       public Builder clearNegativeResponseCode() {
2292         bitField0_ = (bitField0_ & ~0x00000020);
2293         negativeResponseCode_ = 0;
2294         onChanged();
2295         return this;
2296       }
2297
2298       // optional bytes payload = 7;
2299       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
2300       /**
2301        * <code>optional bytes payload = 7;</code>
2302        *
2303        * <pre>
2304        * TODO we are capping this at 8 bytes for now - need to change when we
2305        * support multi-frame responses
2306        * </pre>
2307        */
2308       public boolean hasPayload() {
2309         return ((bitField0_ & 0x00000040) == 0x00000040);
2310       }
2311       /**
2312        * <code>optional bytes payload = 7;</code>
2313        *
2314        * <pre>
2315        * TODO we are capping this at 8 bytes for now - need to change when we
2316        * support multi-frame responses
2317        * </pre>
2318        */
2319       public com.google.protobuf.ByteString getPayload() {
2320         return payload_;
2321       }
2322       /**
2323        * <code>optional bytes payload = 7;</code>
2324        *
2325        * <pre>
2326        * TODO we are capping this at 8 bytes for now - need to change when we
2327        * support multi-frame responses
2328        * </pre>
2329        */
2330       public Builder setPayload(com.google.protobuf.ByteString value) {
2331         if (value == null) {
2332     throw new NullPointerException();
2333   }
2334   bitField0_ |= 0x00000040;
2335         payload_ = value;
2336         onChanged();
2337         return this;
2338       }
2339       /**
2340        * <code>optional bytes payload = 7;</code>
2341        *
2342        * <pre>
2343        * TODO we are capping this at 8 bytes for now - need to change when we
2344        * support multi-frame responses
2345        * </pre>
2346        */
2347       public Builder clearPayload() {
2348         bitField0_ = (bitField0_ & ~0x00000040);
2349         payload_ = getDefaultInstance().getPayload();
2350         onChanged();
2351         return this;
2352       }
2353
2354       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticMessage)
2355     }
2356
2357     static {
2358       defaultInstance = new DiagnosticMessage(true);
2359       defaultInstance.initFields();
2360     }
2361
2362     // @@protoc_insertion_point(class_scope:openxc.DiagnosticMessage)
2363   }
2364
2365   public interface TranslatedMessageOrBuilder
2366       extends com.google.protobuf.MessageOrBuilder {
2367
2368     // optional .openxc.TranslatedMessage.Type type = 1;
2369     /**
2370      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
2371      */
2372     boolean hasType();
2373     /**
2374      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
2375      */
2376     com.openxc.BinaryMessages.TranslatedMessage.Type getType();
2377
2378     // optional string name = 2;
2379     /**
2380      * <code>optional string name = 2;</code>
2381      */
2382     boolean hasName();
2383     /**
2384      * <code>optional string name = 2;</code>
2385      */
2386     java.lang.String getName();
2387     /**
2388      * <code>optional string name = 2;</code>
2389      */
2390     com.google.protobuf.ByteString
2391         getNameBytes();
2392
2393     // optional string string_value = 3;
2394     /**
2395      * <code>optional string string_value = 3;</code>
2396      */
2397     boolean hasStringValue();
2398     /**
2399      * <code>optional string string_value = 3;</code>
2400      */
2401     java.lang.String getStringValue();
2402     /**
2403      * <code>optional string string_value = 3;</code>
2404      */
2405     com.google.protobuf.ByteString
2406         getStringValueBytes();
2407
2408     // optional double numeric_value = 4;
2409     /**
2410      * <code>optional double numeric_value = 4;</code>
2411      */
2412     boolean hasNumericValue();
2413     /**
2414      * <code>optional double numeric_value = 4;</code>
2415      */
2416     double getNumericValue();
2417
2418     // optional bool boolean_value = 5;
2419     /**
2420      * <code>optional bool boolean_value = 5;</code>
2421      */
2422     boolean hasBooleanValue();
2423     /**
2424      * <code>optional bool boolean_value = 5;</code>
2425      */
2426     boolean getBooleanValue();
2427
2428     // optional string string_event = 6;
2429     /**
2430      * <code>optional string string_event = 6;</code>
2431      */
2432     boolean hasStringEvent();
2433     /**
2434      * <code>optional string string_event = 6;</code>
2435      */
2436     java.lang.String getStringEvent();
2437     /**
2438      * <code>optional string string_event = 6;</code>
2439      */
2440     com.google.protobuf.ByteString
2441         getStringEventBytes();
2442
2443     // optional double numeric_event = 7;
2444     /**
2445      * <code>optional double numeric_event = 7;</code>
2446      */
2447     boolean hasNumericEvent();
2448     /**
2449      * <code>optional double numeric_event = 7;</code>
2450      */
2451     double getNumericEvent();
2452
2453     // optional bool boolean_event = 8;
2454     /**
2455      * <code>optional bool boolean_event = 8;</code>
2456      */
2457     boolean hasBooleanEvent();
2458     /**
2459      * <code>optional bool boolean_event = 8;</code>
2460      */
2461     boolean getBooleanEvent();
2462   }
2463   /**
2464    * Protobuf type {@code openxc.TranslatedMessage}
2465    */
2466   public static final class TranslatedMessage extends
2467       com.google.protobuf.GeneratedMessage
2468       implements TranslatedMessageOrBuilder {
2469     // Use TranslatedMessage.newBuilder() to construct.
2470     private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2471       super(builder);
2472       this.unknownFields = builder.getUnknownFields();
2473     }
2474     private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2475
2476     private static final TranslatedMessage defaultInstance;
2477     public static TranslatedMessage getDefaultInstance() {
2478       return defaultInstance;
2479     }
2480
2481     public TranslatedMessage getDefaultInstanceForType() {
2482       return defaultInstance;
2483     }
2484
2485     private final com.google.protobuf.UnknownFieldSet unknownFields;
2486     @java.lang.Override
2487     public final com.google.protobuf.UnknownFieldSet
2488         getUnknownFields() {
2489       return this.unknownFields;
2490     }
2491     private TranslatedMessage(
2492         com.google.protobuf.CodedInputStream input,
2493         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2494         throws com.google.protobuf.InvalidProtocolBufferException {
2495       initFields();
2496       int mutable_bitField0_ = 0;
2497       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2498           com.google.protobuf.UnknownFieldSet.newBuilder();
2499       try {
2500         boolean done = false;
2501         while (!done) {
2502           int tag = input.readTag();
2503           switch (tag) {
2504             case 0:
2505               done = true;
2506               break;
2507             default: {
2508               if (!parseUnknownField(input, unknownFields,
2509                                      extensionRegistry, tag)) {
2510                 done = true;
2511               }
2512               break;
2513             }
2514             case 8: {
2515               int rawValue = input.readEnum();
2516               com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue);
2517               if (value == null) {
2518                 unknownFields.mergeVarintField(1, rawValue);
2519               } else {
2520                 bitField0_ |= 0x00000001;
2521                 type_ = value;
2522               }
2523               break;
2524             }
2525             case 18: {
2526               bitField0_ |= 0x00000002;
2527               name_ = input.readBytes();
2528               break;
2529             }
2530             case 26: {
2531               bitField0_ |= 0x00000004;
2532               stringValue_ = input.readBytes();
2533               break;
2534             }
2535             case 33: {
2536               bitField0_ |= 0x00000008;
2537               numericValue_ = input.readDouble();
2538               break;
2539             }
2540             case 40: {
2541               bitField0_ |= 0x00000010;
2542               booleanValue_ = input.readBool();
2543               break;
2544             }
2545             case 50: {
2546               bitField0_ |= 0x00000020;
2547               stringEvent_ = input.readBytes();
2548               break;
2549             }
2550             case 57: {
2551               bitField0_ |= 0x00000040;
2552               numericEvent_ = input.readDouble();
2553               break;
2554             }
2555             case 64: {
2556               bitField0_ |= 0x00000080;
2557               booleanEvent_ = input.readBool();
2558               break;
2559             }
2560           }
2561         }
2562       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2563         throw e.setUnfinishedMessage(this);
2564       } catch (java.io.IOException e) {
2565         throw new com.google.protobuf.InvalidProtocolBufferException(
2566             e.getMessage()).setUnfinishedMessage(this);
2567       } finally {
2568         this.unknownFields = unknownFields.build();
2569         makeExtensionsImmutable();
2570       }
2571     }
2572     public static final com.google.protobuf.Descriptors.Descriptor
2573         getDescriptor() {
2574       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
2575     }
2576
2577     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2578         internalGetFieldAccessorTable() {
2579       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
2580           .ensureFieldAccessorsInitialized(
2581               com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
2582     }
2583
2584     public static com.google.protobuf.Parser<TranslatedMessage> PARSER =
2585         new com.google.protobuf.AbstractParser<TranslatedMessage>() {
2586       public TranslatedMessage parsePartialFrom(
2587           com.google.protobuf.CodedInputStream input,
2588           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2589           throws com.google.protobuf.InvalidProtocolBufferException {
2590         return new TranslatedMessage(input, extensionRegistry);
2591       }
2592     };
2593
2594     @java.lang.Override
2595     public com.google.protobuf.Parser<TranslatedMessage> getParserForType() {
2596       return PARSER;
2597     }
2598
2599     /**
2600      * Protobuf enum {@code openxc.TranslatedMessage.Type}
2601      */
2602     public enum Type
2603         implements com.google.protobuf.ProtocolMessageEnum {
2604       /**
2605        * <code>STRING = 1;</code>
2606        */
2607       STRING(0, 1),
2608       /**
2609        * <code>NUM = 2;</code>
2610        */
2611       NUM(1, 2),
2612       /**
2613        * <code>BOOL = 3;</code>
2614        */
2615       BOOL(2, 3),
2616       /**
2617        * <code>EVENTED_STRING = 4;</code>
2618        */
2619       EVENTED_STRING(3, 4),
2620       /**
2621        * <code>EVENTED_NUM = 5;</code>
2622        */
2623       EVENTED_NUM(4, 5),
2624       /**
2625        * <code>EVENTED_BOOL = 6;</code>
2626        */
2627       EVENTED_BOOL(5, 6),
2628       ;
2629
2630       /**
2631        * <code>STRING = 1;</code>
2632        */
2633       public static final int STRING_VALUE = 1;
2634       /**
2635        * <code>NUM = 2;</code>
2636        */
2637       public static final int NUM_VALUE = 2;
2638       /**
2639        * <code>BOOL = 3;</code>
2640        */
2641       public static final int BOOL_VALUE = 3;
2642       /**
2643        * <code>EVENTED_STRING = 4;</code>
2644        */
2645       public static final int EVENTED_STRING_VALUE = 4;
2646       /**
2647        * <code>EVENTED_NUM = 5;</code>
2648        */
2649       public static final int EVENTED_NUM_VALUE = 5;
2650       /**
2651        * <code>EVENTED_BOOL = 6;</code>
2652        */
2653       public static final int EVENTED_BOOL_VALUE = 6;
2654
2655
2656       public final int getNumber() { return value; }
2657
2658       public static Type valueOf(int value) {
2659         switch (value) {
2660           case 1: return STRING;
2661           case 2: return NUM;
2662           case 3: return BOOL;
2663           case 4: return EVENTED_STRING;
2664           case 5: return EVENTED_NUM;
2665           case 6: return EVENTED_BOOL;
2666           default: return null;
2667         }
2668       }
2669
2670       public static com.google.protobuf.Internal.EnumLiteMap<Type>
2671           internalGetValueMap() {
2672         return internalValueMap;
2673       }
2674       private static com.google.protobuf.Internal.EnumLiteMap<Type>
2675           internalValueMap =
2676             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
2677               public Type findValueByNumber(int number) {
2678                 return Type.valueOf(number);
2679               }
2680             };
2681
2682       public final com.google.protobuf.Descriptors.EnumValueDescriptor
2683           getValueDescriptor() {
2684         return getDescriptor().getValues().get(index);
2685       }
2686       public final com.google.protobuf.Descriptors.EnumDescriptor
2687           getDescriptorForType() {
2688         return getDescriptor();
2689       }
2690       public static final com.google.protobuf.Descriptors.EnumDescriptor
2691           getDescriptor() {
2692         return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0);
2693       }
2694
2695       private static final Type[] VALUES = values();
2696
2697       public static Type valueOf(
2698           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
2699         if (desc.getType() != getDescriptor()) {
2700           throw new java.lang.IllegalArgumentException(
2701             "EnumValueDescriptor is not for this type.");
2702         }
2703         return VALUES[desc.getIndex()];
2704       }
2705
2706       private final int index;
2707       private final int value;
2708
2709       private Type(int index, int value) {
2710         this.index = index;
2711         this.value = value;
2712       }
2713
2714       // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type)
2715     }
2716
2717     private int bitField0_;
2718     // optional .openxc.TranslatedMessage.Type type = 1;
2719     public static final int TYPE_FIELD_NUMBER = 1;
2720     private com.openxc.BinaryMessages.TranslatedMessage.Type type_;
2721     /**
2722      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
2723      */
2724     public boolean hasType() {
2725       return ((bitField0_ & 0x00000001) == 0x00000001);
2726     }
2727     /**
2728      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
2729      */
2730     public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
2731       return type_;
2732     }
2733
2734     // optional string name = 2;
2735     public static final int NAME_FIELD_NUMBER = 2;
2736     private java.lang.Object name_;
2737     /**
2738      * <code>optional string name = 2;</code>
2739      */
2740     public boolean hasName() {
2741       return ((bitField0_ & 0x00000002) == 0x00000002);
2742     }
2743     /**
2744      * <code>optional string name = 2;</code>
2745      */
2746     public java.lang.String getName() {
2747       java.lang.Object ref = name_;
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           name_ = s;
2756         }
2757         return s;
2758       }
2759     }
2760     /**
2761      * <code>optional string name = 2;</code>
2762      */
2763     public com.google.protobuf.ByteString
2764         getNameBytes() {
2765       java.lang.Object ref = name_;
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         name_ = b;
2771         return b;
2772       } else {
2773         return (com.google.protobuf.ByteString) ref;
2774       }
2775     }
2776
2777     // optional string string_value = 3;
2778     public static final int STRING_VALUE_FIELD_NUMBER = 3;
2779     private java.lang.Object stringValue_;
2780     /**
2781      * <code>optional string string_value = 3;</code>
2782      */
2783     public boolean hasStringValue() {
2784       return ((bitField0_ & 0x00000004) == 0x00000004);
2785     }
2786     /**
2787      * <code>optional string string_value = 3;</code>
2788      */
2789     public java.lang.String getStringValue() {
2790       java.lang.Object ref = stringValue_;
2791       if (ref instanceof java.lang.String) {
2792         return (java.lang.String) ref;
2793       } else {
2794         com.google.protobuf.ByteString bs = 
2795             (com.google.protobuf.ByteString) ref;
2796         java.lang.String s = bs.toStringUtf8();
2797         if (bs.isValidUtf8()) {
2798           stringValue_ = s;
2799         }
2800         return s;
2801       }
2802     }
2803     /**
2804      * <code>optional string string_value = 3;</code>
2805      */
2806     public com.google.protobuf.ByteString
2807         getStringValueBytes() {
2808       java.lang.Object ref = stringValue_;
2809       if (ref instanceof java.lang.String) {
2810         com.google.protobuf.ByteString b = 
2811             com.google.protobuf.ByteString.copyFromUtf8(
2812                 (java.lang.String) ref);
2813         stringValue_ = b;
2814         return b;
2815       } else {
2816         return (com.google.protobuf.ByteString) ref;
2817       }
2818     }
2819
2820     // optional double numeric_value = 4;
2821     public static final int NUMERIC_VALUE_FIELD_NUMBER = 4;
2822     private double numericValue_;
2823     /**
2824      * <code>optional double numeric_value = 4;</code>
2825      */
2826     public boolean hasNumericValue() {
2827       return ((bitField0_ & 0x00000008) == 0x00000008);
2828     }
2829     /**
2830      * <code>optional double numeric_value = 4;</code>
2831      */
2832     public double getNumericValue() {
2833       return numericValue_;
2834     }
2835
2836     // optional bool boolean_value = 5;
2837     public static final int BOOLEAN_VALUE_FIELD_NUMBER = 5;
2838     private boolean booleanValue_;
2839     /**
2840      * <code>optional bool boolean_value = 5;</code>
2841      */
2842     public boolean hasBooleanValue() {
2843       return ((bitField0_ & 0x00000010) == 0x00000010);
2844     }
2845     /**
2846      * <code>optional bool boolean_value = 5;</code>
2847      */
2848     public boolean getBooleanValue() {
2849       return booleanValue_;
2850     }
2851
2852     // optional string string_event = 6;
2853     public static final int STRING_EVENT_FIELD_NUMBER = 6;
2854     private java.lang.Object stringEvent_;
2855     /**
2856      * <code>optional string string_event = 6;</code>
2857      */
2858     public boolean hasStringEvent() {
2859       return ((bitField0_ & 0x00000020) == 0x00000020);
2860     }
2861     /**
2862      * <code>optional string string_event = 6;</code>
2863      */
2864     public java.lang.String getStringEvent() {
2865       java.lang.Object ref = stringEvent_;
2866       if (ref instanceof java.lang.String) {
2867         return (java.lang.String) ref;
2868       } else {
2869         com.google.protobuf.ByteString bs = 
2870             (com.google.protobuf.ByteString) ref;
2871         java.lang.String s = bs.toStringUtf8();
2872         if (bs.isValidUtf8()) {
2873           stringEvent_ = s;
2874         }
2875         return s;
2876       }
2877     }
2878     /**
2879      * <code>optional string string_event = 6;</code>
2880      */
2881     public com.google.protobuf.ByteString
2882         getStringEventBytes() {
2883       java.lang.Object ref = stringEvent_;
2884       if (ref instanceof java.lang.String) {
2885         com.google.protobuf.ByteString b = 
2886             com.google.protobuf.ByteString.copyFromUtf8(
2887                 (java.lang.String) ref);
2888         stringEvent_ = b;
2889         return b;
2890       } else {
2891         return (com.google.protobuf.ByteString) ref;
2892       }
2893     }
2894
2895     // optional double numeric_event = 7;
2896     public static final int NUMERIC_EVENT_FIELD_NUMBER = 7;
2897     private double numericEvent_;
2898     /**
2899      * <code>optional double numeric_event = 7;</code>
2900      */
2901     public boolean hasNumericEvent() {
2902       return ((bitField0_ & 0x00000040) == 0x00000040);
2903     }
2904     /**
2905      * <code>optional double numeric_event = 7;</code>
2906      */
2907     public double getNumericEvent() {
2908       return numericEvent_;
2909     }
2910
2911     // optional bool boolean_event = 8;
2912     public static final int BOOLEAN_EVENT_FIELD_NUMBER = 8;
2913     private boolean booleanEvent_;
2914     /**
2915      * <code>optional bool boolean_event = 8;</code>
2916      */
2917     public boolean hasBooleanEvent() {
2918       return ((bitField0_ & 0x00000080) == 0x00000080);
2919     }
2920     /**
2921      * <code>optional bool boolean_event = 8;</code>
2922      */
2923     public boolean getBooleanEvent() {
2924       return booleanEvent_;
2925     }
2926
2927     private void initFields() {
2928       type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
2929       name_ = "";
2930       stringValue_ = "";
2931       numericValue_ = 0D;
2932       booleanValue_ = false;
2933       stringEvent_ = "";
2934       numericEvent_ = 0D;
2935       booleanEvent_ = false;
2936     }
2937     private byte memoizedIsInitialized = -1;
2938     public final boolean isInitialized() {
2939       byte isInitialized = memoizedIsInitialized;
2940       if (isInitialized != -1) return isInitialized == 1;
2941
2942       memoizedIsInitialized = 1;
2943       return true;
2944     }
2945
2946     public void writeTo(com.google.protobuf.CodedOutputStream output)
2947                         throws java.io.IOException {
2948       getSerializedSize();
2949       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2950         output.writeEnum(1, type_.getNumber());
2951       }
2952       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2953         output.writeBytes(2, getNameBytes());
2954       }
2955       if (((bitField0_ & 0x00000004) == 0x00000004)) {
2956         output.writeBytes(3, getStringValueBytes());
2957       }
2958       if (((bitField0_ & 0x00000008) == 0x00000008)) {
2959         output.writeDouble(4, numericValue_);
2960       }
2961       if (((bitField0_ & 0x00000010) == 0x00000010)) {
2962         output.writeBool(5, booleanValue_);
2963       }
2964       if (((bitField0_ & 0x00000020) == 0x00000020)) {
2965         output.writeBytes(6, getStringEventBytes());
2966       }
2967       if (((bitField0_ & 0x00000040) == 0x00000040)) {
2968         output.writeDouble(7, numericEvent_);
2969       }
2970       if (((bitField0_ & 0x00000080) == 0x00000080)) {
2971         output.writeBool(8, booleanEvent_);
2972       }
2973       getUnknownFields().writeTo(output);
2974     }
2975
2976     private int memoizedSerializedSize = -1;
2977     public int getSerializedSize() {
2978       int size = memoizedSerializedSize;
2979       if (size != -1) return size;
2980
2981       size = 0;
2982       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2983         size += com.google.protobuf.CodedOutputStream
2984           .computeEnumSize(1, type_.getNumber());
2985       }
2986       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2987         size += com.google.protobuf.CodedOutputStream
2988           .computeBytesSize(2, getNameBytes());
2989       }
2990       if (((bitField0_ & 0x00000004) == 0x00000004)) {
2991         size += com.google.protobuf.CodedOutputStream
2992           .computeBytesSize(3, getStringValueBytes());
2993       }
2994       if (((bitField0_ & 0x00000008) == 0x00000008)) {
2995         size += com.google.protobuf.CodedOutputStream
2996           .computeDoubleSize(4, numericValue_);
2997       }
2998       if (((bitField0_ & 0x00000010) == 0x00000010)) {
2999         size += com.google.protobuf.CodedOutputStream
3000           .computeBoolSize(5, booleanValue_);
3001       }
3002       if (((bitField0_ & 0x00000020) == 0x00000020)) {
3003         size += com.google.protobuf.CodedOutputStream
3004           .computeBytesSize(6, getStringEventBytes());
3005       }
3006       if (((bitField0_ & 0x00000040) == 0x00000040)) {
3007         size += com.google.protobuf.CodedOutputStream
3008           .computeDoubleSize(7, numericEvent_);
3009       }
3010       if (((bitField0_ & 0x00000080) == 0x00000080)) {
3011         size += com.google.protobuf.CodedOutputStream
3012           .computeBoolSize(8, booleanEvent_);
3013       }
3014       size += getUnknownFields().getSerializedSize();
3015       memoizedSerializedSize = size;
3016       return size;
3017     }
3018
3019     private static final long serialVersionUID = 0L;
3020     @java.lang.Override
3021     protected java.lang.Object writeReplace()
3022         throws java.io.ObjectStreamException {
3023       return super.writeReplace();
3024     }
3025
3026     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3027         com.google.protobuf.ByteString data)
3028         throws com.google.protobuf.InvalidProtocolBufferException {
3029       return PARSER.parseFrom(data);
3030     }
3031     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3032         com.google.protobuf.ByteString data,
3033         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3034         throws com.google.protobuf.InvalidProtocolBufferException {
3035       return PARSER.parseFrom(data, extensionRegistry);
3036     }
3037     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data)
3038         throws com.google.protobuf.InvalidProtocolBufferException {
3039       return PARSER.parseFrom(data);
3040     }
3041     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3042         byte[] data,
3043         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3044         throws com.google.protobuf.InvalidProtocolBufferException {
3045       return PARSER.parseFrom(data, extensionRegistry);
3046     }
3047     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input)
3048         throws java.io.IOException {
3049       return PARSER.parseFrom(input);
3050     }
3051     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3052         java.io.InputStream input,
3053         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3054         throws java.io.IOException {
3055       return PARSER.parseFrom(input, extensionRegistry);
3056     }
3057     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input)
3058         throws java.io.IOException {
3059       return PARSER.parseDelimitedFrom(input);
3060     }
3061     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(
3062         java.io.InputStream input,
3063         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3064         throws java.io.IOException {
3065       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3066     }
3067     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3068         com.google.protobuf.CodedInputStream input)
3069         throws java.io.IOException {
3070       return PARSER.parseFrom(input);
3071     }
3072     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3073         com.google.protobuf.CodedInputStream input,
3074         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3075         throws java.io.IOException {
3076       return PARSER.parseFrom(input, extensionRegistry);
3077     }
3078
3079     public static Builder newBuilder() { return Builder.create(); }
3080     public Builder newBuilderForType() { return newBuilder(); }
3081     public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) {
3082       return newBuilder().mergeFrom(prototype);
3083     }
3084     public Builder toBuilder() { return newBuilder(this); }
3085
3086     @java.lang.Override
3087     protected Builder newBuilderForType(
3088         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3089       Builder builder = new Builder(parent);
3090       return builder;
3091     }
3092     /**
3093      * Protobuf type {@code openxc.TranslatedMessage}
3094      */
3095     public static final class Builder extends
3096         com.google.protobuf.GeneratedMessage.Builder<Builder>
3097        implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder {
3098       public static final com.google.protobuf.Descriptors.Descriptor
3099           getDescriptor() {
3100         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
3101       }
3102
3103       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3104           internalGetFieldAccessorTable() {
3105         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
3106             .ensureFieldAccessorsInitialized(
3107                 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
3108       }
3109
3110       // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder()
3111       private Builder() {
3112         maybeForceBuilderInitialization();
3113       }
3114
3115       private Builder(
3116           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3117         super(parent);
3118         maybeForceBuilderInitialization();
3119       }
3120       private void maybeForceBuilderInitialization() {
3121         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3122         }
3123       }
3124       private static Builder create() {
3125         return new Builder();
3126       }
3127
3128       public Builder clear() {
3129         super.clear();
3130         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
3131         bitField0_ = (bitField0_ & ~0x00000001);
3132         name_ = "";
3133         bitField0_ = (bitField0_ & ~0x00000002);
3134         stringValue_ = "";
3135         bitField0_ = (bitField0_ & ~0x00000004);
3136         numericValue_ = 0D;
3137         bitField0_ = (bitField0_ & ~0x00000008);
3138         booleanValue_ = false;
3139         bitField0_ = (bitField0_ & ~0x00000010);
3140         stringEvent_ = "";
3141         bitField0_ = (bitField0_ & ~0x00000020);
3142         numericEvent_ = 0D;
3143         bitField0_ = (bitField0_ & ~0x00000040);
3144         booleanEvent_ = false;
3145         bitField0_ = (bitField0_ & ~0x00000080);
3146         return this;
3147       }
3148
3149       public Builder clone() {
3150         return create().mergeFrom(buildPartial());
3151       }
3152
3153       public com.google.protobuf.Descriptors.Descriptor
3154           getDescriptorForType() {
3155         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
3156       }
3157
3158       public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() {
3159         return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
3160       }
3161
3162       public com.openxc.BinaryMessages.TranslatedMessage build() {
3163         com.openxc.BinaryMessages.TranslatedMessage result = buildPartial();
3164         if (!result.isInitialized()) {
3165           throw newUninitializedMessageException(result);
3166         }
3167         return result;
3168       }
3169
3170       public com.openxc.BinaryMessages.TranslatedMessage buildPartial() {
3171         com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this);
3172         int from_bitField0_ = bitField0_;
3173         int to_bitField0_ = 0;
3174         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
3175           to_bitField0_ |= 0x00000001;
3176         }
3177         result.type_ = type_;
3178         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3179           to_bitField0_ |= 0x00000002;
3180         }
3181         result.name_ = name_;
3182         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
3183           to_bitField0_ |= 0x00000004;
3184         }
3185         result.stringValue_ = stringValue_;
3186         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
3187           to_bitField0_ |= 0x00000008;
3188         }
3189         result.numericValue_ = numericValue_;
3190         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
3191           to_bitField0_ |= 0x00000010;
3192         }
3193         result.booleanValue_ = booleanValue_;
3194         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
3195           to_bitField0_ |= 0x00000020;
3196         }
3197         result.stringEvent_ = stringEvent_;
3198         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
3199           to_bitField0_ |= 0x00000040;
3200         }
3201         result.numericEvent_ = numericEvent_;
3202         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
3203           to_bitField0_ |= 0x00000080;
3204         }
3205         result.booleanEvent_ = booleanEvent_;
3206         result.bitField0_ = to_bitField0_;
3207         onBuilt();
3208         return result;
3209       }
3210
3211       public Builder mergeFrom(com.google.protobuf.Message other) {
3212         if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) {
3213           return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other);
3214         } else {
3215           super.mergeFrom(other);
3216           return this;
3217         }
3218       }
3219
3220       public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) {
3221         if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this;
3222         if (other.hasType()) {
3223           setType(other.getType());
3224         }
3225         if (other.hasName()) {
3226           bitField0_ |= 0x00000002;
3227           name_ = other.name_;
3228           onChanged();
3229         }
3230         if (other.hasStringValue()) {
3231           bitField0_ |= 0x00000004;
3232           stringValue_ = other.stringValue_;
3233           onChanged();
3234         }
3235         if (other.hasNumericValue()) {
3236           setNumericValue(other.getNumericValue());
3237         }
3238         if (other.hasBooleanValue()) {
3239           setBooleanValue(other.getBooleanValue());
3240         }
3241         if (other.hasStringEvent()) {
3242           bitField0_ |= 0x00000020;
3243           stringEvent_ = other.stringEvent_;
3244           onChanged();
3245         }
3246         if (other.hasNumericEvent()) {
3247           setNumericEvent(other.getNumericEvent());
3248         }
3249         if (other.hasBooleanEvent()) {
3250           setBooleanEvent(other.getBooleanEvent());
3251         }
3252         this.mergeUnknownFields(other.getUnknownFields());
3253         return this;
3254       }
3255
3256       public final boolean isInitialized() {
3257         return true;
3258       }
3259
3260       public Builder mergeFrom(
3261           com.google.protobuf.CodedInputStream input,
3262           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3263           throws java.io.IOException {
3264         com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null;
3265         try {
3266           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3267         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3268           parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage();
3269           throw e;
3270         } finally {
3271           if (parsedMessage != null) {
3272             mergeFrom(parsedMessage);
3273           }
3274         }
3275         return this;
3276       }
3277       private int bitField0_;
3278
3279       // optional .openxc.TranslatedMessage.Type type = 1;
3280       private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
3281       /**
3282        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
3283        */
3284       public boolean hasType() {
3285         return ((bitField0_ & 0x00000001) == 0x00000001);
3286       }
3287       /**
3288        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
3289        */
3290       public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
3291         return type_;
3292       }
3293       /**
3294        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
3295        */
3296       public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) {
3297         if (value == null) {
3298           throw new NullPointerException();
3299         }
3300         bitField0_ |= 0x00000001;
3301         type_ = value;
3302         onChanged();
3303         return this;
3304       }
3305       /**
3306        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
3307        */
3308       public Builder clearType() {
3309         bitField0_ = (bitField0_ & ~0x00000001);
3310         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
3311         onChanged();
3312         return this;
3313       }
3314
3315       // optional string name = 2;
3316       private java.lang.Object name_ = "";
3317       /**
3318        * <code>optional string name = 2;</code>
3319        */
3320       public boolean hasName() {
3321         return ((bitField0_ & 0x00000002) == 0x00000002);
3322       }
3323       /**
3324        * <code>optional string name = 2;</code>
3325        */
3326       public java.lang.String getName() {
3327         java.lang.Object ref = name_;
3328         if (!(ref instanceof java.lang.String)) {
3329           java.lang.String s = ((com.google.protobuf.ByteString) ref)
3330               .toStringUtf8();
3331           name_ = s;
3332           return s;
3333         } else {
3334           return (java.lang.String) ref;
3335         }
3336       }
3337       /**
3338        * <code>optional string name = 2;</code>
3339        */
3340       public com.google.protobuf.ByteString
3341           getNameBytes() {
3342         java.lang.Object ref = name_;
3343         if (ref instanceof String) {
3344           com.google.protobuf.ByteString b = 
3345               com.google.protobuf.ByteString.copyFromUtf8(
3346                   (java.lang.String) ref);
3347           name_ = b;
3348           return b;
3349         } else {
3350           return (com.google.protobuf.ByteString) ref;
3351         }
3352       }
3353       /**
3354        * <code>optional string name = 2;</code>
3355        */
3356       public Builder setName(
3357           java.lang.String value) {
3358         if (value == null) {
3359     throw new NullPointerException();
3360   }
3361   bitField0_ |= 0x00000002;
3362         name_ = value;
3363         onChanged();
3364         return this;
3365       }
3366       /**
3367        * <code>optional string name = 2;</code>
3368        */
3369       public Builder clearName() {
3370         bitField0_ = (bitField0_ & ~0x00000002);
3371         name_ = getDefaultInstance().getName();
3372         onChanged();
3373         return this;
3374       }
3375       /**
3376        * <code>optional string name = 2;</code>
3377        */
3378       public Builder setNameBytes(
3379           com.google.protobuf.ByteString value) {
3380         if (value == null) {
3381     throw new NullPointerException();
3382   }
3383   bitField0_ |= 0x00000002;
3384         name_ = value;
3385         onChanged();
3386         return this;
3387       }
3388
3389       // optional string string_value = 3;
3390       private java.lang.Object stringValue_ = "";
3391       /**
3392        * <code>optional string string_value = 3;</code>
3393        */
3394       public boolean hasStringValue() {
3395         return ((bitField0_ & 0x00000004) == 0x00000004);
3396       }
3397       /**
3398        * <code>optional string string_value = 3;</code>
3399        */
3400       public java.lang.String getStringValue() {
3401         java.lang.Object ref = stringValue_;
3402         if (!(ref instanceof java.lang.String)) {
3403           java.lang.String s = ((com.google.protobuf.ByteString) ref)
3404               .toStringUtf8();
3405           stringValue_ = s;
3406           return s;
3407         } else {
3408           return (java.lang.String) ref;
3409         }
3410       }
3411       /**
3412        * <code>optional string string_value = 3;</code>
3413        */
3414       public com.google.protobuf.ByteString
3415           getStringValueBytes() {
3416         java.lang.Object ref = stringValue_;
3417         if (ref instanceof String) {
3418           com.google.protobuf.ByteString b = 
3419               com.google.protobuf.ByteString.copyFromUtf8(
3420                   (java.lang.String) ref);
3421           stringValue_ = b;
3422           return b;
3423         } else {
3424           return (com.google.protobuf.ByteString) ref;
3425         }
3426       }
3427       /**
3428        * <code>optional string string_value = 3;</code>
3429        */
3430       public Builder setStringValue(
3431           java.lang.String value) {
3432         if (value == null) {
3433     throw new NullPointerException();
3434   }
3435   bitField0_ |= 0x00000004;
3436         stringValue_ = value;
3437         onChanged();
3438         return this;
3439       }
3440       /**
3441        * <code>optional string string_value = 3;</code>
3442        */
3443       public Builder clearStringValue() {
3444         bitField0_ = (bitField0_ & ~0x00000004);
3445         stringValue_ = getDefaultInstance().getStringValue();
3446         onChanged();
3447         return this;
3448       }
3449       /**
3450        * <code>optional string string_value = 3;</code>
3451        */
3452       public Builder setStringValueBytes(
3453           com.google.protobuf.ByteString value) {
3454         if (value == null) {
3455     throw new NullPointerException();
3456   }
3457   bitField0_ |= 0x00000004;
3458         stringValue_ = value;
3459         onChanged();
3460         return this;
3461       }
3462
3463       // optional double numeric_value = 4;
3464       private double numericValue_ ;
3465       /**
3466        * <code>optional double numeric_value = 4;</code>
3467        */
3468       public boolean hasNumericValue() {
3469         return ((bitField0_ & 0x00000008) == 0x00000008);
3470       }
3471       /**
3472        * <code>optional double numeric_value = 4;</code>
3473        */
3474       public double getNumericValue() {
3475         return numericValue_;
3476       }
3477       /**
3478        * <code>optional double numeric_value = 4;</code>
3479        */
3480       public Builder setNumericValue(double value) {
3481         bitField0_ |= 0x00000008;
3482         numericValue_ = value;
3483         onChanged();
3484         return this;
3485       }
3486       /**
3487        * <code>optional double numeric_value = 4;</code>
3488        */
3489       public Builder clearNumericValue() {
3490         bitField0_ = (bitField0_ & ~0x00000008);
3491         numericValue_ = 0D;
3492         onChanged();
3493         return this;
3494       }
3495
3496       // optional bool boolean_value = 5;
3497       private boolean booleanValue_ ;
3498       /**
3499        * <code>optional bool boolean_value = 5;</code>
3500        */
3501       public boolean hasBooleanValue() {
3502         return ((bitField0_ & 0x00000010) == 0x00000010);
3503       }
3504       /**
3505        * <code>optional bool boolean_value = 5;</code>
3506        */
3507       public boolean getBooleanValue() {
3508         return booleanValue_;
3509       }
3510       /**
3511        * <code>optional bool boolean_value = 5;</code>
3512        */
3513       public Builder setBooleanValue(boolean value) {
3514         bitField0_ |= 0x00000010;
3515         booleanValue_ = value;
3516         onChanged();
3517         return this;
3518       }
3519       /**
3520        * <code>optional bool boolean_value = 5;</code>
3521        */
3522       public Builder clearBooleanValue() {
3523         bitField0_ = (bitField0_ & ~0x00000010);
3524         booleanValue_ = false;
3525         onChanged();
3526         return this;
3527       }
3528
3529       // optional string string_event = 6;
3530       private java.lang.Object stringEvent_ = "";
3531       /**
3532        * <code>optional string string_event = 6;</code>
3533        */
3534       public boolean hasStringEvent() {
3535         return ((bitField0_ & 0x00000020) == 0x00000020);
3536       }
3537       /**
3538        * <code>optional string string_event = 6;</code>
3539        */
3540       public java.lang.String getStringEvent() {
3541         java.lang.Object ref = stringEvent_;
3542         if (!(ref instanceof java.lang.String)) {
3543           java.lang.String s = ((com.google.protobuf.ByteString) ref)
3544               .toStringUtf8();
3545           stringEvent_ = s;
3546           return s;
3547         } else {
3548           return (java.lang.String) ref;
3549         }
3550       }
3551       /**
3552        * <code>optional string string_event = 6;</code>
3553        */
3554       public com.google.protobuf.ByteString
3555           getStringEventBytes() {
3556         java.lang.Object ref = stringEvent_;
3557         if (ref instanceof String) {
3558           com.google.protobuf.ByteString b = 
3559               com.google.protobuf.ByteString.copyFromUtf8(
3560                   (java.lang.String) ref);
3561           stringEvent_ = b;
3562           return b;
3563         } else {
3564           return (com.google.protobuf.ByteString) ref;
3565         }
3566       }
3567       /**
3568        * <code>optional string string_event = 6;</code>
3569        */
3570       public Builder setStringEvent(
3571           java.lang.String value) {
3572         if (value == null) {
3573     throw new NullPointerException();
3574   }
3575   bitField0_ |= 0x00000020;
3576         stringEvent_ = value;
3577         onChanged();
3578         return this;
3579       }
3580       /**
3581        * <code>optional string string_event = 6;</code>
3582        */
3583       public Builder clearStringEvent() {
3584         bitField0_ = (bitField0_ & ~0x00000020);
3585         stringEvent_ = getDefaultInstance().getStringEvent();
3586         onChanged();
3587         return this;
3588       }
3589       /**
3590        * <code>optional string string_event = 6;</code>
3591        */
3592       public Builder setStringEventBytes(
3593           com.google.protobuf.ByteString value) {
3594         if (value == null) {
3595     throw new NullPointerException();
3596   }
3597   bitField0_ |= 0x00000020;
3598         stringEvent_ = value;
3599         onChanged();
3600         return this;
3601       }
3602
3603       // optional double numeric_event = 7;
3604       private double numericEvent_ ;
3605       /**
3606        * <code>optional double numeric_event = 7;</code>
3607        */
3608       public boolean hasNumericEvent() {
3609         return ((bitField0_ & 0x00000040) == 0x00000040);
3610       }
3611       /**
3612        * <code>optional double numeric_event = 7;</code>
3613        */
3614       public double getNumericEvent() {
3615         return numericEvent_;
3616       }
3617       /**
3618        * <code>optional double numeric_event = 7;</code>
3619        */
3620       public Builder setNumericEvent(double value) {
3621         bitField0_ |= 0x00000040;
3622         numericEvent_ = value;
3623         onChanged();
3624         return this;
3625       }
3626       /**
3627        * <code>optional double numeric_event = 7;</code>
3628        */
3629       public Builder clearNumericEvent() {
3630         bitField0_ = (bitField0_ & ~0x00000040);
3631         numericEvent_ = 0D;
3632         onChanged();
3633         return this;
3634       }
3635
3636       // optional bool boolean_event = 8;
3637       private boolean booleanEvent_ ;
3638       /**
3639        * <code>optional bool boolean_event = 8;</code>
3640        */
3641       public boolean hasBooleanEvent() {
3642         return ((bitField0_ & 0x00000080) == 0x00000080);
3643       }
3644       /**
3645        * <code>optional bool boolean_event = 8;</code>
3646        */
3647       public boolean getBooleanEvent() {
3648         return booleanEvent_;
3649       }
3650       /**
3651        * <code>optional bool boolean_event = 8;</code>
3652        */
3653       public Builder setBooleanEvent(boolean value) {
3654         bitField0_ |= 0x00000080;
3655         booleanEvent_ = value;
3656         onChanged();
3657         return this;
3658       }
3659       /**
3660        * <code>optional bool boolean_event = 8;</code>
3661        */
3662       public Builder clearBooleanEvent() {
3663         bitField0_ = (bitField0_ & ~0x00000080);
3664         booleanEvent_ = false;
3665         onChanged();
3666         return this;
3667       }
3668
3669       // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage)
3670     }
3671
3672     static {
3673       defaultInstance = new TranslatedMessage(true);
3674       defaultInstance.initFields();
3675     }
3676
3677     // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage)
3678   }
3679
3680   private static com.google.protobuf.Descriptors.Descriptor
3681     internal_static_openxc_VehicleMessage_descriptor;
3682   private static
3683     com.google.protobuf.GeneratedMessage.FieldAccessorTable
3684       internal_static_openxc_VehicleMessage_fieldAccessorTable;
3685   private static com.google.protobuf.Descriptors.Descriptor
3686     internal_static_openxc_RawMessage_descriptor;
3687   private static
3688     com.google.protobuf.GeneratedMessage.FieldAccessorTable
3689       internal_static_openxc_RawMessage_fieldAccessorTable;
3690   private static com.google.protobuf.Descriptors.Descriptor
3691     internal_static_openxc_DiagnosticMessage_descriptor;
3692   private static
3693     com.google.protobuf.GeneratedMessage.FieldAccessorTable
3694       internal_static_openxc_DiagnosticMessage_fieldAccessorTable;
3695   private static com.google.protobuf.Descriptors.Descriptor
3696     internal_static_openxc_TranslatedMessage_descriptor;
3697   private static
3698     com.google.protobuf.GeneratedMessage.FieldAccessorTable
3699       internal_static_openxc_TranslatedMessage_fieldAccessorTable;
3700
3701   public static com.google.protobuf.Descriptors.FileDescriptor
3702       getDescriptor() {
3703     return descriptor;
3704   }
3705   private static com.google.protobuf.Descriptors.FileDescriptor
3706       descriptor;
3707   static {
3708     java.lang.String[] descriptorData = {
3709       "\n\014openxc.proto\022\006openxc\"\274\001\n\016VehicleMessag" +
3710       "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." +
3711       "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" +
3712       "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" +
3713       "xc.TranslatedMessage\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" +
3714       "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" +
3715       "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\221\001\n\021D" +
3716       "iagnosticMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage" +
3717       "_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" +
3718       "success\030\005 \001(\010\022\036\n\026negative_response_code\030",
3719       "\006 \001(\r\022\017\n\007payload\030\007 \001(\014\"\265\002\n\021TranslatedMes" +
3720       "sage\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMe" +
3721       "ssage.Type\022\014\n\004name\030\002 \001(\t\022\024\n\014string_value" +
3722       "\030\003 \001(\t\022\025\n\rnumeric_value\030\004 \001(\001\022\025\n\rboolean" +
3723       "_value\030\005 \001(\010\022\024\n\014string_event\030\006 \001(\t\022\025\n\rnu" +
3724       "meric_event\030\007 \001(\001\022\025\n\rboolean_event\030\010 \001(\010" +
3725       "\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022" +
3726       "\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014" +
3727       "EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMess" +
3728       "ages"
3729     };
3730     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
3731       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
3732         public com.google.protobuf.ExtensionRegistry assignDescriptors(
3733             com.google.protobuf.Descriptors.FileDescriptor root) {
3734           descriptor = root;
3735           internal_static_openxc_VehicleMessage_descriptor =
3736             getDescriptor().getMessageTypes().get(0);
3737           internal_static_openxc_VehicleMessage_fieldAccessorTable = new
3738             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3739               internal_static_openxc_VehicleMessage_descriptor,
3740               new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", });
3741           internal_static_openxc_RawMessage_descriptor =
3742             getDescriptor().getMessageTypes().get(1);
3743           internal_static_openxc_RawMessage_fieldAccessorTable = new
3744             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3745               internal_static_openxc_RawMessage_descriptor,
3746               new java.lang.String[] { "Bus", "MessageId", "Data", });
3747           internal_static_openxc_DiagnosticMessage_descriptor =
3748             getDescriptor().getMessageTypes().get(2);
3749           internal_static_openxc_DiagnosticMessage_fieldAccessorTable = new
3750             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3751               internal_static_openxc_DiagnosticMessage_descriptor,
3752               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", });
3753           internal_static_openxc_TranslatedMessage_descriptor =
3754             getDescriptor().getMessageTypes().get(3);
3755           internal_static_openxc_TranslatedMessage_fieldAccessorTable = new
3756             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3757               internal_static_openxc_TranslatedMessage_descriptor,
3758               new java.lang.String[] { "Type", "Name", "StringValue", "NumericValue", "BooleanValue", "StringEvent", "NumericEvent", "BooleanEvent", });
3759           return null;
3760         }
3761       };
3762     com.google.protobuf.Descriptors.FileDescriptor
3763       .internalBuildGeneratedFileFrom(descriptorData,
3764         new com.google.protobuf.Descriptors.FileDescriptor[] {
3765         }, assigner);
3766   }
3767
3768   // @@protoc_insertion_point(outer_class_scope)
3769 }