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

com.google.protobuf.Field Maven / Gradle / Ivy

Go to download

Kotlin core Protocol Buffers library. Protocol Buffers are a way of encoding structured data in an efficient yet extensible format.

There is a newer version: 4.29.0-RC2
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/protobuf/type.proto
// Protobuf Java Version: 4.28.0-rc3

package com.google.protobuf;

/**
 * Protobuf type {@code google.protobuf.Field}
 */
public final class Field extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:google.protobuf.Field)
    FieldOrBuilder {
private static final long serialVersionUID = 0L;
  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 28,
      /* patch= */ 0,
      /* suffix= */ "-rc3",
      Field.class.getName());
  }
  // Use Field.newBuilder() to construct.
  private Field(com.google.protobuf.GeneratedMessage.Builder builder) {
    super(builder);
  }
  private Field() {
    kind_ = 0;
    cardinality_ = 0;
    name_ = "";
    typeUrl_ = "";
    options_ = java.util.Collections.emptyList();
    jsonName_ = "";
    defaultValue_ = "";
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.protobuf.Field.class, com.google.protobuf.Field.Builder.class);
  }

  /**
   * Protobuf enum {@code google.protobuf.Field.Kind}
   */
  public enum Kind
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * TYPE_UNKNOWN = 0;
     */
    TYPE_UNKNOWN(0),
    /**
     * TYPE_DOUBLE = 1;
     */
    TYPE_DOUBLE(1),
    /**
     * TYPE_FLOAT = 2;
     */
    TYPE_FLOAT(2),
    /**
     * TYPE_INT64 = 3;
     */
    TYPE_INT64(3),
    /**
     * TYPE_UINT64 = 4;
     */
    TYPE_UINT64(4),
    /**
     * TYPE_INT32 = 5;
     */
    TYPE_INT32(5),
    /**
     * TYPE_FIXED64 = 6;
     */
    TYPE_FIXED64(6),
    /**
     * TYPE_FIXED32 = 7;
     */
    TYPE_FIXED32(7),
    /**
     * TYPE_BOOL = 8;
     */
    TYPE_BOOL(8),
    /**
     * TYPE_STRING = 9;
     */
    TYPE_STRING(9),
    /**
     * TYPE_GROUP = 10;
     */
    TYPE_GROUP(10),
    /**
     * TYPE_MESSAGE = 11;
     */
    TYPE_MESSAGE(11),
    /**
     * TYPE_BYTES = 12;
     */
    TYPE_BYTES(12),
    /**
     * TYPE_UINT32 = 13;
     */
    TYPE_UINT32(13),
    /**
     * TYPE_ENUM = 14;
     */
    TYPE_ENUM(14),
    /**
     * TYPE_SFIXED32 = 15;
     */
    TYPE_SFIXED32(15),
    /**
     * TYPE_SFIXED64 = 16;
     */
    TYPE_SFIXED64(16),
    /**
     * TYPE_SINT32 = 17;
     */
    TYPE_SINT32(17),
    /**
     * TYPE_SINT64 = 18;
     */
    TYPE_SINT64(18),
    UNRECOGNIZED(-1),
    ;

    static {
      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
        /* major= */ 4,
        /* minor= */ 28,
        /* patch= */ 0,
        /* suffix= */ "-rc3",
        Kind.class.getName());
    }
    /**
     * TYPE_UNKNOWN = 0;
     */
    public static final int TYPE_UNKNOWN_VALUE = 0;
    /**
     * TYPE_DOUBLE = 1;
     */
    public static final int TYPE_DOUBLE_VALUE = 1;
    /**
     * TYPE_FLOAT = 2;
     */
    public static final int TYPE_FLOAT_VALUE = 2;
    /**
     * TYPE_INT64 = 3;
     */
    public static final int TYPE_INT64_VALUE = 3;
    /**
     * TYPE_UINT64 = 4;
     */
    public static final int TYPE_UINT64_VALUE = 4;
    /**
     * TYPE_INT32 = 5;
     */
    public static final int TYPE_INT32_VALUE = 5;
    /**
     * TYPE_FIXED64 = 6;
     */
    public static final int TYPE_FIXED64_VALUE = 6;
    /**
     * TYPE_FIXED32 = 7;
     */
    public static final int TYPE_FIXED32_VALUE = 7;
    /**
     * TYPE_BOOL = 8;
     */
    public static final int TYPE_BOOL_VALUE = 8;
    /**
     * TYPE_STRING = 9;
     */
    public static final int TYPE_STRING_VALUE = 9;
    /**
     * TYPE_GROUP = 10;
     */
    public static final int TYPE_GROUP_VALUE = 10;
    /**
     * TYPE_MESSAGE = 11;
     */
    public static final int TYPE_MESSAGE_VALUE = 11;
    /**
     * TYPE_BYTES = 12;
     */
    public static final int TYPE_BYTES_VALUE = 12;
    /**
     * TYPE_UINT32 = 13;
     */
    public static final int TYPE_UINT32_VALUE = 13;
    /**
     * TYPE_ENUM = 14;
     */
    public static final int TYPE_ENUM_VALUE = 14;
    /**
     * TYPE_SFIXED32 = 15;
     */
    public static final int TYPE_SFIXED32_VALUE = 15;
    /**
     * TYPE_SFIXED64 = 16;
     */
    public static final int TYPE_SFIXED64_VALUE = 16;
    /**
     * TYPE_SINT32 = 17;
     */
    public static final int TYPE_SINT32_VALUE = 17;
    /**
     * TYPE_SINT64 = 18;
     */
    public static final int TYPE_SINT64_VALUE = 18;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Kind valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Kind forNumber(int value) {
      switch (value) {
        case 0: return TYPE_UNKNOWN;
        case 1: return TYPE_DOUBLE;
        case 2: return TYPE_FLOAT;
        case 3: return TYPE_INT64;
        case 4: return TYPE_UINT64;
        case 5: return TYPE_INT32;
        case 6: return TYPE_FIXED64;
        case 7: return TYPE_FIXED32;
        case 8: return TYPE_BOOL;
        case 9: return TYPE_STRING;
        case 10: return TYPE_GROUP;
        case 11: return TYPE_MESSAGE;
        case 12: return TYPE_BYTES;
        case 13: return TYPE_UINT32;
        case 14: return TYPE_ENUM;
        case 15: return TYPE_SFIXED32;
        case 16: return TYPE_SFIXED64;
        case 17: return TYPE_SINT32;
        case 18: return TYPE_SINT64;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        Kind> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            public Kind findValueByNumber(int number) {
              return Kind.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return com.google.protobuf.Field.getDescriptor().getEnumTypes().get(0);
    }

    private static final Kind[] VALUES = values();

    public static Kind valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Kind(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.protobuf.Field.Kind)
  }

  /**
   * Protobuf enum {@code google.protobuf.Field.Cardinality}
   */
  public enum Cardinality
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * CARDINALITY_UNKNOWN = 0;
     */
    CARDINALITY_UNKNOWN(0),
    /**
     * CARDINALITY_OPTIONAL = 1;
     */
    CARDINALITY_OPTIONAL(1),
    /**
     * CARDINALITY_REQUIRED = 2;
     */
    CARDINALITY_REQUIRED(2),
    /**
     * CARDINALITY_REPEATED = 3;
     */
    CARDINALITY_REPEATED(3),
    UNRECOGNIZED(-1),
    ;

    static {
      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
        /* major= */ 4,
        /* minor= */ 28,
        /* patch= */ 0,
        /* suffix= */ "-rc3",
        Cardinality.class.getName());
    }
    /**
     * CARDINALITY_UNKNOWN = 0;
     */
    public static final int CARDINALITY_UNKNOWN_VALUE = 0;
    /**
     * CARDINALITY_OPTIONAL = 1;
     */
    public static final int CARDINALITY_OPTIONAL_VALUE = 1;
    /**
     * CARDINALITY_REQUIRED = 2;
     */
    public static final int CARDINALITY_REQUIRED_VALUE = 2;
    /**
     * CARDINALITY_REPEATED = 3;
     */
    public static final int CARDINALITY_REPEATED_VALUE = 3;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Cardinality valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Cardinality forNumber(int value) {
      switch (value) {
        case 0: return CARDINALITY_UNKNOWN;
        case 1: return CARDINALITY_OPTIONAL;
        case 2: return CARDINALITY_REQUIRED;
        case 3: return CARDINALITY_REPEATED;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        Cardinality> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            public Cardinality findValueByNumber(int number) {
              return Cardinality.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return com.google.protobuf.Field.getDescriptor().getEnumTypes().get(1);
    }

    private static final Cardinality[] VALUES = values();

    public static Cardinality valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Cardinality(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.protobuf.Field.Cardinality)
  }

  public static final int KIND_FIELD_NUMBER = 1;
  private int kind_ = 0;
  /**
   * .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
   * @return The enum numeric value on the wire for kind.
   */
  @java.lang.Override public int getKindValue() {
    return kind_;
  }
  /**
   * .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
   * @return The kind.
   */
  @java.lang.Override public com.google.protobuf.Field.Kind getKind() {
    com.google.protobuf.Field.Kind result = com.google.protobuf.Field.Kind.forNumber(kind_);
    return result == null ? com.google.protobuf.Field.Kind.UNRECOGNIZED : result;
  }

  public static final int CARDINALITY_FIELD_NUMBER = 2;
  private int cardinality_ = 0;
  /**
   * .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
   * @return The enum numeric value on the wire for cardinality.
   */
  @java.lang.Override public int getCardinalityValue() {
    return cardinality_;
  }
  /**
   * .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
   * @return The cardinality.
   */
  @java.lang.Override public com.google.protobuf.Field.Cardinality getCardinality() {
    com.google.protobuf.Field.Cardinality result = com.google.protobuf.Field.Cardinality.forNumber(cardinality_);
    return result == null ? com.google.protobuf.Field.Cardinality.UNRECOGNIZED : result;
  }

  public static final int NUMBER_FIELD_NUMBER = 3;
  private int number_ = 0;
  /**
   * int32 number = 3 [json_name = "number"];
   * @return The number.
   */
  @java.lang.Override
  public int getNumber() {
    return number_;
  }

  public static final int NAME_FIELD_NUMBER = 4;
  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   * string name = 4 [json_name = "name"];
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   * string name = 4 [json_name = "name"];
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TYPE_URL_FIELD_NUMBER = 6;
  @SuppressWarnings("serial")
  private volatile java.lang.Object typeUrl_ = "";
  /**
   * string type_url = 6 [json_name = "typeUrl"];
   * @return The typeUrl.
   */
  @java.lang.Override
  public java.lang.String getTypeUrl() {
    java.lang.Object ref = typeUrl_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      typeUrl_ = s;
      return s;
    }
  }
  /**
   * string type_url = 6 [json_name = "typeUrl"];
   * @return The bytes for typeUrl.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getTypeUrlBytes() {
    java.lang.Object ref = typeUrl_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      typeUrl_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ONEOF_INDEX_FIELD_NUMBER = 7;
  private int oneofIndex_ = 0;
  /**
   * int32 oneof_index = 7 [json_name = "oneofIndex"];
   * @return The oneofIndex.
   */
  @java.lang.Override
  public int getOneofIndex() {
    return oneofIndex_;
  }

  public static final int PACKED_FIELD_NUMBER = 8;
  private boolean packed_ = false;
  /**
   * bool packed = 8 [json_name = "packed"];
   * @return The packed.
   */
  @java.lang.Override
  public boolean getPacked() {
    return packed_;
  }

  public static final int OPTIONS_FIELD_NUMBER = 9;
  @SuppressWarnings("serial")
  private java.util.List options_;
  /**
   * repeated .google.protobuf.Option options = 9 [json_name = "options"];
   */
  @java.lang.Override
  public java.util.List getOptionsList() {
    return options_;
  }
  /**
   * repeated .google.protobuf.Option options = 9 [json_name = "options"];
   */
  @java.lang.Override
  public java.util.List 
      getOptionsOrBuilderList() {
    return options_;
  }
  /**
   * repeated .google.protobuf.Option options = 9 [json_name = "options"];
   */
  @java.lang.Override
  public int getOptionsCount() {
    return options_.size();
  }
  /**
   * repeated .google.protobuf.Option options = 9 [json_name = "options"];
   */
  @java.lang.Override
  public com.google.protobuf.Option getOptions(int index) {
    return options_.get(index);
  }
  /**
   * repeated .google.protobuf.Option options = 9 [json_name = "options"];
   */
  @java.lang.Override
  public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder(
      int index) {
    return options_.get(index);
  }

  public static final int JSON_NAME_FIELD_NUMBER = 10;
  @SuppressWarnings("serial")
  private volatile java.lang.Object jsonName_ = "";
  /**
   * string json_name = 10 [json_name = "jsonName"];
   * @return The jsonName.
   */
  @java.lang.Override
  public java.lang.String getJsonName() {
    java.lang.Object ref = jsonName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      jsonName_ = s;
      return s;
    }
  }
  /**
   * string json_name = 10 [json_name = "jsonName"];
   * @return The bytes for jsonName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getJsonNameBytes() {
    java.lang.Object ref = jsonName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      jsonName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEFAULT_VALUE_FIELD_NUMBER = 11;
  @SuppressWarnings("serial")
  private volatile java.lang.Object defaultValue_ = "";
  /**
   * string default_value = 11 [json_name = "defaultValue"];
   * @return The defaultValue.
   */
  @java.lang.Override
  public java.lang.String getDefaultValue() {
    java.lang.Object ref = defaultValue_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      defaultValue_ = s;
      return s;
    }
  }
  /**
   * string default_value = 11 [json_name = "defaultValue"];
   * @return The bytes for defaultValue.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDefaultValueBytes() {
    java.lang.Object ref = defaultValue_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      defaultValue_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (kind_ != com.google.protobuf.Field.Kind.TYPE_UNKNOWN.getNumber()) {
      output.writeEnum(1, kind_);
    }
    if (cardinality_ != com.google.protobuf.Field.Cardinality.CARDINALITY_UNKNOWN.getNumber()) {
      output.writeEnum(2, cardinality_);
    }
    if (number_ != 0) {
      output.writeInt32(3, number_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 4, name_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeUrl_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 6, typeUrl_);
    }
    if (oneofIndex_ != 0) {
      output.writeInt32(7, oneofIndex_);
    }
    if (packed_ != false) {
      output.writeBool(8, packed_);
    }
    for (int i = 0; i < options_.size(); i++) {
      output.writeMessage(9, options_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(jsonName_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 10, jsonName_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultValue_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 11, defaultValue_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (kind_ != com.google.protobuf.Field.Kind.TYPE_UNKNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(1, kind_);
    }
    if (cardinality_ != com.google.protobuf.Field.Cardinality.CARDINALITY_UNKNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(2, cardinality_);
    }
    if (number_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, number_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(typeUrl_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(6, typeUrl_);
    }
    if (oneofIndex_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(7, oneofIndex_);
    }
    if (packed_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(8, packed_);
    }
    for (int i = 0; i < options_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, options_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(jsonName_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(10, jsonName_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultValue_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(11, defaultValue_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.google.protobuf.Field)) {
      return super.equals(obj);
    }
    com.google.protobuf.Field other = (com.google.protobuf.Field) obj;

    if (kind_ != other.kind_) return false;
    if (cardinality_ != other.cardinality_) return false;
    if (getNumber()
        != other.getNumber()) return false;
    if (!getName()
        .equals(other.getName())) return false;
    if (!getTypeUrl()
        .equals(other.getTypeUrl())) return false;
    if (getOneofIndex()
        != other.getOneofIndex()) return false;
    if (getPacked()
        != other.getPacked()) return false;
    if (!getOptionsList()
        .equals(other.getOptionsList())) return false;
    if (!getJsonName()
        .equals(other.getJsonName())) return false;
    if (!getDefaultValue()
        .equals(other.getDefaultValue())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + KIND_FIELD_NUMBER;
    hash = (53 * hash) + kind_;
    hash = (37 * hash) + CARDINALITY_FIELD_NUMBER;
    hash = (53 * hash) + cardinality_;
    hash = (37 * hash) + NUMBER_FIELD_NUMBER;
    hash = (53 * hash) + getNumber();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + TYPE_URL_FIELD_NUMBER;
    hash = (53 * hash) + getTypeUrl().hashCode();
    hash = (37 * hash) + ONEOF_INDEX_FIELD_NUMBER;
    hash = (53 * hash) + getOneofIndex();
    hash = (37 * hash) + PACKED_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getPacked());
    if (getOptionsCount() > 0) {
      hash = (37 * hash) + OPTIONS_FIELD_NUMBER;
      hash = (53 * hash) + getOptionsList().hashCode();
    }
    hash = (37 * hash) + JSON_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getJsonName().hashCode();
    hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER;
    hash = (53 * hash) + getDefaultValue().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.protobuf.Field parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.protobuf.Field parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.protobuf.Field parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.protobuf.Field parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.protobuf.Field parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.protobuf.Field parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.protobuf.Field parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static com.google.protobuf.Field parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static com.google.protobuf.Field parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.protobuf.Field parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.google.protobuf.Field parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static com.google.protobuf.Field parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.protobuf.Field prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code google.protobuf.Field}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder implements
      // @@protoc_insertion_point(builder_implements:google.protobuf.Field)
      com.google.protobuf.FieldOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.protobuf.Field.class, com.google.protobuf.Field.Builder.class);
    }

    // Construct using com.google.protobuf.Field.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      kind_ = 0;
      cardinality_ = 0;
      number_ = 0;
      name_ = "";
      typeUrl_ = "";
      oneofIndex_ = 0;
      packed_ = false;
      if (optionsBuilder_ == null) {
        options_ = java.util.Collections.emptyList();
      } else {
        options_ = null;
        optionsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000080);
      jsonName_ = "";
      defaultValue_ = "";
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.protobuf.TypeProto.internal_static_google_protobuf_Field_descriptor;
    }

    @java.lang.Override
    public com.google.protobuf.Field getDefaultInstanceForType() {
      return com.google.protobuf.Field.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.protobuf.Field build() {
      com.google.protobuf.Field result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.protobuf.Field buildPartial() {
      com.google.protobuf.Field result = new com.google.protobuf.Field(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(com.google.protobuf.Field result) {
      if (optionsBuilder_ == null) {
        if (((bitField0_ & 0x00000080) != 0)) {
          options_ = java.util.Collections.unmodifiableList(options_);
          bitField0_ = (bitField0_ & ~0x00000080);
        }
        result.options_ = options_;
      } else {
        result.options_ = optionsBuilder_.build();
      }
    }

    private void buildPartial0(com.google.protobuf.Field result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.kind_ = kind_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.cardinality_ = cardinality_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.number_ = number_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.typeUrl_ = typeUrl_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.oneofIndex_ = oneofIndex_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.packed_ = packed_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.jsonName_ = jsonName_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.defaultValue_ = defaultValue_;
      }
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.protobuf.Field) {
        return mergeFrom((com.google.protobuf.Field)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.protobuf.Field other) {
      if (other == com.google.protobuf.Field.getDefaultInstance()) return this;
      if (other.kind_ != 0) {
        setKindValue(other.getKindValue());
      }
      if (other.cardinality_ != 0) {
        setCardinalityValue(other.getCardinalityValue());
      }
      if (other.getNumber() != 0) {
        setNumber(other.getNumber());
      }
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (!other.getTypeUrl().isEmpty()) {
        typeUrl_ = other.typeUrl_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      if (other.getOneofIndex() != 0) {
        setOneofIndex(other.getOneofIndex());
      }
      if (other.getPacked() != false) {
        setPacked(other.getPacked());
      }
      if (optionsBuilder_ == null) {
        if (!other.options_.isEmpty()) {
          if (options_.isEmpty()) {
            options_ = other.options_;
            bitField0_ = (bitField0_ & ~0x00000080);
          } else {
            ensureOptionsIsMutable();
            options_.addAll(other.options_);
          }
          onChanged();
        }
      } else {
        if (!other.options_.isEmpty()) {
          if (optionsBuilder_.isEmpty()) {
            optionsBuilder_.dispose();
            optionsBuilder_ = null;
            options_ = other.options_;
            bitField0_ = (bitField0_ & ~0x00000080);
            optionsBuilder_ = 
              com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                 getOptionsFieldBuilder() : null;
          } else {
            optionsBuilder_.addAllMessages(other.options_);
          }
        }
      }
      if (!other.getJsonName().isEmpty()) {
        jsonName_ = other.jsonName_;
        bitField0_ |= 0x00000100;
        onChanged();
      }
      if (!other.getDefaultValue().isEmpty()) {
        defaultValue_ = other.defaultValue_;
        bitField0_ |= 0x00000200;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              kind_ = input.readEnum();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 16: {
              cardinality_ = input.readEnum();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 24: {
              number_ = input.readInt32();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 34: {
              name_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000008;
              break;
            } // case 34
            case 50: {
              typeUrl_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000010;
              break;
            } // case 50
            case 56: {
              oneofIndex_ = input.readInt32();
              bitField0_ |= 0x00000020;
              break;
            } // case 56
            case 64: {
              packed_ = input.readBool();
              bitField0_ |= 0x00000040;
              break;
            } // case 64
            case 74: {
              com.google.protobuf.Option m =
                  input.readMessage(
                      com.google.protobuf.Option.parser(),
                      extensionRegistry);
              if (optionsBuilder_ == null) {
                ensureOptionsIsMutable();
                options_.add(m);
              } else {
                optionsBuilder_.addMessage(m);
              }
              break;
            } // case 74
            case 82: {
              jsonName_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000100;
              break;
            } // case 82
            case 90: {
              defaultValue_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000200;
              break;
            } // case 90
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private int kind_ = 0;
    /**
     * .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
     * @return The enum numeric value on the wire for kind.
     */
    @java.lang.Override public int getKindValue() {
      return kind_;
    }
    /**
     * .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
     * @param value The enum numeric value on the wire for kind to set.
     * @return This builder for chaining.
     */
    public Builder setKindValue(int value) {
      kind_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
     * @return The kind.
     */
    @java.lang.Override
    public com.google.protobuf.Field.Kind getKind() {
      com.google.protobuf.Field.Kind result = com.google.protobuf.Field.Kind.forNumber(kind_);
      return result == null ? com.google.protobuf.Field.Kind.UNRECOGNIZED : result;
    }
    /**
     * .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
     * @param value The kind to set.
     * @return This builder for chaining.
     */
    public Builder setKind(com.google.protobuf.Field.Kind value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      kind_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
     * @return This builder for chaining.
     */
    public Builder clearKind() {
      bitField0_ = (bitField0_ & ~0x00000001);
      kind_ = 0;
      onChanged();
      return this;
    }

    private int cardinality_ = 0;
    /**
     * .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
     * @return The enum numeric value on the wire for cardinality.
     */
    @java.lang.Override public int getCardinalityValue() {
      return cardinality_;
    }
    /**
     * .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
     * @param value The enum numeric value on the wire for cardinality to set.
     * @return This builder for chaining.
     */
    public Builder setCardinalityValue(int value) {
      cardinality_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
     * @return The cardinality.
     */
    @java.lang.Override
    public com.google.protobuf.Field.Cardinality getCardinality() {
      com.google.protobuf.Field.Cardinality result = com.google.protobuf.Field.Cardinality.forNumber(cardinality_);
      return result == null ? com.google.protobuf.Field.Cardinality.UNRECOGNIZED : result;
    }
    /**
     * .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
     * @param value The cardinality to set.
     * @return This builder for chaining.
     */
    public Builder setCardinality(com.google.protobuf.Field.Cardinality value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000002;
      cardinality_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
     * @return This builder for chaining.
     */
    public Builder clearCardinality() {
      bitField0_ = (bitField0_ & ~0x00000002);
      cardinality_ = 0;
      onChanged();
      return this;
    }

    private int number_ ;
    /**
     * int32 number = 3 [json_name = "number"];
     * @return The number.
     */
    @java.lang.Override
    public int getNumber() {
      return number_;
    }
    /**
     * int32 number = 3 [json_name = "number"];
     * @param value The number to set.
     * @return This builder for chaining.
     */
    public Builder setNumber(int value) {

      number_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * int32 number = 3 [json_name = "number"];
     * @return This builder for chaining.
     */
    public Builder clearNumber() {
      bitField0_ = (bitField0_ & ~0x00000004);
      number_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object name_ = "";
    /**
     * string name = 4 [json_name = "name"];
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string name = 4 [json_name = "name"];
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string name = 4 [json_name = "name"];
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      name_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * string name = 4 [json_name = "name"];
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     * string name = 4 [json_name = "name"];
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private java.lang.Object typeUrl_ = "";
    /**
     * string type_url = 6 [json_name = "typeUrl"];
     * @return The typeUrl.
     */
    public java.lang.String getTypeUrl() {
      java.lang.Object ref = typeUrl_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        typeUrl_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string type_url = 6 [json_name = "typeUrl"];
     * @return The bytes for typeUrl.
     */
    public com.google.protobuf.ByteString
        getTypeUrlBytes() {
      java.lang.Object ref = typeUrl_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        typeUrl_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string type_url = 6 [json_name = "typeUrl"];
     * @param value The typeUrl to set.
     * @return This builder for chaining.
     */
    public Builder setTypeUrl(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      typeUrl_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * string type_url = 6 [json_name = "typeUrl"];
     * @return This builder for chaining.
     */
    public Builder clearTypeUrl() {
      typeUrl_ = getDefaultInstance().getTypeUrl();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     * string type_url = 6 [json_name = "typeUrl"];
     * @param value The bytes for typeUrl to set.
     * @return This builder for chaining.
     */
    public Builder setTypeUrlBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      typeUrl_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    private int oneofIndex_ ;
    /**
     * int32 oneof_index = 7 [json_name = "oneofIndex"];
     * @return The oneofIndex.
     */
    @java.lang.Override
    public int getOneofIndex() {
      return oneofIndex_;
    }
    /**
     * int32 oneof_index = 7 [json_name = "oneofIndex"];
     * @param value The oneofIndex to set.
     * @return This builder for chaining.
     */
    public Builder setOneofIndex(int value) {

      oneofIndex_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * int32 oneof_index = 7 [json_name = "oneofIndex"];
     * @return This builder for chaining.
     */
    public Builder clearOneofIndex() {
      bitField0_ = (bitField0_ & ~0x00000020);
      oneofIndex_ = 0;
      onChanged();
      return this;
    }

    private boolean packed_ ;
    /**
     * bool packed = 8 [json_name = "packed"];
     * @return The packed.
     */
    @java.lang.Override
    public boolean getPacked() {
      return packed_;
    }
    /**
     * bool packed = 8 [json_name = "packed"];
     * @param value The packed to set.
     * @return This builder for chaining.
     */
    public Builder setPacked(boolean value) {

      packed_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * bool packed = 8 [json_name = "packed"];
     * @return This builder for chaining.
     */
    public Builder clearPacked() {
      bitField0_ = (bitField0_ & ~0x00000040);
      packed_ = false;
      onChanged();
      return this;
    }

    private java.util.List options_ =
      java.util.Collections.emptyList();
    private void ensureOptionsIsMutable() {
      if (!((bitField0_ & 0x00000080) != 0)) {
        options_ = new java.util.ArrayList(options_);
        bitField0_ |= 0x00000080;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilder<
        com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> optionsBuilder_;

    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public java.util.List getOptionsList() {
      if (optionsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(options_);
      } else {
        return optionsBuilder_.getMessageList();
      }
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public int getOptionsCount() {
      if (optionsBuilder_ == null) {
        return options_.size();
      } else {
        return optionsBuilder_.getCount();
      }
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public com.google.protobuf.Option getOptions(int index) {
      if (optionsBuilder_ == null) {
        return options_.get(index);
      } else {
        return optionsBuilder_.getMessage(index);
      }
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder setOptions(
        int index, com.google.protobuf.Option value) {
      if (optionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOptionsIsMutable();
        options_.set(index, value);
        onChanged();
      } else {
        optionsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder setOptions(
        int index, com.google.protobuf.Option.Builder builderForValue) {
      if (optionsBuilder_ == null) {
        ensureOptionsIsMutable();
        options_.set(index, builderForValue.build());
        onChanged();
      } else {
        optionsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder addOptions(com.google.protobuf.Option value) {
      if (optionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOptionsIsMutable();
        options_.add(value);
        onChanged();
      } else {
        optionsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder addOptions(
        int index, com.google.protobuf.Option value) {
      if (optionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOptionsIsMutable();
        options_.add(index, value);
        onChanged();
      } else {
        optionsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder addOptions(
        com.google.protobuf.Option.Builder builderForValue) {
      if (optionsBuilder_ == null) {
        ensureOptionsIsMutable();
        options_.add(builderForValue.build());
        onChanged();
      } else {
        optionsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder addOptions(
        int index, com.google.protobuf.Option.Builder builderForValue) {
      if (optionsBuilder_ == null) {
        ensureOptionsIsMutable();
        options_.add(index, builderForValue.build());
        onChanged();
      } else {
        optionsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder addAllOptions(
        java.lang.Iterable values) {
      if (optionsBuilder_ == null) {
        ensureOptionsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, options_);
        onChanged();
      } else {
        optionsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder clearOptions() {
      if (optionsBuilder_ == null) {
        options_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000080);
        onChanged();
      } else {
        optionsBuilder_.clear();
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public Builder removeOptions(int index) {
      if (optionsBuilder_ == null) {
        ensureOptionsIsMutable();
        options_.remove(index);
        onChanged();
      } else {
        optionsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public com.google.protobuf.Option.Builder getOptionsBuilder(
        int index) {
      return getOptionsFieldBuilder().getBuilder(index);
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder(
        int index) {
      if (optionsBuilder_ == null) {
        return options_.get(index);  } else {
        return optionsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public java.util.List 
         getOptionsOrBuilderList() {
      if (optionsBuilder_ != null) {
        return optionsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(options_);
      }
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public com.google.protobuf.Option.Builder addOptionsBuilder() {
      return getOptionsFieldBuilder().addBuilder(
          com.google.protobuf.Option.getDefaultInstance());
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public com.google.protobuf.Option.Builder addOptionsBuilder(
        int index) {
      return getOptionsFieldBuilder().addBuilder(
          index, com.google.protobuf.Option.getDefaultInstance());
    }
    /**
     * repeated .google.protobuf.Option options = 9 [json_name = "options"];
     */
    public java.util.List 
         getOptionsBuilderList() {
      return getOptionsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilder<
        com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder> 
        getOptionsFieldBuilder() {
      if (optionsBuilder_ == null) {
        optionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
            com.google.protobuf.Option, com.google.protobuf.Option.Builder, com.google.protobuf.OptionOrBuilder>(
                options_,
                ((bitField0_ & 0x00000080) != 0),
                getParentForChildren(),
                isClean());
        options_ = null;
      }
      return optionsBuilder_;
    }

    private java.lang.Object jsonName_ = "";
    /**
     * string json_name = 10 [json_name = "jsonName"];
     * @return The jsonName.
     */
    public java.lang.String getJsonName() {
      java.lang.Object ref = jsonName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        jsonName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string json_name = 10 [json_name = "jsonName"];
     * @return The bytes for jsonName.
     */
    public com.google.protobuf.ByteString
        getJsonNameBytes() {
      java.lang.Object ref = jsonName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        jsonName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string json_name = 10 [json_name = "jsonName"];
     * @param value The jsonName to set.
     * @return This builder for chaining.
     */
    public Builder setJsonName(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      jsonName_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     * string json_name = 10 [json_name = "jsonName"];
     * @return This builder for chaining.
     */
    public Builder clearJsonName() {
      jsonName_ = getDefaultInstance().getJsonName();
      bitField0_ = (bitField0_ & ~0x00000100);
      onChanged();
      return this;
    }
    /**
     * string json_name = 10 [json_name = "jsonName"];
     * @param value The bytes for jsonName to set.
     * @return This builder for chaining.
     */
    public Builder setJsonNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      jsonName_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }

    private java.lang.Object defaultValue_ = "";
    /**
     * string default_value = 11 [json_name = "defaultValue"];
     * @return The defaultValue.
     */
    public java.lang.String getDefaultValue() {
      java.lang.Object ref = defaultValue_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        defaultValue_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string default_value = 11 [json_name = "defaultValue"];
     * @return The bytes for defaultValue.
     */
    public com.google.protobuf.ByteString
        getDefaultValueBytes() {
      java.lang.Object ref = defaultValue_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        defaultValue_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string default_value = 11 [json_name = "defaultValue"];
     * @param value The defaultValue to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultValue(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      defaultValue_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     * string default_value = 11 [json_name = "defaultValue"];
     * @return This builder for chaining.
     */
    public Builder clearDefaultValue() {
      defaultValue_ = getDefaultInstance().getDefaultValue();
      bitField0_ = (bitField0_ & ~0x00000200);
      onChanged();
      return this;
    }
    /**
     * string default_value = 11 [json_name = "defaultValue"];
     * @param value The bytes for defaultValue to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultValueBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      defaultValue_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:google.protobuf.Field)
  }

  // @@protoc_insertion_point(class_scope:google.protobuf.Field)
  private static final com.google.protobuf.Field DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.protobuf.Field();
  }

  public static com.google.protobuf.Field getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public Field parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Field getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy