// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tribuo-onnx.proto

package org.tribuo.interop.onnx.protos;

/**
 * <pre>
 *ONNXExternalModel proto
 * </pre>
 *
 * Protobuf type {@code tribuo.interop.onnx.ONNXExternalModelProto}
 */
public final class ONNXExternalModelProto extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tribuo.interop.onnx.ONNXExternalModelProto)
    ONNXExternalModelProtoOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ONNXExternalModelProto.newBuilder() to construct.
  private ONNXExternalModelProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ONNXExternalModelProto() {
    forwardFeatureMapping_ = emptyIntList();
    backwardFeatureMapping_ = emptyIntList();
    modelArray_ = com.google.protobuf.ByteString.EMPTY;
    inputName_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new ONNXExternalModelProto();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ONNXExternalModelProto(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            org.tribuo.protos.core.ModelDataProto.Builder subBuilder = null;
            if (metadata_ != null) {
              subBuilder = metadata_.toBuilder();
            }
            metadata_ = input.readMessage(org.tribuo.protos.core.ModelDataProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(metadata_);
              metadata_ = subBuilder.buildPartial();
            }

            break;
          }
          case 16: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              forwardFeatureMapping_ = newIntList();
              mutable_bitField0_ |= 0x00000001;
            }
            forwardFeatureMapping_.addInt(input.readInt32());
            break;
          }
          case 18: {
            int length = input.readRawVarint32();
            int limit = input.pushLimit(length);
            if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
              forwardFeatureMapping_ = newIntList();
              mutable_bitField0_ |= 0x00000001;
            }
            while (input.getBytesUntilLimit() > 0) {
              forwardFeatureMapping_.addInt(input.readInt32());
            }
            input.popLimit(limit);
            break;
          }
          case 24: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              backwardFeatureMapping_ = newIntList();
              mutable_bitField0_ |= 0x00000002;
            }
            backwardFeatureMapping_.addInt(input.readInt32());
            break;
          }
          case 26: {
            int length = input.readRawVarint32();
            int limit = input.pushLimit(length);
            if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
              backwardFeatureMapping_ = newIntList();
              mutable_bitField0_ |= 0x00000002;
            }
            while (input.getBytesUntilLimit() > 0) {
              backwardFeatureMapping_.addInt(input.readInt32());
            }
            input.popLimit(limit);
            break;
          }
          case 34: {

            modelArray_ = input.readBytes();
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

            inputName_ = s;
            break;
          }
          case 50: {
            org.tribuo.interop.onnx.protos.OutputTransformerProto.Builder subBuilder = null;
            if (outputTransformer_ != null) {
              subBuilder = outputTransformer_.toBuilder();
            }
            outputTransformer_ = input.readMessage(org.tribuo.interop.onnx.protos.OutputTransformerProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(outputTransformer_);
              outputTransformer_ = subBuilder.buildPartial();
            }

            break;
          }
          case 58: {
            org.tribuo.interop.onnx.protos.ExampleTransformerProto.Builder subBuilder = null;
            if (exampleTransformer_ != null) {
              subBuilder = exampleTransformer_.toBuilder();
            }
            exampleTransformer_ = input.readMessage(org.tribuo.interop.onnx.protos.ExampleTransformerProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(exampleTransformer_);
              exampleTransformer_ = subBuilder.buildPartial();
            }

            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        forwardFeatureMapping_.makeImmutable(); // C
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        backwardFeatureMapping_.makeImmutable(); // C
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tribuo.interop.onnx.protos.TribuoOnnx.internal_static_tribuo_interop_onnx_ONNXExternalModelProto_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tribuo.interop.onnx.protos.TribuoOnnx.internal_static_tribuo_interop_onnx_ONNXExternalModelProto_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tribuo.interop.onnx.protos.ONNXExternalModelProto.class, org.tribuo.interop.onnx.protos.ONNXExternalModelProto.Builder.class);
  }

  public static final int METADATA_FIELD_NUMBER = 1;
  private org.tribuo.protos.core.ModelDataProto metadata_;
  /**
   * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
   * @return Whether the metadata field is set.
   */
  @java.lang.Override
  public boolean hasMetadata() {
    return metadata_ != null;
  }
  /**
   * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
   * @return The metadata.
   */
  @java.lang.Override
  public org.tribuo.protos.core.ModelDataProto getMetadata() {
    return metadata_ == null ? org.tribuo.protos.core.ModelDataProto.getDefaultInstance() : metadata_;
  }
  /**
   * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
   */
  @java.lang.Override
  public org.tribuo.protos.core.ModelDataProtoOrBuilder getMetadataOrBuilder() {
    return getMetadata();
  }

  public static final int FORWARD_FEATURE_MAPPING_FIELD_NUMBER = 2;
  private com.google.protobuf.Internal.IntList forwardFeatureMapping_;
  /**
   * <code>repeated int32 forward_feature_mapping = 2;</code>
   * @return A list containing the forwardFeatureMapping.
   */
  @java.lang.Override
  public java.util.List<java.lang.Integer>
      getForwardFeatureMappingList() {
    return forwardFeatureMapping_;
  }
  /**
   * <code>repeated int32 forward_feature_mapping = 2;</code>
   * @return The count of forwardFeatureMapping.
   */
  public int getForwardFeatureMappingCount() {
    return forwardFeatureMapping_.size();
  }
  /**
   * <code>repeated int32 forward_feature_mapping = 2;</code>
   * @param index The index of the element to return.
   * @return The forwardFeatureMapping at the given index.
   */
  public int getForwardFeatureMapping(int index) {
    return forwardFeatureMapping_.getInt(index);
  }
  private int forwardFeatureMappingMemoizedSerializedSize = -1;

  public static final int BACKWARD_FEATURE_MAPPING_FIELD_NUMBER = 3;
  private com.google.protobuf.Internal.IntList backwardFeatureMapping_;
  /**
   * <code>repeated int32 backward_feature_mapping = 3;</code>
   * @return A list containing the backwardFeatureMapping.
   */
  @java.lang.Override
  public java.util.List<java.lang.Integer>
      getBackwardFeatureMappingList() {
    return backwardFeatureMapping_;
  }
  /**
   * <code>repeated int32 backward_feature_mapping = 3;</code>
   * @return The count of backwardFeatureMapping.
   */
  public int getBackwardFeatureMappingCount() {
    return backwardFeatureMapping_.size();
  }
  /**
   * <code>repeated int32 backward_feature_mapping = 3;</code>
   * @param index The index of the element to return.
   * @return The backwardFeatureMapping at the given index.
   */
  public int getBackwardFeatureMapping(int index) {
    return backwardFeatureMapping_.getInt(index);
  }
  private int backwardFeatureMappingMemoizedSerializedSize = -1;

  public static final int MODEL_ARRAY_FIELD_NUMBER = 4;
  private com.google.protobuf.ByteString modelArray_;
  /**
   * <code>bytes model_array = 4;</code>
   * @return The modelArray.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getModelArray() {
    return modelArray_;
  }

  public static final int INPUT_NAME_FIELD_NUMBER = 5;
  private volatile java.lang.Object inputName_;
  /**
   * <code>string input_name = 5;</code>
   * @return The inputName.
   */
  @java.lang.Override
  public java.lang.String getInputName() {
    java.lang.Object ref = inputName_;
    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();
      inputName_ = s;
      return s;
    }
  }
  /**
   * <code>string input_name = 5;</code>
   * @return The bytes for inputName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getInputNameBytes() {
    java.lang.Object ref = inputName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      inputName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int OUTPUT_TRANSFORMER_FIELD_NUMBER = 6;
  private org.tribuo.interop.onnx.protos.OutputTransformerProto outputTransformer_;
  /**
   * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
   * @return Whether the outputTransformer field is set.
   */
  @java.lang.Override
  public boolean hasOutputTransformer() {
    return outputTransformer_ != null;
  }
  /**
   * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
   * @return The outputTransformer.
   */
  @java.lang.Override
  public org.tribuo.interop.onnx.protos.OutputTransformerProto getOutputTransformer() {
    return outputTransformer_ == null ? org.tribuo.interop.onnx.protos.OutputTransformerProto.getDefaultInstance() : outputTransformer_;
  }
  /**
   * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
   */
  @java.lang.Override
  public org.tribuo.interop.onnx.protos.OutputTransformerProtoOrBuilder getOutputTransformerOrBuilder() {
    return getOutputTransformer();
  }

  public static final int EXAMPLE_TRANSFORMER_FIELD_NUMBER = 7;
  private org.tribuo.interop.onnx.protos.ExampleTransformerProto exampleTransformer_;
  /**
   * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
   * @return Whether the exampleTransformer field is set.
   */
  @java.lang.Override
  public boolean hasExampleTransformer() {
    return exampleTransformer_ != null;
  }
  /**
   * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
   * @return The exampleTransformer.
   */
  @java.lang.Override
  public org.tribuo.interop.onnx.protos.ExampleTransformerProto getExampleTransformer() {
    return exampleTransformer_ == null ? org.tribuo.interop.onnx.protos.ExampleTransformerProto.getDefaultInstance() : exampleTransformer_;
  }
  /**
   * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
   */
  @java.lang.Override
  public org.tribuo.interop.onnx.protos.ExampleTransformerProtoOrBuilder getExampleTransformerOrBuilder() {
    return getExampleTransformer();
  }

  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 {
    getSerializedSize();
    if (metadata_ != null) {
      output.writeMessage(1, getMetadata());
    }
    if (getForwardFeatureMappingList().size() > 0) {
      output.writeUInt32NoTag(18);
      output.writeUInt32NoTag(forwardFeatureMappingMemoizedSerializedSize);
    }
    for (int i = 0; i < forwardFeatureMapping_.size(); i++) {
      output.writeInt32NoTag(forwardFeatureMapping_.getInt(i));
    }
    if (getBackwardFeatureMappingList().size() > 0) {
      output.writeUInt32NoTag(26);
      output.writeUInt32NoTag(backwardFeatureMappingMemoizedSerializedSize);
    }
    for (int i = 0; i < backwardFeatureMapping_.size(); i++) {
      output.writeInt32NoTag(backwardFeatureMapping_.getInt(i));
    }
    if (!modelArray_.isEmpty()) {
      output.writeBytes(4, modelArray_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, inputName_);
    }
    if (outputTransformer_ != null) {
      output.writeMessage(6, getOutputTransformer());
    }
    if (exampleTransformer_ != null) {
      output.writeMessage(7, getExampleTransformer());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (metadata_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getMetadata());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < forwardFeatureMapping_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeInt32SizeNoTag(forwardFeatureMapping_.getInt(i));
      }
      size += dataSize;
      if (!getForwardFeatureMappingList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(dataSize);
      }
      forwardFeatureMappingMemoizedSerializedSize = dataSize;
    }
    {
      int dataSize = 0;
      for (int i = 0; i < backwardFeatureMapping_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeInt32SizeNoTag(backwardFeatureMapping_.getInt(i));
      }
      size += dataSize;
      if (!getBackwardFeatureMappingList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(dataSize);
      }
      backwardFeatureMappingMemoizedSerializedSize = dataSize;
    }
    if (!modelArray_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(4, modelArray_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, inputName_);
    }
    if (outputTransformer_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, getOutputTransformer());
    }
    if (exampleTransformer_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, getExampleTransformer());
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof org.tribuo.interop.onnx.protos.ONNXExternalModelProto)) {
      return super.equals(obj);
    }
    org.tribuo.interop.onnx.protos.ONNXExternalModelProto other = (org.tribuo.interop.onnx.protos.ONNXExternalModelProto) obj;

    if (hasMetadata() != other.hasMetadata()) return false;
    if (hasMetadata()) {
      if (!getMetadata()
          .equals(other.getMetadata())) return false;
    }
    if (!getForwardFeatureMappingList()
        .equals(other.getForwardFeatureMappingList())) return false;
    if (!getBackwardFeatureMappingList()
        .equals(other.getBackwardFeatureMappingList())) return false;
    if (!getModelArray()
        .equals(other.getModelArray())) return false;
    if (!getInputName()
        .equals(other.getInputName())) return false;
    if (hasOutputTransformer() != other.hasOutputTransformer()) return false;
    if (hasOutputTransformer()) {
      if (!getOutputTransformer()
          .equals(other.getOutputTransformer())) return false;
    }
    if (hasExampleTransformer() != other.hasExampleTransformer()) return false;
    if (hasExampleTransformer()) {
      if (!getExampleTransformer()
          .equals(other.getExampleTransformer())) return false;
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasMetadata()) {
      hash = (37 * hash) + METADATA_FIELD_NUMBER;
      hash = (53 * hash) + getMetadata().hashCode();
    }
    if (getForwardFeatureMappingCount() > 0) {
      hash = (37 * hash) + FORWARD_FEATURE_MAPPING_FIELD_NUMBER;
      hash = (53 * hash) + getForwardFeatureMappingList().hashCode();
    }
    if (getBackwardFeatureMappingCount() > 0) {
      hash = (37 * hash) + BACKWARD_FEATURE_MAPPING_FIELD_NUMBER;
      hash = (53 * hash) + getBackwardFeatureMappingList().hashCode();
    }
    hash = (37 * hash) + MODEL_ARRAY_FIELD_NUMBER;
    hash = (53 * hash) + getModelArray().hashCode();
    hash = (37 * hash) + INPUT_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getInputName().hashCode();
    if (hasOutputTransformer()) {
      hash = (37 * hash) + OUTPUT_TRANSFORMER_FIELD_NUMBER;
      hash = (53 * hash) + getOutputTransformer().hashCode();
    }
    if (hasExampleTransformer()) {
      hash = (37 * hash) + EXAMPLE_TRANSFORMER_FIELD_NUMBER;
      hash = (53 * hash) + getExampleTransformer().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.tribuo.interop.onnx.protos.ONNXExternalModelProto 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.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   *ONNXExternalModel proto
   * </pre>
   *
   * Protobuf type {@code tribuo.interop.onnx.ONNXExternalModelProto}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tribuo.interop.onnx.ONNXExternalModelProto)
      org.tribuo.interop.onnx.protos.ONNXExternalModelProtoOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tribuo.interop.onnx.protos.TribuoOnnx.internal_static_tribuo_interop_onnx_ONNXExternalModelProto_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tribuo.interop.onnx.protos.TribuoOnnx.internal_static_tribuo_interop_onnx_ONNXExternalModelProto_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tribuo.interop.onnx.protos.ONNXExternalModelProto.class, org.tribuo.interop.onnx.protos.ONNXExternalModelProto.Builder.class);
    }

    // Construct using org.tribuo.interop.onnx.protos.ONNXExternalModelProto.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (metadataBuilder_ == null) {
        metadata_ = null;
      } else {
        metadata_ = null;
        metadataBuilder_ = null;
      }
      forwardFeatureMapping_ = emptyIntList();
      bitField0_ = (bitField0_ & ~0x00000001);
      backwardFeatureMapping_ = emptyIntList();
      bitField0_ = (bitField0_ & ~0x00000002);
      modelArray_ = com.google.protobuf.ByteString.EMPTY;

      inputName_ = "";

      if (outputTransformerBuilder_ == null) {
        outputTransformer_ = null;
      } else {
        outputTransformer_ = null;
        outputTransformerBuilder_ = null;
      }
      if (exampleTransformerBuilder_ == null) {
        exampleTransformer_ = null;
      } else {
        exampleTransformer_ = null;
        exampleTransformerBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tribuo.interop.onnx.protos.TribuoOnnx.internal_static_tribuo_interop_onnx_ONNXExternalModelProto_descriptor;
    }

    @java.lang.Override
    public org.tribuo.interop.onnx.protos.ONNXExternalModelProto getDefaultInstanceForType() {
      return org.tribuo.interop.onnx.protos.ONNXExternalModelProto.getDefaultInstance();
    }

    @java.lang.Override
    public org.tribuo.interop.onnx.protos.ONNXExternalModelProto build() {
      org.tribuo.interop.onnx.protos.ONNXExternalModelProto result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.tribuo.interop.onnx.protos.ONNXExternalModelProto buildPartial() {
      org.tribuo.interop.onnx.protos.ONNXExternalModelProto result = new org.tribuo.interop.onnx.protos.ONNXExternalModelProto(this);
      int from_bitField0_ = bitField0_;
      if (metadataBuilder_ == null) {
        result.metadata_ = metadata_;
      } else {
        result.metadata_ = metadataBuilder_.build();
      }
      if (((bitField0_ & 0x00000001) != 0)) {
        forwardFeatureMapping_.makeImmutable();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.forwardFeatureMapping_ = forwardFeatureMapping_;
      if (((bitField0_ & 0x00000002) != 0)) {
        backwardFeatureMapping_.makeImmutable();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.backwardFeatureMapping_ = backwardFeatureMapping_;
      result.modelArray_ = modelArray_;
      result.inputName_ = inputName_;
      if (outputTransformerBuilder_ == null) {
        result.outputTransformer_ = outputTransformer_;
      } else {
        result.outputTransformer_ = outputTransformerBuilder_.build();
      }
      if (exampleTransformerBuilder_ == null) {
        result.exampleTransformer_ = exampleTransformer_;
      } else {
        result.exampleTransformer_ = exampleTransformerBuilder_.build();
      }
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.tribuo.interop.onnx.protos.ONNXExternalModelProto) {
        return mergeFrom((org.tribuo.interop.onnx.protos.ONNXExternalModelProto)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tribuo.interop.onnx.protos.ONNXExternalModelProto other) {
      if (other == org.tribuo.interop.onnx.protos.ONNXExternalModelProto.getDefaultInstance()) return this;
      if (other.hasMetadata()) {
        mergeMetadata(other.getMetadata());
      }
      if (!other.forwardFeatureMapping_.isEmpty()) {
        if (forwardFeatureMapping_.isEmpty()) {
          forwardFeatureMapping_ = other.forwardFeatureMapping_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureForwardFeatureMappingIsMutable();
          forwardFeatureMapping_.addAll(other.forwardFeatureMapping_);
        }
        onChanged();
      }
      if (!other.backwardFeatureMapping_.isEmpty()) {
        if (backwardFeatureMapping_.isEmpty()) {
          backwardFeatureMapping_ = other.backwardFeatureMapping_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureBackwardFeatureMappingIsMutable();
          backwardFeatureMapping_.addAll(other.backwardFeatureMapping_);
        }
        onChanged();
      }
      if (other.getModelArray() != com.google.protobuf.ByteString.EMPTY) {
        setModelArray(other.getModelArray());
      }
      if (!other.getInputName().isEmpty()) {
        inputName_ = other.inputName_;
        onChanged();
      }
      if (other.hasOutputTransformer()) {
        mergeOutputTransformer(other.getOutputTransformer());
      }
      if (other.hasExampleTransformer()) {
        mergeExampleTransformer(other.getExampleTransformer());
      }
      this.mergeUnknownFields(other.unknownFields);
      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 {
      org.tribuo.interop.onnx.protos.ONNXExternalModelProto parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tribuo.interop.onnx.protos.ONNXExternalModelProto) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private org.tribuo.protos.core.ModelDataProto metadata_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tribuo.protos.core.ModelDataProto, org.tribuo.protos.core.ModelDataProto.Builder, org.tribuo.protos.core.ModelDataProtoOrBuilder> metadataBuilder_;
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     * @return Whether the metadata field is set.
     */
    public boolean hasMetadata() {
      return metadataBuilder_ != null || metadata_ != null;
    }
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     * @return The metadata.
     */
    public org.tribuo.protos.core.ModelDataProto getMetadata() {
      if (metadataBuilder_ == null) {
        return metadata_ == null ? org.tribuo.protos.core.ModelDataProto.getDefaultInstance() : metadata_;
      } else {
        return metadataBuilder_.getMessage();
      }
    }
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     */
    public Builder setMetadata(org.tribuo.protos.core.ModelDataProto value) {
      if (metadataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        metadata_ = value;
        onChanged();
      } else {
        metadataBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     */
    public Builder setMetadata(
        org.tribuo.protos.core.ModelDataProto.Builder builderForValue) {
      if (metadataBuilder_ == null) {
        metadata_ = builderForValue.build();
        onChanged();
      } else {
        metadataBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     */
    public Builder mergeMetadata(org.tribuo.protos.core.ModelDataProto value) {
      if (metadataBuilder_ == null) {
        if (metadata_ != null) {
          metadata_ =
            org.tribuo.protos.core.ModelDataProto.newBuilder(metadata_).mergeFrom(value).buildPartial();
        } else {
          metadata_ = value;
        }
        onChanged();
      } else {
        metadataBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     */
    public Builder clearMetadata() {
      if (metadataBuilder_ == null) {
        metadata_ = null;
        onChanged();
      } else {
        metadata_ = null;
        metadataBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     */
    public org.tribuo.protos.core.ModelDataProto.Builder getMetadataBuilder() {
      
      onChanged();
      return getMetadataFieldBuilder().getBuilder();
    }
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     */
    public org.tribuo.protos.core.ModelDataProtoOrBuilder getMetadataOrBuilder() {
      if (metadataBuilder_ != null) {
        return metadataBuilder_.getMessageOrBuilder();
      } else {
        return metadata_ == null ?
            org.tribuo.protos.core.ModelDataProto.getDefaultInstance() : metadata_;
      }
    }
    /**
     * <code>.tribuo.core.ModelDataProto metadata = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tribuo.protos.core.ModelDataProto, org.tribuo.protos.core.ModelDataProto.Builder, org.tribuo.protos.core.ModelDataProtoOrBuilder> 
        getMetadataFieldBuilder() {
      if (metadataBuilder_ == null) {
        metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tribuo.protos.core.ModelDataProto, org.tribuo.protos.core.ModelDataProto.Builder, org.tribuo.protos.core.ModelDataProtoOrBuilder>(
                getMetadata(),
                getParentForChildren(),
                isClean());
        metadata_ = null;
      }
      return metadataBuilder_;
    }

    private com.google.protobuf.Internal.IntList forwardFeatureMapping_ = emptyIntList();
    private void ensureForwardFeatureMappingIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        forwardFeatureMapping_ = mutableCopy(forwardFeatureMapping_);
        bitField0_ |= 0x00000001;
       }
    }
    /**
     * <code>repeated int32 forward_feature_mapping = 2;</code>
     * @return A list containing the forwardFeatureMapping.
     */
    public java.util.List<java.lang.Integer>
        getForwardFeatureMappingList() {
      return ((bitField0_ & 0x00000001) != 0) ?
               java.util.Collections.unmodifiableList(forwardFeatureMapping_) : forwardFeatureMapping_;
    }
    /**
     * <code>repeated int32 forward_feature_mapping = 2;</code>
     * @return The count of forwardFeatureMapping.
     */
    public int getForwardFeatureMappingCount() {
      return forwardFeatureMapping_.size();
    }
    /**
     * <code>repeated int32 forward_feature_mapping = 2;</code>
     * @param index The index of the element to return.
     * @return The forwardFeatureMapping at the given index.
     */
    public int getForwardFeatureMapping(int index) {
      return forwardFeatureMapping_.getInt(index);
    }
    /**
     * <code>repeated int32 forward_feature_mapping = 2;</code>
     * @param index The index to set the value at.
     * @param value The forwardFeatureMapping to set.
     * @return This builder for chaining.
     */
    public Builder setForwardFeatureMapping(
        int index, int value) {
      ensureForwardFeatureMappingIsMutable();
      forwardFeatureMapping_.setInt(index, value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated int32 forward_feature_mapping = 2;</code>
     * @param value The forwardFeatureMapping to add.
     * @return This builder for chaining.
     */
    public Builder addForwardFeatureMapping(int value) {
      ensureForwardFeatureMappingIsMutable();
      forwardFeatureMapping_.addInt(value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated int32 forward_feature_mapping = 2;</code>
     * @param values The forwardFeatureMapping to add.
     * @return This builder for chaining.
     */
    public Builder addAllForwardFeatureMapping(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureForwardFeatureMappingIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, forwardFeatureMapping_);
      onChanged();
      return this;
    }
    /**
     * <code>repeated int32 forward_feature_mapping = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearForwardFeatureMapping() {
      forwardFeatureMapping_ = emptyIntList();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }

    private com.google.protobuf.Internal.IntList backwardFeatureMapping_ = emptyIntList();
    private void ensureBackwardFeatureMappingIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        backwardFeatureMapping_ = mutableCopy(backwardFeatureMapping_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * <code>repeated int32 backward_feature_mapping = 3;</code>
     * @return A list containing the backwardFeatureMapping.
     */
    public java.util.List<java.lang.Integer>
        getBackwardFeatureMappingList() {
      return ((bitField0_ & 0x00000002) != 0) ?
               java.util.Collections.unmodifiableList(backwardFeatureMapping_) : backwardFeatureMapping_;
    }
    /**
     * <code>repeated int32 backward_feature_mapping = 3;</code>
     * @return The count of backwardFeatureMapping.
     */
    public int getBackwardFeatureMappingCount() {
      return backwardFeatureMapping_.size();
    }
    /**
     * <code>repeated int32 backward_feature_mapping = 3;</code>
     * @param index The index of the element to return.
     * @return The backwardFeatureMapping at the given index.
     */
    public int getBackwardFeatureMapping(int index) {
      return backwardFeatureMapping_.getInt(index);
    }
    /**
     * <code>repeated int32 backward_feature_mapping = 3;</code>
     * @param index The index to set the value at.
     * @param value The backwardFeatureMapping to set.
     * @return This builder for chaining.
     */
    public Builder setBackwardFeatureMapping(
        int index, int value) {
      ensureBackwardFeatureMappingIsMutable();
      backwardFeatureMapping_.setInt(index, value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated int32 backward_feature_mapping = 3;</code>
     * @param value The backwardFeatureMapping to add.
     * @return This builder for chaining.
     */
    public Builder addBackwardFeatureMapping(int value) {
      ensureBackwardFeatureMappingIsMutable();
      backwardFeatureMapping_.addInt(value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated int32 backward_feature_mapping = 3;</code>
     * @param values The backwardFeatureMapping to add.
     * @return This builder for chaining.
     */
    public Builder addAllBackwardFeatureMapping(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureBackwardFeatureMappingIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, backwardFeatureMapping_);
      onChanged();
      return this;
    }
    /**
     * <code>repeated int32 backward_feature_mapping = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearBackwardFeatureMapping() {
      backwardFeatureMapping_ = emptyIntList();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString modelArray_ = com.google.protobuf.ByteString.EMPTY;
    /**
     * <code>bytes model_array = 4;</code>
     * @return The modelArray.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getModelArray() {
      return modelArray_;
    }
    /**
     * <code>bytes model_array = 4;</code>
     * @param value The modelArray to set.
     * @return This builder for chaining.
     */
    public Builder setModelArray(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      modelArray_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bytes model_array = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearModelArray() {
      
      modelArray_ = getDefaultInstance().getModelArray();
      onChanged();
      return this;
    }

    private java.lang.Object inputName_ = "";
    /**
     * <code>string input_name = 5;</code>
     * @return The inputName.
     */
    public java.lang.String getInputName() {
      java.lang.Object ref = inputName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        inputName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string input_name = 5;</code>
     * @return The bytes for inputName.
     */
    public com.google.protobuf.ByteString
        getInputNameBytes() {
      java.lang.Object ref = inputName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        inputName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string input_name = 5;</code>
     * @param value The inputName to set.
     * @return This builder for chaining.
     */
    public Builder setInputName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      inputName_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string input_name = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearInputName() {
      
      inputName_ = getDefaultInstance().getInputName();
      onChanged();
      return this;
    }
    /**
     * <code>string input_name = 5;</code>
     * @param value The bytes for inputName to set.
     * @return This builder for chaining.
     */
    public Builder setInputNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      inputName_ = value;
      onChanged();
      return this;
    }

    private org.tribuo.interop.onnx.protos.OutputTransformerProto outputTransformer_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tribuo.interop.onnx.protos.OutputTransformerProto, org.tribuo.interop.onnx.protos.OutputTransformerProto.Builder, org.tribuo.interop.onnx.protos.OutputTransformerProtoOrBuilder> outputTransformerBuilder_;
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     * @return Whether the outputTransformer field is set.
     */
    public boolean hasOutputTransformer() {
      return outputTransformerBuilder_ != null || outputTransformer_ != null;
    }
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     * @return The outputTransformer.
     */
    public org.tribuo.interop.onnx.protos.OutputTransformerProto getOutputTransformer() {
      if (outputTransformerBuilder_ == null) {
        return outputTransformer_ == null ? org.tribuo.interop.onnx.protos.OutputTransformerProto.getDefaultInstance() : outputTransformer_;
      } else {
        return outputTransformerBuilder_.getMessage();
      }
    }
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     */
    public Builder setOutputTransformer(org.tribuo.interop.onnx.protos.OutputTransformerProto value) {
      if (outputTransformerBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        outputTransformer_ = value;
        onChanged();
      } else {
        outputTransformerBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     */
    public Builder setOutputTransformer(
        org.tribuo.interop.onnx.protos.OutputTransformerProto.Builder builderForValue) {
      if (outputTransformerBuilder_ == null) {
        outputTransformer_ = builderForValue.build();
        onChanged();
      } else {
        outputTransformerBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     */
    public Builder mergeOutputTransformer(org.tribuo.interop.onnx.protos.OutputTransformerProto value) {
      if (outputTransformerBuilder_ == null) {
        if (outputTransformer_ != null) {
          outputTransformer_ =
            org.tribuo.interop.onnx.protos.OutputTransformerProto.newBuilder(outputTransformer_).mergeFrom(value).buildPartial();
        } else {
          outputTransformer_ = value;
        }
        onChanged();
      } else {
        outputTransformerBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     */
    public Builder clearOutputTransformer() {
      if (outputTransformerBuilder_ == null) {
        outputTransformer_ = null;
        onChanged();
      } else {
        outputTransformer_ = null;
        outputTransformerBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     */
    public org.tribuo.interop.onnx.protos.OutputTransformerProto.Builder getOutputTransformerBuilder() {
      
      onChanged();
      return getOutputTransformerFieldBuilder().getBuilder();
    }
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     */
    public org.tribuo.interop.onnx.protos.OutputTransformerProtoOrBuilder getOutputTransformerOrBuilder() {
      if (outputTransformerBuilder_ != null) {
        return outputTransformerBuilder_.getMessageOrBuilder();
      } else {
        return outputTransformer_ == null ?
            org.tribuo.interop.onnx.protos.OutputTransformerProto.getDefaultInstance() : outputTransformer_;
      }
    }
    /**
     * <code>.tribuo.interop.onnx.OutputTransformerProto output_transformer = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tribuo.interop.onnx.protos.OutputTransformerProto, org.tribuo.interop.onnx.protos.OutputTransformerProto.Builder, org.tribuo.interop.onnx.protos.OutputTransformerProtoOrBuilder> 
        getOutputTransformerFieldBuilder() {
      if (outputTransformerBuilder_ == null) {
        outputTransformerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tribuo.interop.onnx.protos.OutputTransformerProto, org.tribuo.interop.onnx.protos.OutputTransformerProto.Builder, org.tribuo.interop.onnx.protos.OutputTransformerProtoOrBuilder>(
                getOutputTransformer(),
                getParentForChildren(),
                isClean());
        outputTransformer_ = null;
      }
      return outputTransformerBuilder_;
    }

    private org.tribuo.interop.onnx.protos.ExampleTransformerProto exampleTransformer_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tribuo.interop.onnx.protos.ExampleTransformerProto, org.tribuo.interop.onnx.protos.ExampleTransformerProto.Builder, org.tribuo.interop.onnx.protos.ExampleTransformerProtoOrBuilder> exampleTransformerBuilder_;
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     * @return Whether the exampleTransformer field is set.
     */
    public boolean hasExampleTransformer() {
      return exampleTransformerBuilder_ != null || exampleTransformer_ != null;
    }
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     * @return The exampleTransformer.
     */
    public org.tribuo.interop.onnx.protos.ExampleTransformerProto getExampleTransformer() {
      if (exampleTransformerBuilder_ == null) {
        return exampleTransformer_ == null ? org.tribuo.interop.onnx.protos.ExampleTransformerProto.getDefaultInstance() : exampleTransformer_;
      } else {
        return exampleTransformerBuilder_.getMessage();
      }
    }
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     */
    public Builder setExampleTransformer(org.tribuo.interop.onnx.protos.ExampleTransformerProto value) {
      if (exampleTransformerBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        exampleTransformer_ = value;
        onChanged();
      } else {
        exampleTransformerBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     */
    public Builder setExampleTransformer(
        org.tribuo.interop.onnx.protos.ExampleTransformerProto.Builder builderForValue) {
      if (exampleTransformerBuilder_ == null) {
        exampleTransformer_ = builderForValue.build();
        onChanged();
      } else {
        exampleTransformerBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     */
    public Builder mergeExampleTransformer(org.tribuo.interop.onnx.protos.ExampleTransformerProto value) {
      if (exampleTransformerBuilder_ == null) {
        if (exampleTransformer_ != null) {
          exampleTransformer_ =
            org.tribuo.interop.onnx.protos.ExampleTransformerProto.newBuilder(exampleTransformer_).mergeFrom(value).buildPartial();
        } else {
          exampleTransformer_ = value;
        }
        onChanged();
      } else {
        exampleTransformerBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     */
    public Builder clearExampleTransformer() {
      if (exampleTransformerBuilder_ == null) {
        exampleTransformer_ = null;
        onChanged();
      } else {
        exampleTransformer_ = null;
        exampleTransformerBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     */
    public org.tribuo.interop.onnx.protos.ExampleTransformerProto.Builder getExampleTransformerBuilder() {
      
      onChanged();
      return getExampleTransformerFieldBuilder().getBuilder();
    }
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     */
    public org.tribuo.interop.onnx.protos.ExampleTransformerProtoOrBuilder getExampleTransformerOrBuilder() {
      if (exampleTransformerBuilder_ != null) {
        return exampleTransformerBuilder_.getMessageOrBuilder();
      } else {
        return exampleTransformer_ == null ?
            org.tribuo.interop.onnx.protos.ExampleTransformerProto.getDefaultInstance() : exampleTransformer_;
      }
    }
    /**
     * <code>.tribuo.interop.onnx.ExampleTransformerProto example_transformer = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tribuo.interop.onnx.protos.ExampleTransformerProto, org.tribuo.interop.onnx.protos.ExampleTransformerProto.Builder, org.tribuo.interop.onnx.protos.ExampleTransformerProtoOrBuilder> 
        getExampleTransformerFieldBuilder() {
      if (exampleTransformerBuilder_ == null) {
        exampleTransformerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tribuo.interop.onnx.protos.ExampleTransformerProto, org.tribuo.interop.onnx.protos.ExampleTransformerProto.Builder, org.tribuo.interop.onnx.protos.ExampleTransformerProtoOrBuilder>(
                getExampleTransformer(),
                getParentForChildren(),
                isClean());
        exampleTransformer_ = null;
      }
      return exampleTransformerBuilder_;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:tribuo.interop.onnx.ONNXExternalModelProto)
  }

  // @@protoc_insertion_point(class_scope:tribuo.interop.onnx.ONNXExternalModelProto)
  private static final org.tribuo.interop.onnx.protos.ONNXExternalModelProto DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.tribuo.interop.onnx.protos.ONNXExternalModelProto();
  }

  public static org.tribuo.interop.onnx.protos.ONNXExternalModelProto getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ONNXExternalModelProto>
      PARSER = new com.google.protobuf.AbstractParser<ONNXExternalModelProto>() {
    @java.lang.Override
    public ONNXExternalModelProto parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new ONNXExternalModelProto(input, extensionRegistry);
    }
  };

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

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

  @java.lang.Override
  public org.tribuo.interop.onnx.protos.ONNXExternalModelProto getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

