All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twitter.elephantbird.examples.proto.ThriftFixtures Maven / Gradle / Ivy

There is a newer version: 4.17
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: thrift_fixtures.proto

package com.twitter.elephantbird.examples.proto;

public final class ThriftFixtures {
  private ThriftFixtures() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface OneOfEachOrBuilder
      extends com.google.protobuf.MessageOrBuilder {
    
    // optional bool im_true = 1;
    boolean hasImTrue();
    boolean getImTrue();
    
    // optional bool im_false = 2;
    boolean hasImFalse();
    boolean getImFalse();
    
    // optional int32 a_bite = 3;
    boolean hasABite();
    int getABite();
    
    // optional int32 integer16 = 4;
    boolean hasInteger16();
    int getInteger16();
    
    // optional int32 integer32 = 5;
    boolean hasInteger32();
    int getInteger32();
    
    // optional int64 integer64 = 6;
    boolean hasInteger64();
    long getInteger64();
    
    // optional double double_precision = 7;
    boolean hasDoublePrecision();
    double getDoublePrecision();
    
    // optional string some_characters = 8;
    boolean hasSomeCharacters();
    String getSomeCharacters();
    
    // optional string zomg_unicode = 9;
    boolean hasZomgUnicode();
    String getZomgUnicode();
    
    // optional bool what_who = 10;
    boolean hasWhatWho();
    boolean getWhatWho();
    
    // optional bytes base64 = 11;
    boolean hasBase64();
    com.google.protobuf.ByteString getBase64();
    
    // repeated int32 byte_list = 12;
    java.util.List getByteListList();
    int getByteListCount();
    int getByteList(int index);
    
    // repeated int32 i16_list = 13;
    java.util.List getI16ListList();
    int getI16ListCount();
    int getI16List(int index);
    
    // repeated int64 i64_list = 14;
    java.util.List getI64ListList();
    int getI64ListCount();
    long getI64List(int index);
  }
  public static final class OneOfEach extends
      com.google.protobuf.GeneratedMessage
      implements OneOfEachOrBuilder {
    // Use OneOfEach.newBuilder() to construct.
    private OneOfEach(Builder builder) {
      super(builder);
    }
    private OneOfEach(boolean noInit) {}
    
    private static final OneOfEach defaultInstance;
    public static OneOfEach getDefaultInstance() {
      return defaultInstance;
    }
    
    public OneOfEach getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.twitter.elephantbird.examples.proto.ThriftFixtures.internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.twitter.elephantbird.examples.proto.ThriftFixtures.internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_fieldAccessorTable;
    }
    
    private int bitField0_;
    // optional bool im_true = 1;
    public static final int IM_TRUE_FIELD_NUMBER = 1;
    private boolean imTrue_;
    public boolean hasImTrue() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public boolean getImTrue() {
      return imTrue_;
    }
    
    // optional bool im_false = 2;
    public static final int IM_FALSE_FIELD_NUMBER = 2;
    private boolean imFalse_;
    public boolean hasImFalse() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public boolean getImFalse() {
      return imFalse_;
    }
    
    // optional int32 a_bite = 3;
    public static final int A_BITE_FIELD_NUMBER = 3;
    private int aBite_;
    public boolean hasABite() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public int getABite() {
      return aBite_;
    }
    
    // optional int32 integer16 = 4;
    public static final int INTEGER16_FIELD_NUMBER = 4;
    private int integer16_;
    public boolean hasInteger16() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    public int getInteger16() {
      return integer16_;
    }
    
    // optional int32 integer32 = 5;
    public static final int INTEGER32_FIELD_NUMBER = 5;
    private int integer32_;
    public boolean hasInteger32() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    public int getInteger32() {
      return integer32_;
    }
    
    // optional int64 integer64 = 6;
    public static final int INTEGER64_FIELD_NUMBER = 6;
    private long integer64_;
    public boolean hasInteger64() {
      return ((bitField0_ & 0x00000020) == 0x00000020);
    }
    public long getInteger64() {
      return integer64_;
    }
    
    // optional double double_precision = 7;
    public static final int DOUBLE_PRECISION_FIELD_NUMBER = 7;
    private double doublePrecision_;
    public boolean hasDoublePrecision() {
      return ((bitField0_ & 0x00000040) == 0x00000040);
    }
    public double getDoublePrecision() {
      return doublePrecision_;
    }
    
    // optional string some_characters = 8;
    public static final int SOME_CHARACTERS_FIELD_NUMBER = 8;
    private java.lang.Object someCharacters_;
    public boolean hasSomeCharacters() {
      return ((bitField0_ & 0x00000080) == 0x00000080);
    }
    public String getSomeCharacters() {
      java.lang.Object ref = someCharacters_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          someCharacters_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getSomeCharactersBytes() {
      java.lang.Object ref = someCharacters_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        someCharacters_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    
    // optional string zomg_unicode = 9;
    public static final int ZOMG_UNICODE_FIELD_NUMBER = 9;
    private java.lang.Object zomgUnicode_;
    public boolean hasZomgUnicode() {
      return ((bitField0_ & 0x00000100) == 0x00000100);
    }
    public String getZomgUnicode() {
      java.lang.Object ref = zomgUnicode_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          zomgUnicode_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getZomgUnicodeBytes() {
      java.lang.Object ref = zomgUnicode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        zomgUnicode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    
    // optional bool what_who = 10;
    public static final int WHAT_WHO_FIELD_NUMBER = 10;
    private boolean whatWho_;
    public boolean hasWhatWho() {
      return ((bitField0_ & 0x00000200) == 0x00000200);
    }
    public boolean getWhatWho() {
      return whatWho_;
    }
    
    // optional bytes base64 = 11;
    public static final int BASE64_FIELD_NUMBER = 11;
    private com.google.protobuf.ByteString base64_;
    public boolean hasBase64() {
      return ((bitField0_ & 0x00000400) == 0x00000400);
    }
    public com.google.protobuf.ByteString getBase64() {
      return base64_;
    }
    
    // repeated int32 byte_list = 12;
    public static final int BYTE_LIST_FIELD_NUMBER = 12;
    private java.util.List byteList_;
    public java.util.List
        getByteListList() {
      return byteList_;
    }
    public int getByteListCount() {
      return byteList_.size();
    }
    public int getByteList(int index) {
      return byteList_.get(index);
    }
    
    // repeated int32 i16_list = 13;
    public static final int I16_LIST_FIELD_NUMBER = 13;
    private java.util.List i16List_;
    public java.util.List
        getI16ListList() {
      return i16List_;
    }
    public int getI16ListCount() {
      return i16List_.size();
    }
    public int getI16List(int index) {
      return i16List_.get(index);
    }
    
    // repeated int64 i64_list = 14;
    public static final int I64_LIST_FIELD_NUMBER = 14;
    private java.util.List i64List_;
    public java.util.List
        getI64ListList() {
      return i64List_;
    }
    public int getI64ListCount() {
      return i64List_.size();
    }
    public long getI64List(int index) {
      return i64List_.get(index);
    }
    
    private void initFields() {
      imTrue_ = false;
      imFalse_ = false;
      aBite_ = 0;
      integer16_ = 0;
      integer32_ = 0;
      integer64_ = 0L;
      doublePrecision_ = 0D;
      someCharacters_ = "";
      zomgUnicode_ = "";
      whatWho_ = false;
      base64_ = com.google.protobuf.ByteString.EMPTY;
      byteList_ = java.util.Collections.emptyList();;
      i16List_ = java.util.Collections.emptyList();;
      i64List_ = java.util.Collections.emptyList();;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBool(1, imTrue_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeBool(2, imFalse_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt32(3, aBite_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeInt32(4, integer16_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeInt32(5, integer32_);
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        output.writeInt64(6, integer64_);
      }
      if (((bitField0_ & 0x00000040) == 0x00000040)) {
        output.writeDouble(7, doublePrecision_);
      }
      if (((bitField0_ & 0x00000080) == 0x00000080)) {
        output.writeBytes(8, getSomeCharactersBytes());
      }
      if (((bitField0_ & 0x00000100) == 0x00000100)) {
        output.writeBytes(9, getZomgUnicodeBytes());
      }
      if (((bitField0_ & 0x00000200) == 0x00000200)) {
        output.writeBool(10, whatWho_);
      }
      if (((bitField0_ & 0x00000400) == 0x00000400)) {
        output.writeBytes(11, base64_);
      }
      for (int i = 0; i < byteList_.size(); i++) {
        output.writeInt32(12, byteList_.get(i));
      }
      for (int i = 0; i < i16List_.size(); i++) {
        output.writeInt32(13, i16List_.get(i));
      }
      for (int i = 0; i < i64List_.size(); i++) {
        output.writeInt64(14, i64List_.get(i));
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(1, imTrue_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(2, imFalse_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(3, aBite_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(4, integer16_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(5, integer32_);
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(6, integer64_);
      }
      if (((bitField0_ & 0x00000040) == 0x00000040)) {
        size += com.google.protobuf.CodedOutputStream
          .computeDoubleSize(7, doublePrecision_);
      }
      if (((bitField0_ & 0x00000080) == 0x00000080)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(8, getSomeCharactersBytes());
      }
      if (((bitField0_ & 0x00000100) == 0x00000100)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(9, getZomgUnicodeBytes());
      }
      if (((bitField0_ & 0x00000200) == 0x00000200)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(10, whatWho_);
      }
      if (((bitField0_ & 0x00000400) == 0x00000400)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(11, base64_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < byteList_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(byteList_.get(i));
        }
        size += dataSize;
        size += 1 * getByteListList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < i16List_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(i16List_.get(i));
        }
        size += dataSize;
        size += 1 * getI16ListList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < i64List_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt64SizeNoTag(i64List_.get(i));
        }
        size += dataSize;
        size += 1 * getI64ListList().size();
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder
       implements com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEachOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.twitter.elephantbird.examples.proto.ThriftFixtures.internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.twitter.elephantbird.examples.proto.ThriftFixtures.internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_fieldAccessorTable;
      }
      
      // Construct using com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        imTrue_ = false;
        bitField0_ = (bitField0_ & ~0x00000001);
        imFalse_ = false;
        bitField0_ = (bitField0_ & ~0x00000002);
        aBite_ = 0;
        bitField0_ = (bitField0_ & ~0x00000004);
        integer16_ = 0;
        bitField0_ = (bitField0_ & ~0x00000008);
        integer32_ = 0;
        bitField0_ = (bitField0_ & ~0x00000010);
        integer64_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000020);
        doublePrecision_ = 0D;
        bitField0_ = (bitField0_ & ~0x00000040);
        someCharacters_ = "";
        bitField0_ = (bitField0_ & ~0x00000080);
        zomgUnicode_ = "";
        bitField0_ = (bitField0_ & ~0x00000100);
        whatWho_ = false;
        bitField0_ = (bitField0_ & ~0x00000200);
        base64_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000400);
        byteList_ = java.util.Collections.emptyList();;
        bitField0_ = (bitField0_ & ~0x00000800);
        i16List_ = java.util.Collections.emptyList();;
        bitField0_ = (bitField0_ & ~0x00001000);
        i64List_ = java.util.Collections.emptyList();;
        bitField0_ = (bitField0_ & ~0x00002000);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach.getDescriptor();
      }
      
      public com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach getDefaultInstanceForType() {
        return com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach.getDefaultInstance();
      }
      
      public com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach build() {
        com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach buildPartial() {
        com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach result = new com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.imTrue_ = imTrue_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.imFalse_ = imFalse_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.aBite_ = aBite_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.integer16_ = integer16_;
        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
          to_bitField0_ |= 0x00000010;
        }
        result.integer32_ = integer32_;
        if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
          to_bitField0_ |= 0x00000020;
        }
        result.integer64_ = integer64_;
        if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
          to_bitField0_ |= 0x00000040;
        }
        result.doublePrecision_ = doublePrecision_;
        if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
          to_bitField0_ |= 0x00000080;
        }
        result.someCharacters_ = someCharacters_;
        if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
          to_bitField0_ |= 0x00000100;
        }
        result.zomgUnicode_ = zomgUnicode_;
        if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
          to_bitField0_ |= 0x00000200;
        }
        result.whatWho_ = whatWho_;
        if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
          to_bitField0_ |= 0x00000400;
        }
        result.base64_ = base64_;
        if (((bitField0_ & 0x00000800) == 0x00000800)) {
          byteList_ = java.util.Collections.unmodifiableList(byteList_);
          bitField0_ = (bitField0_ & ~0x00000800);
        }
        result.byteList_ = byteList_;
        if (((bitField0_ & 0x00001000) == 0x00001000)) {
          i16List_ = java.util.Collections.unmodifiableList(i16List_);
          bitField0_ = (bitField0_ & ~0x00001000);
        }
        result.i16List_ = i16List_;
        if (((bitField0_ & 0x00002000) == 0x00002000)) {
          i64List_ = java.util.Collections.unmodifiableList(i64List_);
          bitField0_ = (bitField0_ & ~0x00002000);
        }
        result.i64List_ = i64List_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach) {
          return mergeFrom((com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach other) {
        if (other == com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach.getDefaultInstance()) return this;
        if (other.hasImTrue()) {
          setImTrue(other.getImTrue());
        }
        if (other.hasImFalse()) {
          setImFalse(other.getImFalse());
        }
        if (other.hasABite()) {
          setABite(other.getABite());
        }
        if (other.hasInteger16()) {
          setInteger16(other.getInteger16());
        }
        if (other.hasInteger32()) {
          setInteger32(other.getInteger32());
        }
        if (other.hasInteger64()) {
          setInteger64(other.getInteger64());
        }
        if (other.hasDoublePrecision()) {
          setDoublePrecision(other.getDoublePrecision());
        }
        if (other.hasSomeCharacters()) {
          setSomeCharacters(other.getSomeCharacters());
        }
        if (other.hasZomgUnicode()) {
          setZomgUnicode(other.getZomgUnicode());
        }
        if (other.hasWhatWho()) {
          setWhatWho(other.getWhatWho());
        }
        if (other.hasBase64()) {
          setBase64(other.getBase64());
        }
        if (!other.byteList_.isEmpty()) {
          if (byteList_.isEmpty()) {
            byteList_ = other.byteList_;
            bitField0_ = (bitField0_ & ~0x00000800);
          } else {
            ensureByteListIsMutable();
            byteList_.addAll(other.byteList_);
          }
          onChanged();
        }
        if (!other.i16List_.isEmpty()) {
          if (i16List_.isEmpty()) {
            i16List_ = other.i16List_;
            bitField0_ = (bitField0_ & ~0x00001000);
          } else {
            ensureI16ListIsMutable();
            i16List_.addAll(other.i16List_);
          }
          onChanged();
        }
        if (!other.i64List_.isEmpty()) {
          if (i64List_.isEmpty()) {
            i64List_ = other.i64List_;
            bitField0_ = (bitField0_ & ~0x00002000);
          } else {
            ensureI64ListIsMutable();
            i64List_.addAll(other.i64List_);
          }
          onChanged();
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public final boolean isInitialized() {
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 8: {
              bitField0_ |= 0x00000001;
              imTrue_ = input.readBool();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              imFalse_ = input.readBool();
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              aBite_ = input.readInt32();
              break;
            }
            case 32: {
              bitField0_ |= 0x00000008;
              integer16_ = input.readInt32();
              break;
            }
            case 40: {
              bitField0_ |= 0x00000010;
              integer32_ = input.readInt32();
              break;
            }
            case 48: {
              bitField0_ |= 0x00000020;
              integer64_ = input.readInt64();
              break;
            }
            case 57: {
              bitField0_ |= 0x00000040;
              doublePrecision_ = input.readDouble();
              break;
            }
            case 66: {
              bitField0_ |= 0x00000080;
              someCharacters_ = input.readBytes();
              break;
            }
            case 74: {
              bitField0_ |= 0x00000100;
              zomgUnicode_ = input.readBytes();
              break;
            }
            case 80: {
              bitField0_ |= 0x00000200;
              whatWho_ = input.readBool();
              break;
            }
            case 90: {
              bitField0_ |= 0x00000400;
              base64_ = input.readBytes();
              break;
            }
            case 96: {
              ensureByteListIsMutable();
              byteList_.add(input.readInt32());
              break;
            }
            case 98: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              while (input.getBytesUntilLimit() > 0) {
                addByteList(input.readInt32());
              }
              input.popLimit(limit);
              break;
            }
            case 104: {
              ensureI16ListIsMutable();
              i16List_.add(input.readInt32());
              break;
            }
            case 106: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              while (input.getBytesUntilLimit() > 0) {
                addI16List(input.readInt32());
              }
              input.popLimit(limit);
              break;
            }
            case 112: {
              ensureI64ListIsMutable();
              i64List_.add(input.readInt64());
              break;
            }
            case 114: {
              int length = input.readRawVarint32();
              int limit = input.pushLimit(length);
              while (input.getBytesUntilLimit() > 0) {
                addI64List(input.readInt64());
              }
              input.popLimit(limit);
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // optional bool im_true = 1;
      private boolean imTrue_ ;
      public boolean hasImTrue() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public boolean getImTrue() {
        return imTrue_;
      }
      public Builder setImTrue(boolean value) {
        bitField0_ |= 0x00000001;
        imTrue_ = value;
        onChanged();
        return this;
      }
      public Builder clearImTrue() {
        bitField0_ = (bitField0_ & ~0x00000001);
        imTrue_ = false;
        onChanged();
        return this;
      }
      
      // optional bool im_false = 2;
      private boolean imFalse_ ;
      public boolean hasImFalse() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public boolean getImFalse() {
        return imFalse_;
      }
      public Builder setImFalse(boolean value) {
        bitField0_ |= 0x00000002;
        imFalse_ = value;
        onChanged();
        return this;
      }
      public Builder clearImFalse() {
        bitField0_ = (bitField0_ & ~0x00000002);
        imFalse_ = false;
        onChanged();
        return this;
      }
      
      // optional int32 a_bite = 3;
      private int aBite_ ;
      public boolean hasABite() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public int getABite() {
        return aBite_;
      }
      public Builder setABite(int value) {
        bitField0_ |= 0x00000004;
        aBite_ = value;
        onChanged();
        return this;
      }
      public Builder clearABite() {
        bitField0_ = (bitField0_ & ~0x00000004);
        aBite_ = 0;
        onChanged();
        return this;
      }
      
      // optional int32 integer16 = 4;
      private int integer16_ ;
      public boolean hasInteger16() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      public int getInteger16() {
        return integer16_;
      }
      public Builder setInteger16(int value) {
        bitField0_ |= 0x00000008;
        integer16_ = value;
        onChanged();
        return this;
      }
      public Builder clearInteger16() {
        bitField0_ = (bitField0_ & ~0x00000008);
        integer16_ = 0;
        onChanged();
        return this;
      }
      
      // optional int32 integer32 = 5;
      private int integer32_ ;
      public boolean hasInteger32() {
        return ((bitField0_ & 0x00000010) == 0x00000010);
      }
      public int getInteger32() {
        return integer32_;
      }
      public Builder setInteger32(int value) {
        bitField0_ |= 0x00000010;
        integer32_ = value;
        onChanged();
        return this;
      }
      public Builder clearInteger32() {
        bitField0_ = (bitField0_ & ~0x00000010);
        integer32_ = 0;
        onChanged();
        return this;
      }
      
      // optional int64 integer64 = 6;
      private long integer64_ ;
      public boolean hasInteger64() {
        return ((bitField0_ & 0x00000020) == 0x00000020);
      }
      public long getInteger64() {
        return integer64_;
      }
      public Builder setInteger64(long value) {
        bitField0_ |= 0x00000020;
        integer64_ = value;
        onChanged();
        return this;
      }
      public Builder clearInteger64() {
        bitField0_ = (bitField0_ & ~0x00000020);
        integer64_ = 0L;
        onChanged();
        return this;
      }
      
      // optional double double_precision = 7;
      private double doublePrecision_ ;
      public boolean hasDoublePrecision() {
        return ((bitField0_ & 0x00000040) == 0x00000040);
      }
      public double getDoublePrecision() {
        return doublePrecision_;
      }
      public Builder setDoublePrecision(double value) {
        bitField0_ |= 0x00000040;
        doublePrecision_ = value;
        onChanged();
        return this;
      }
      public Builder clearDoublePrecision() {
        bitField0_ = (bitField0_ & ~0x00000040);
        doublePrecision_ = 0D;
        onChanged();
        return this;
      }
      
      // optional string some_characters = 8;
      private java.lang.Object someCharacters_ = "";
      public boolean hasSomeCharacters() {
        return ((bitField0_ & 0x00000080) == 0x00000080);
      }
      public String getSomeCharacters() {
        java.lang.Object ref = someCharacters_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          someCharacters_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setSomeCharacters(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000080;
        someCharacters_ = value;
        onChanged();
        return this;
      }
      public Builder clearSomeCharacters() {
        bitField0_ = (bitField0_ & ~0x00000080);
        someCharacters_ = getDefaultInstance().getSomeCharacters();
        onChanged();
        return this;
      }
      void setSomeCharacters(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000080;
        someCharacters_ = value;
        onChanged();
      }
      
      // optional string zomg_unicode = 9;
      private java.lang.Object zomgUnicode_ = "";
      public boolean hasZomgUnicode() {
        return ((bitField0_ & 0x00000100) == 0x00000100);
      }
      public String getZomgUnicode() {
        java.lang.Object ref = zomgUnicode_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          zomgUnicode_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setZomgUnicode(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000100;
        zomgUnicode_ = value;
        onChanged();
        return this;
      }
      public Builder clearZomgUnicode() {
        bitField0_ = (bitField0_ & ~0x00000100);
        zomgUnicode_ = getDefaultInstance().getZomgUnicode();
        onChanged();
        return this;
      }
      void setZomgUnicode(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000100;
        zomgUnicode_ = value;
        onChanged();
      }
      
      // optional bool what_who = 10;
      private boolean whatWho_ ;
      public boolean hasWhatWho() {
        return ((bitField0_ & 0x00000200) == 0x00000200);
      }
      public boolean getWhatWho() {
        return whatWho_;
      }
      public Builder setWhatWho(boolean value) {
        bitField0_ |= 0x00000200;
        whatWho_ = value;
        onChanged();
        return this;
      }
      public Builder clearWhatWho() {
        bitField0_ = (bitField0_ & ~0x00000200);
        whatWho_ = false;
        onChanged();
        return this;
      }
      
      // optional bytes base64 = 11;
      private com.google.protobuf.ByteString base64_ = com.google.protobuf.ByteString.EMPTY;
      public boolean hasBase64() {
        return ((bitField0_ & 0x00000400) == 0x00000400);
      }
      public com.google.protobuf.ByteString getBase64() {
        return base64_;
      }
      public Builder setBase64(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000400;
        base64_ = value;
        onChanged();
        return this;
      }
      public Builder clearBase64() {
        bitField0_ = (bitField0_ & ~0x00000400);
        base64_ = getDefaultInstance().getBase64();
        onChanged();
        return this;
      }
      
      // repeated int32 byte_list = 12;
      private java.util.List byteList_ = java.util.Collections.emptyList();;
      private void ensureByteListIsMutable() {
        if (!((bitField0_ & 0x00000800) == 0x00000800)) {
          byteList_ = new java.util.ArrayList(byteList_);
          bitField0_ |= 0x00000800;
         }
      }
      public java.util.List
          getByteListList() {
        return java.util.Collections.unmodifiableList(byteList_);
      }
      public int getByteListCount() {
        return byteList_.size();
      }
      public int getByteList(int index) {
        return byteList_.get(index);
      }
      public Builder setByteList(
          int index, int value) {
        ensureByteListIsMutable();
        byteList_.set(index, value);
        onChanged();
        return this;
      }
      public Builder addByteList(int value) {
        ensureByteListIsMutable();
        byteList_.add(value);
        onChanged();
        return this;
      }
      public Builder addAllByteList(
          java.lang.Iterable values) {
        ensureByteListIsMutable();
        super.addAll(values, byteList_);
        onChanged();
        return this;
      }
      public Builder clearByteList() {
        byteList_ = java.util.Collections.emptyList();;
        bitField0_ = (bitField0_ & ~0x00000800);
        onChanged();
        return this;
      }
      
      // repeated int32 i16_list = 13;
      private java.util.List i16List_ = java.util.Collections.emptyList();;
      private void ensureI16ListIsMutable() {
        if (!((bitField0_ & 0x00001000) == 0x00001000)) {
          i16List_ = new java.util.ArrayList(i16List_);
          bitField0_ |= 0x00001000;
         }
      }
      public java.util.List
          getI16ListList() {
        return java.util.Collections.unmodifiableList(i16List_);
      }
      public int getI16ListCount() {
        return i16List_.size();
      }
      public int getI16List(int index) {
        return i16List_.get(index);
      }
      public Builder setI16List(
          int index, int value) {
        ensureI16ListIsMutable();
        i16List_.set(index, value);
        onChanged();
        return this;
      }
      public Builder addI16List(int value) {
        ensureI16ListIsMutable();
        i16List_.add(value);
        onChanged();
        return this;
      }
      public Builder addAllI16List(
          java.lang.Iterable values) {
        ensureI16ListIsMutable();
        super.addAll(values, i16List_);
        onChanged();
        return this;
      }
      public Builder clearI16List() {
        i16List_ = java.util.Collections.emptyList();;
        bitField0_ = (bitField0_ & ~0x00001000);
        onChanged();
        return this;
      }
      
      // repeated int64 i64_list = 14;
      private java.util.List i64List_ = java.util.Collections.emptyList();;
      private void ensureI64ListIsMutable() {
        if (!((bitField0_ & 0x00002000) == 0x00002000)) {
          i64List_ = new java.util.ArrayList(i64List_);
          bitField0_ |= 0x00002000;
         }
      }
      public java.util.List
          getI64ListList() {
        return java.util.Collections.unmodifiableList(i64List_);
      }
      public int getI64ListCount() {
        return i64List_.size();
      }
      public long getI64List(int index) {
        return i64List_.get(index);
      }
      public Builder setI64List(
          int index, long value) {
        ensureI64ListIsMutable();
        i64List_.set(index, value);
        onChanged();
        return this;
      }
      public Builder addI64List(long value) {
        ensureI64ListIsMutable();
        i64List_.add(value);
        onChanged();
        return this;
      }
      public Builder addAllI64List(
          java.lang.Iterable values) {
        ensureI64ListIsMutable();
        super.addAll(values, i64List_);
        onChanged();
        return this;
      }
      public Builder clearI64List() {
        i64List_ = java.util.Collections.emptyList();;
        bitField0_ = (bitField0_ & ~0x00002000);
        onChanged();
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:com.twitter.elephantbird.examples.proto.OneOfEach)
    }
    
    static {
      defaultInstance = new OneOfEach(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:com.twitter.elephantbird.examples.proto.OneOfEach)
  }
  
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_fieldAccessorTable;
  
  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\025thrift_fixtures.proto\022\'com.twitter.ele" +
      "phantbird.examples.proto\"\231\002\n\tOneOfEach\022\017" +
      "\n\007im_true\030\001 \001(\010\022\020\n\010im_false\030\002 \001(\010\022\016\n\006a_b" +
      "ite\030\003 \001(\005\022\021\n\tinteger16\030\004 \001(\005\022\021\n\tinteger3" +
      "2\030\005 \001(\005\022\021\n\tinteger64\030\006 \001(\003\022\030\n\020double_pre" +
      "cision\030\007 \001(\001\022\027\n\017some_characters\030\010 \001(\t\022\024\n" +
      "\014zomg_unicode\030\t \001(\t\022\020\n\010what_who\030\n \001(\010\022\016\n" +
      "\006base64\030\013 \001(\014\022\021\n\tbyte_list\030\014 \003(\005\022\020\n\010i16_" +
      "list\030\r \003(\005\022\020\n\010i64_list\030\016 \003(\003"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_com_twitter_elephantbird_examples_proto_OneOfEach_descriptor,
              new java.lang.String[] { "ImTrue", "ImFalse", "ABite", "Integer16", "Integer32", "Integer64", "DoublePrecision", "SomeCharacters", "ZomgUnicode", "WhatWho", "Base64", "ByteList", "I16List", "I64List", },
              com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach.class,
              com.twitter.elephantbird.examples.proto.ThriftFixtures.OneOfEach.Builder.class);
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }
  
  // @@protoc_insertion_point(outer_class_scope)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy