/*
  Copyright 2021 The TensorFlow Authors. All Rights Reserved.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 ==============================================================================
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/framework/api_def.proto

package org.tensorflow.proto.framework;

/**
 * <pre>
 * Used to specify and override the default API &amp; behavior in the
 * generated code for client languages, from what you would get from
 * the OpDef alone. There will be a set of ApiDefs that are common
 * to all client languages, and another set per client language.
 * The per-client-language ApiDefs will inherit values from the
 * common ApiDefs which it can either replace or modify.
 * We separate the API definition from the OpDef so we can evolve the
 * API while remaining backwards compatible when interpretting old
 * graphs.  Overrides go in an "api_def.pbtxt" file with a text-format
 * ApiDefs message.
 * WARNING: Be *very* careful changing the API for any existing op --
 * you can change the semantics of existing code.  These changes may
 * need to wait until a major release of TensorFlow to avoid breaking
 * our compatibility promises.
 * </pre>
 *
 * Protobuf type {@code tensorflow.ApiDef}
 */
public  final class ApiDef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.ApiDef)
    ApiDefOrBuilder {
private static final long serialVersionUID = 0L;

  // Use ApiDef.newBuilder() to construct.
  private ApiDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ApiDef() {
    graphOpName_ = "";
    deprecationMessage_ = "";
    visibility_ = 0;
    endpoint_ = java.util.Collections.emptyList();
    inArg_ = java.util.Collections.emptyList();
    outArg_ = java.util.Collections.emptyList();
    argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    attr_ = java.util.Collections.emptyList();
    summary_ = "";
    description_ = "";
    descriptionPrefix_ = "";
    descriptionSuffix_ = "";
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new ApiDef();
  }

  @Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }

  private ApiDef(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new 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: {
            String s = input.readStringRequireUtf8();

            graphOpName_ = s;
            break;
          }
          case 16: {
            int rawValue = input.readEnum();

            visibility_ = rawValue;
            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              endpoint_ = new java.util.ArrayList<Endpoint>();
              mutable_bitField0_ |= 0x00000001;
            }
            endpoint_.add(
                input.readMessage(Endpoint.parser(), extensionRegistry));
            break;
          }
          case 34: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              inArg_ = new java.util.ArrayList<Arg>();
              mutable_bitField0_ |= 0x00000002;
            }
            inArg_.add(
                input.readMessage(Arg.parser(), extensionRegistry));
            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000004) != 0)) {
              outArg_ = new java.util.ArrayList<Arg>();
              mutable_bitField0_ |= 0x00000004;
            }
            outArg_.add(
                input.readMessage(Arg.parser(), extensionRegistry));
            break;
          }
          case 50: {
            if (!((mutable_bitField0_ & 0x00000010) != 0)) {
              attr_ = new java.util.ArrayList<Attr>();
              mutable_bitField0_ |= 0x00000010;
            }
            attr_.add(
                input.readMessage(Attr.parser(), extensionRegistry));
            break;
          }
          case 58: {
            String s = input.readStringRequireUtf8();

            summary_ = s;
            break;
          }
          case 66: {
            String s = input.readStringRequireUtf8();

            description_ = s;
            break;
          }
          case 74: {
            String s = input.readStringRequireUtf8();

            descriptionPrefix_ = s;
            break;
          }
          case 82: {
            String s = input.readStringRequireUtf8();

            descriptionSuffix_ = s;
            break;
          }
          case 90: {
            String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000008) != 0)) {
              argOrder_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000008;
            }
            argOrder_.add(s);
            break;
          }
          case 98: {
            String s = input.readStringRequireUtf8();

            deprecationMessage_ = s;
            break;
          }
          case 104: {

            deprecationVersion_ = input.readInt32();
            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)) {
        endpoint_ = java.util.Collections.unmodifiableList(endpoint_);
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        inArg_ = java.util.Collections.unmodifiableList(inArg_);
      }
      if (((mutable_bitField0_ & 0x00000004) != 0)) {
        outArg_ = java.util.Collections.unmodifiableList(outArg_);
      }
      if (((mutable_bitField0_ & 0x00000010) != 0)) {
        attr_ = java.util.Collections.unmodifiableList(attr_);
      }
      if (((mutable_bitField0_ & 0x00000008) != 0)) {
        argOrder_ = argOrder_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

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

  @Override
  protected FieldAccessorTable
  internalGetFieldAccessorTable() {
    return ApiDefProtos.internal_static_tensorflow_ApiDef_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            ApiDef.class, Builder.class);
  }

  /**
   * Protobuf enum {@code tensorflow.ApiDef.Visibility}
   */
  public enum Visibility
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <pre>
     * Normally this is "VISIBLE" unless you are inheriting a
     * different value from another ApiDef.
     * </pre>
     *
     * <code>DEFAULT_VISIBILITY = 0;</code>
     */
    DEFAULT_VISIBILITY(0),
    /**
     * <pre>
     * Publicly visible in the API.
     * </pre>
     *
     * <code>VISIBLE = 1;</code>
     */
    VISIBLE(1),
    /**
     * <pre>
     * Do not include this op in the generated API. If visibility is
     * set to 'SKIP', other fields are ignored for this op.
     * </pre>
     *
     * <code>SKIP = 2;</code>
     */
    SKIP(2),
    /**
     * <pre>
     * Hide this op by putting it into an internal namespace (or whatever
     * is appropriate in the target language).
     * </pre>
     *
     * <code>HIDDEN = 3;</code>
     */
    HIDDEN(3),
    UNRECOGNIZED(-1),
    ;

    /**
     * <pre>
     * Normally this is "VISIBLE" unless you are inheriting a
     * different value from another ApiDef.
     * </pre>
     *
     * <code>DEFAULT_VISIBILITY = 0;</code>
     */
    public static final int DEFAULT_VISIBILITY_VALUE = 0;
    /**
     * <pre>
     * Publicly visible in the API.
     * </pre>
     *
     * <code>VISIBLE = 1;</code>
     */
    public static final int VISIBLE_VALUE = 1;
    /**
     * <pre>
     * Do not include this op in the generated API. If visibility is
     * set to 'SKIP', other fields are ignored for this op.
     * </pre>
     *
     * <code>SKIP = 2;</code>
     */
    public static final int SKIP_VALUE = 2;
    /**
     * <pre>
     * Hide this op by putting it into an internal namespace (or whatever
     * is appropriate in the target language).
     * </pre>
     *
     * <code>HIDDEN = 3;</code>
     */
    public static final int HIDDEN_VALUE = 3;


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

    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @Deprecated
    public static Visibility valueOf(int value) {
      return forNumber(value);
    }

    public static Visibility forNumber(int value) {
      switch (value) {
        case 0: return DEFAULT_VISIBILITY;
        case 1: return VISIBLE;
        case 2: return SKIP;
        case 3: return HIDDEN;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<Visibility>
    internalGetValueMap() {
      return internalValueMap;
    }

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

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
    getValueDescriptor() {
      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 ApiDef.getDescriptor().getEnumTypes().get(0);
    }

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

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

    private final int value;

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

    // @@protoc_insertion_point(enum_scope:tensorflow.ApiDef.Visibility)
  }

  public interface EndpointOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.ApiDef.Endpoint)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Name should be either like "CamelCaseName" or
     * "Package.CamelCaseName". Client-language-specific ApiDefs may
     * use a snake_case convention instead of CamelCase.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    String getName();

    /**
     * <pre>
     * Name should be either like "CamelCaseName" or
     * "Package.CamelCaseName". Client-language-specific ApiDefs may
     * use a snake_case convention instead of CamelCase.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    com.google.protobuf.ByteString
    getNameBytes();

    /**
     * <pre>
     * Set if this endpoint is deprecated. If set to true, a message suggesting
     * to use a non-deprecated endpoint instead will be printed. If all
     * endpoints are deprecated, set deprecation_message in ApiDef instead.
     * </pre>
     *
     * <code>bool deprecated = 3;</code>
     */
    boolean getDeprecated();

    /**
     * <pre>
     * Major version when an endpoint will be deleted. For e.g. set this
     * value to 2 if endpoint should be removed in TensorFlow 2.0 and
     * deprecated in versions before that.
     * </pre>
     *
     * <code>int32 deprecation_version = 4;</code>
     */
    int getDeprecationVersion();
  }

  /**
   * <pre>
   * If you specify any endpoint, this will replace all of the
   * inherited endpoints.  The first endpoint should be the
   * "canonical" endpoint, and should not be deprecated (unless all
   * endpoints are deprecated).
   * </pre>
   *
   * Protobuf type {@code tensorflow.ApiDef.Endpoint}
   */
  public  static final class Endpoint extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Endpoint)
      EndpointOrBuilder {

    private static final long serialVersionUID = 0L;

    // Use Endpoint.newBuilder() to construct.
    private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Endpoint() {
      name_ = "";
    }

    @Override
    @SuppressWarnings({"unused"})
    protected Object newInstance(
        UnusedPrivateParameter unused) {
      return new Endpoint();
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }

    private Endpoint(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      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: {
              String s = input.readStringRequireUtf8();

              name_ = s;
              break;
            }
            case 24: {

              deprecated_ = input.readBool();
              break;
            }
            case 32: {

              deprecationVersion_ = input.readInt32();
              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 {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

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

    @Override
    protected FieldAccessorTable
    internalGetFieldAccessorTable() {
      return ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              Endpoint.class, Builder.class);
    }

    public static final int NAME_FIELD_NUMBER = 1;
    private volatile Object name_;

    /**
     * <pre>
     * Name should be either like "CamelCaseName" or
     * "Package.CamelCaseName". Client-language-specific ApiDefs may
     * use a snake_case convention instead of CamelCase.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public String getName() {
      Object ref = name_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        name_ = s;
        return s;
      }
    }

    /**
     * <pre>
     * Name should be either like "CamelCaseName" or
     * "Package.CamelCaseName". Client-language-specific ApiDefs may
     * use a snake_case convention instead of CamelCase.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
    getNameBytes() {
      Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int DEPRECATED_FIELD_NUMBER = 3;
    private boolean deprecated_;

    /**
     * <pre>
     * Set if this endpoint is deprecated. If set to true, a message suggesting
     * to use a non-deprecated endpoint instead will be printed. If all
     * endpoints are deprecated, set deprecation_message in ApiDef instead.
     * </pre>
     *
     * <code>bool deprecated = 3;</code>
     */
    public boolean getDeprecated() {
      return deprecated_;
    }

    public static final int DEPRECATION_VERSION_FIELD_NUMBER = 4;
    private int deprecationVersion_;

    /**
     * <pre>
     * Major version when an endpoint will be deleted. For e.g. set this
     * value to 2 if endpoint should be removed in TensorFlow 2.0 and
     * deprecated in versions before that.
     * </pre>
     *
     * <code>int32 deprecation_version = 4;</code>
     */
    public int getDeprecationVersion() {
      return deprecationVersion_;
    }

    private byte memoizedIsInitialized = -1;

    @Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
        throws java.io.IOException {
      if (!getNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
      }
      if (deprecated_ != false) {
        output.writeBool(3, deprecated_);
      }
      if (deprecationVersion_ != 0) {
        output.writeInt32(4, deprecationVersion_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!getNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
      }
      if (deprecated_ != false) {
        size += com.google.protobuf.CodedOutputStream
            .computeBoolSize(3, deprecated_);
      }
      if (deprecationVersion_ != 0) {
        size += com.google.protobuf.CodedOutputStream
            .computeInt32Size(4, deprecationVersion_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof Endpoint)) {
        return super.equals(obj);
      }
      Endpoint other = (Endpoint) obj;

      if (!getName()
          .equals(other.getName())) {
        return false;
      }
      if (getDeprecated()
          != other.getDeprecated()) return false;
      if (getDeprecationVersion()
          != other.getDeprecationVersion()) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + NAME_FIELD_NUMBER;
      hash = (53 * hash) + getName().hashCode();
      hash = (37 * hash) + DEPRECATED_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getDeprecated());
      hash = (37 * hash) + DEPRECATION_VERSION_FIELD_NUMBER;
      hash = (53 * hash) + getDeprecationVersion();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static Endpoint parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Endpoint parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Endpoint parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Endpoint parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Endpoint parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Endpoint parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Endpoint parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }

    public static Endpoint 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 Endpoint parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static Endpoint 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 Endpoint parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }

    public static Endpoint parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(Endpoint prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }

    /**
     * <pre>
     * If you specify any endpoint, this will replace all of the
     * inherited endpoints.  The first endpoint should be the
     * "canonical" endpoint, and should not be deprecated (unless all
     * endpoints are deprecated).
     * </pre>
     *
     * Protobuf type {@code tensorflow.ApiDef.Endpoint}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Endpoint)
        EndpointOrBuilder {

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

      @Override
      protected FieldAccessorTable
      internalGetFieldAccessorTable() {
        return ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                Endpoint.class, Builder.class);
      }

      // Construct using org.tensorflow.proto.framework.ApiDef.Endpoint.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }

      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
            .alwaysUseFieldBuilders) {
        }
      }

      @Override
      public Builder clear() {
        super.clear();
        name_ = "";

        deprecated_ = false;

        deprecationVersion_ = 0;

        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
      getDescriptorForType() {
        return ApiDefProtos.internal_static_tensorflow_ApiDef_Endpoint_descriptor;
      }

      @Override
      public Endpoint getDefaultInstanceForType() {
        return Endpoint.getDefaultInstance();
      }

      @Override
      public Endpoint build() {
        Endpoint result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public Endpoint buildPartial() {
        Endpoint result = new Endpoint(this);
        result.name_ = name_;
        result.deprecated_ = deprecated_;
        result.deprecationVersion_ = deprecationVersion_;
        onBuilt();
        return result;
      }

      @Override
      public Builder clone() {
        return super.clone();
      }

      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.setField(field, value);
      }

      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }

      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }

      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return super.setRepeatedField(field, index, value);
      }

      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.addRepeatedField(field, value);
      }

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

      public Builder mergeFrom(Endpoint other) {
        if (other == Endpoint.getDefaultInstance()) {
          return this;
        }
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          onChanged();
        }
        if (other.getDeprecated() != false) {
          setDeprecated(other.getDeprecated());
        }
        if (other.getDeprecationVersion() != 0) {
          setDeprecationVersion(other.getDeprecationVersion());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        Endpoint parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (Endpoint) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private Object name_ = "";

      /**
       * <pre>
       * Name should be either like "CamelCaseName" or
       * "Package.CamelCaseName". Client-language-specific ApiDefs may
       * use a snake_case convention instead of CamelCase.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public String getName() {
        Object ref = name_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          name_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }

      /**
       * <pre>
       * Name should be either like "CamelCaseName" or
       * "Package.CamelCaseName". Client-language-specific ApiDefs may
       * use a snake_case convention instead of CamelCase.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public com.google.protobuf.ByteString
      getNameBytes() {
        Object ref = name_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       * <pre>
       * Name should be either like "CamelCaseName" or
       * "Package.CamelCaseName". Client-language-specific ApiDefs may
       * use a snake_case convention instead of CamelCase.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public Builder setName(
          String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        name_ = value;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Name should be either like "CamelCaseName" or
       * "Package.CamelCaseName". Client-language-specific ApiDefs may
       * use a snake_case convention instead of CamelCase.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public Builder clearName() {

        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Name should be either like "CamelCaseName" or
       * "Package.CamelCaseName". Client-language-specific ApiDefs may
       * use a snake_case convention instead of CamelCase.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        name_ = value;
        onChanged();
        return this;
      }

      private boolean deprecated_ ;

      /**
       * <pre>
       * Set if this endpoint is deprecated. If set to true, a message suggesting
       * to use a non-deprecated endpoint instead will be printed. If all
       * endpoints are deprecated, set deprecation_message in ApiDef instead.
       * </pre>
       *
       * <code>bool deprecated = 3;</code>
       */
      public boolean getDeprecated() {
        return deprecated_;
      }

      /**
       * <pre>
       * Set if this endpoint is deprecated. If set to true, a message suggesting
       * to use a non-deprecated endpoint instead will be printed. If all
       * endpoints are deprecated, set deprecation_message in ApiDef instead.
       * </pre>
       *
       * <code>bool deprecated = 3;</code>
       */
      public Builder setDeprecated(boolean value) {

        deprecated_ = value;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Set if this endpoint is deprecated. If set to true, a message suggesting
       * to use a non-deprecated endpoint instead will be printed. If all
       * endpoints are deprecated, set deprecation_message in ApiDef instead.
       * </pre>
       *
       * <code>bool deprecated = 3;</code>
       */
      public Builder clearDeprecated() {

        deprecated_ = false;
        onChanged();
        return this;
      }

      private int deprecationVersion_ ;

      /**
       * <pre>
       * Major version when an endpoint will be deleted. For e.g. set this
       * value to 2 if endpoint should be removed in TensorFlow 2.0 and
       * deprecated in versions before that.
       * </pre>
       *
       * <code>int32 deprecation_version = 4;</code>
       */
      public int getDeprecationVersion() {
        return deprecationVersion_;
      }

      /**
       * <pre>
       * Major version when an endpoint will be deleted. For e.g. set this
       * value to 2 if endpoint should be removed in TensorFlow 2.0 and
       * deprecated in versions before that.
       * </pre>
       *
       * <code>int32 deprecation_version = 4;</code>
       */
      public Builder setDeprecationVersion(int value) {

        deprecationVersion_ = value;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Major version when an endpoint will be deleted. For e.g. set this
       * value to 2 if endpoint should be removed in TensorFlow 2.0 and
       * deprecated in versions before that.
       * </pre>
       *
       * <code>int32 deprecation_version = 4;</code>
       */
      public Builder clearDeprecationVersion() {

        deprecationVersion_ = 0;
        onChanged();
        return this;
      }

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

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

      // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Endpoint)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.ApiDef.Endpoint)
    private static final Endpoint DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new Endpoint();
    }

    public static Endpoint getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @Override
    public Endpoint getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface ArgOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.ApiDef.Arg)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string name = 1;</code>
     */
    String getName();

    /**
     * <code>string name = 1;</code>
     */
    com.google.protobuf.ByteString
    getNameBytes();

    /**
     * <pre>
     * Change the name used to access this arg in the API from what
     * is used in the GraphDef.  Note that these names in `backticks`
     * will also be replaced in the summary &amp; description fields.
     * </pre>
     *
     * <code>string rename_to = 2;</code>
     */
    String getRenameTo();

    /**
     * <pre>
     * Change the name used to access this arg in the API from what
     * is used in the GraphDef.  Note that these names in `backticks`
     * will also be replaced in the summary &amp; description fields.
     * </pre>
     *
     * <code>string rename_to = 2;</code>
     */
    com.google.protobuf.ByteString
    getRenameToBytes();

    /**
     * <pre>
     * Note: this will replace any inherited arg doc. There is no
     * current way of modifying arg descriptions (other than replacing
     * them entirely) as can be done with op descriptions.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    String getDescription();

    /**
     * <pre>
     * Note: this will replace any inherited arg doc. There is no
     * current way of modifying arg descriptions (other than replacing
     * them entirely) as can be done with op descriptions.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    com.google.protobuf.ByteString
    getDescriptionBytes();
  }

  /**
   * Protobuf type {@code tensorflow.ApiDef.Arg}
   */
  public  static final class Arg extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Arg)
      ArgOrBuilder {

    private static final long serialVersionUID = 0L;

    // Use Arg.newBuilder() to construct.
    private Arg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Arg() {
      name_ = "";
      renameTo_ = "";
      description_ = "";
    }

    @Override
    @SuppressWarnings({"unused"})
    protected Object newInstance(
        UnusedPrivateParameter unused) {
      return new Arg();
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }

    private Arg(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      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: {
              String s = input.readStringRequireUtf8();

              name_ = s;
              break;
            }
            case 18: {
              String s = input.readStringRequireUtf8();

              renameTo_ = s;
              break;
            }
            case 26: {
              String s = input.readStringRequireUtf8();

              description_ = s;
              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 {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

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

    @Override
    protected FieldAccessorTable
    internalGetFieldAccessorTable() {
      return ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              Arg.class, Builder.class);
    }

    public static final int NAME_FIELD_NUMBER = 1;
    private volatile Object name_;

    /**
     * <code>string name = 1;</code>
     */
    public String getName() {
      Object ref = name_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        name_ = s;
        return s;
      }
    }

    /**
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
    getNameBytes() {
      Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int RENAME_TO_FIELD_NUMBER = 2;
    private volatile Object renameTo_;

    /**
     * <pre>
     * Change the name used to access this arg in the API from what
     * is used in the GraphDef.  Note that these names in `backticks`
     * will also be replaced in the summary &amp; description fields.
     * </pre>
     *
     * <code>string rename_to = 2;</code>
     */
    public String getRenameTo() {
      Object ref = renameTo_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        renameTo_ = s;
        return s;
      }
    }

    /**
     * <pre>
     * Change the name used to access this arg in the API from what
     * is used in the GraphDef.  Note that these names in `backticks`
     * will also be replaced in the summary &amp; description fields.
     * </pre>
     *
     * <code>string rename_to = 2;</code>
     */
    public com.google.protobuf.ByteString
    getRenameToBytes() {
      Object ref = renameTo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        renameTo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int DESCRIPTION_FIELD_NUMBER = 3;
    private volatile Object description_;

    /**
     * <pre>
     * Note: this will replace any inherited arg doc. There is no
     * current way of modifying arg descriptions (other than replacing
     * them entirely) as can be done with op descriptions.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    public String getDescription() {
      Object ref = description_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        description_ = s;
        return s;
      }
    }

    /**
     * <pre>
     * Note: this will replace any inherited arg doc. There is no
     * current way of modifying arg descriptions (other than replacing
     * them entirely) as can be done with op descriptions.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    public com.google.protobuf.ByteString
    getDescriptionBytes() {
      Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;

    @Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
        throws java.io.IOException {
      if (!getNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
      }
      if (!getRenameToBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, renameTo_);
      }
      if (!getDescriptionBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!getNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
      }
      if (!getRenameToBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, renameTo_);
      }
      if (!getDescriptionBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof Arg)) {
        return super.equals(obj);
      }
      Arg other = (Arg) obj;

      if (!getName()
          .equals(other.getName())) {
        return false;
      }
      if (!getRenameTo()
          .equals(other.getRenameTo())) return false;
      if (!getDescription()
          .equals(other.getDescription())) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + NAME_FIELD_NUMBER;
      hash = (53 * hash) + getName().hashCode();
      hash = (37 * hash) + RENAME_TO_FIELD_NUMBER;
      hash = (53 * hash) + getRenameTo().hashCode();
      hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
      hash = (53 * hash) + getDescription().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static Arg parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Arg parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Arg parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Arg parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Arg parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Arg parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Arg parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }

    public static Arg 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 Arg parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static Arg 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 Arg parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }

    public static Arg parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(Arg prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }

    /**
     * Protobuf type {@code tensorflow.ApiDef.Arg}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Arg)
        ArgOrBuilder {

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

      @Override
      protected FieldAccessorTable
      internalGetFieldAccessorTable() {
        return ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                Arg.class, Builder.class);
      }

      // Construct using org.tensorflow.proto.framework.ApiDef.Arg.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }

      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
            .alwaysUseFieldBuilders) {
        }
      }

      @Override
      public Builder clear() {
        super.clear();
        name_ = "";

        renameTo_ = "";

        description_ = "";

        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
      getDescriptorForType() {
        return ApiDefProtos.internal_static_tensorflow_ApiDef_Arg_descriptor;
      }

      @Override
      public Arg getDefaultInstanceForType() {
        return Arg.getDefaultInstance();
      }

      @Override
      public Arg build() {
        Arg result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public Arg buildPartial() {
        Arg result = new Arg(this);
        result.name_ = name_;
        result.renameTo_ = renameTo_;
        result.description_ = description_;
        onBuilt();
        return result;
      }

      @Override
      public Builder clone() {
        return super.clone();
      }

      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.setField(field, value);
      }

      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }

      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }

      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return super.setRepeatedField(field, index, value);
      }

      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.addRepeatedField(field, value);
      }

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

      public Builder mergeFrom(Arg other) {
        if (other == Arg.getDefaultInstance()) {
          return this;
        }
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          onChanged();
        }
        if (!other.getRenameTo().isEmpty()) {
          renameTo_ = other.renameTo_;
          onChanged();
        }
        if (!other.getDescription().isEmpty()) {
          description_ = other.description_;
          onChanged();
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        Arg parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (Arg) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private Object name_ = "";

      /**
       * <code>string name = 1;</code>
       */
      public String getName() {
        Object ref = name_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          name_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }

      /**
       * <code>string name = 1;</code>
       */
      public com.google.protobuf.ByteString
      getNameBytes() {
        Object ref = name_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       * <code>string name = 1;</code>
       */
      public Builder setName(
          String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        name_ = value;
        onChanged();
        return this;
      }

      /**
       * <code>string name = 1;</code>
       */
      public Builder clearName() {

        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }

      /**
       * <code>string name = 1;</code>
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        name_ = value;
        onChanged();
        return this;
      }

      private Object renameTo_ = "";

      /**
       * <pre>
       * Change the name used to access this arg in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public String getRenameTo() {
        Object ref = renameTo_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          renameTo_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }

      /**
       * <pre>
       * Change the name used to access this arg in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public com.google.protobuf.ByteString
      getRenameToBytes() {
        Object ref = renameTo_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          renameTo_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       * <pre>
       * Change the name used to access this arg in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public Builder setRenameTo(
          String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        renameTo_ = value;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Change the name used to access this arg in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public Builder clearRenameTo() {

        renameTo_ = getDefaultInstance().getRenameTo();
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Change the name used to access this arg in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public Builder setRenameToBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        renameTo_ = value;
        onChanged();
        return this;
      }

      private Object description_ = "";

      /**
       * <pre>
       * Note: this will replace any inherited arg doc. There is no
       * current way of modifying arg descriptions (other than replacing
       * them entirely) as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 3;</code>
       */
      public String getDescription() {
        Object ref = description_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          description_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }

      /**
       * <pre>
       * Note: this will replace any inherited arg doc. There is no
       * current way of modifying arg descriptions (other than replacing
       * them entirely) as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 3;</code>
       */
      public com.google.protobuf.ByteString
      getDescriptionBytes() {
        Object ref = description_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          description_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       * <pre>
       * Note: this will replace any inherited arg doc. There is no
       * current way of modifying arg descriptions (other than replacing
       * them entirely) as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 3;</code>
       */
      public Builder setDescription(
          String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        description_ = value;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Note: this will replace any inherited arg doc. There is no
       * current way of modifying arg descriptions (other than replacing
       * them entirely) as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 3;</code>
       */
      public Builder clearDescription() {

        description_ = getDefaultInstance().getDescription();
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Note: this will replace any inherited arg doc. There is no
       * current way of modifying arg descriptions (other than replacing
       * them entirely) as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 3;</code>
       */
      public Builder setDescriptionBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        description_ = value;
        onChanged();
        return this;
      }

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

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

      // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Arg)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.ApiDef.Arg)
    private static final Arg DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new Arg();
    }

    public static Arg getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @Override
    public Arg getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface AttrOrBuilder extends
      // @@protoc_insertion_point(interface_extends:tensorflow.ApiDef.Attr)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string name = 1;</code>
     */
    String getName();

    /**
     * <code>string name = 1;</code>
     */
    com.google.protobuf.ByteString
    getNameBytes();

    /**
     * <pre>
     * Change the name used to access this attr in the API from what
     * is used in the GraphDef.  Note that these names in `backticks`
     * will also be replaced in the summary &amp; description fields.
     * </pre>
     *
     * <code>string rename_to = 2;</code>
     */
    String getRenameTo();

    /**
     * <pre>
     * Change the name used to access this attr in the API from what
     * is used in the GraphDef.  Note that these names in `backticks`
     * will also be replaced in the summary &amp; description fields.
     * </pre>
     *
     * <code>string rename_to = 2;</code>
     */
    com.google.protobuf.ByteString
    getRenameToBytes();

    /**
     * <pre>
     * Specify a new default value to use for this attr.  This default
     * will be used when creating new graphs, as opposed to the
     * default in the OpDef, which will be used when interpreting old
     * GraphDefs.
     * </pre>
     *
     * <code>.tensorflow.AttrValue default_value = 3;</code>
     */
    boolean hasDefaultValue();

    /**
     * <pre>
     * Specify a new default value to use for this attr.  This default
     * will be used when creating new graphs, as opposed to the
     * default in the OpDef, which will be used when interpreting old
     * GraphDefs.
     * </pre>
     *
     * <code>.tensorflow.AttrValue default_value = 3;</code>
     */
    AttrValue getDefaultValue();

    /**
     * <pre>
     * Specify a new default value to use for this attr.  This default
     * will be used when creating new graphs, as opposed to the
     * default in the OpDef, which will be used when interpreting old
     * GraphDefs.
     * </pre>
     *
     * <code>.tensorflow.AttrValue default_value = 3;</code>
     */
    AttrValueOrBuilder getDefaultValueOrBuilder();

    /**
     * <pre>
     * Note: this will replace any inherited attr doc, there is no current
     * way of modifying attr descriptions as can be done with op descriptions.
     * </pre>
     *
     * <code>string description = 4;</code>
     */
    String getDescription();

    /**
     * <pre>
     * Note: this will replace any inherited attr doc, there is no current
     * way of modifying attr descriptions as can be done with op descriptions.
     * </pre>
     *
     * <code>string description = 4;</code>
     */
    com.google.protobuf.ByteString
    getDescriptionBytes();
  }

  /**
   * <pre>
   * Description of the graph-construction-time configuration of this
   * Op.  That is to say, this describes the attr fields that will
   * be specified in the NodeDef.
   * </pre>
   *
   * Protobuf type {@code tensorflow.ApiDef.Attr}
   */
  public  static final class Attr extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:tensorflow.ApiDef.Attr)
      AttrOrBuilder {

    private static final long serialVersionUID = 0L;

    // Use Attr.newBuilder() to construct.
    private Attr(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Attr() {
      name_ = "";
      renameTo_ = "";
      description_ = "";
    }

    @Override
    @SuppressWarnings({"unused"})
    protected Object newInstance(
        UnusedPrivateParameter unused) {
      return new Attr();
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }

    private Attr(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      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: {
              String s = input.readStringRequireUtf8();

              name_ = s;
              break;
            }
            case 18: {
              String s = input.readStringRequireUtf8();

              renameTo_ = s;
              break;
            }
            case 26: {
              AttrValue.Builder subBuilder = null;
              if (defaultValue_ != null) {
                subBuilder = defaultValue_.toBuilder();
              }
              defaultValue_ = input.readMessage(AttrValue.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(defaultValue_);
                defaultValue_ = subBuilder.buildPartial();
              }

              break;
            }
            case 34: {
              String s = input.readStringRequireUtf8();

              description_ = s;
              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 {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

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

    @Override
    protected FieldAccessorTable
    internalGetFieldAccessorTable() {
      return ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              Attr.class, Builder.class);
    }

    public static final int NAME_FIELD_NUMBER = 1;
    private volatile Object name_;

    /**
     * <code>string name = 1;</code>
     */
    public String getName() {
      Object ref = name_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        name_ = s;
        return s;
      }
    }

    /**
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
    getNameBytes() {
      Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int RENAME_TO_FIELD_NUMBER = 2;
    private volatile Object renameTo_;

    /**
     * <pre>
     * Change the name used to access this attr in the API from what
     * is used in the GraphDef.  Note that these names in `backticks`
     * will also be replaced in the summary &amp; description fields.
     * </pre>
     *
     * <code>string rename_to = 2;</code>
     */
    public String getRenameTo() {
      Object ref = renameTo_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        renameTo_ = s;
        return s;
      }
    }

    /**
     * <pre>
     * Change the name used to access this attr in the API from what
     * is used in the GraphDef.  Note that these names in `backticks`
     * will also be replaced in the summary &amp; description fields.
     * </pre>
     *
     * <code>string rename_to = 2;</code>
     */
    public com.google.protobuf.ByteString
    getRenameToBytes() {
      Object ref = renameTo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        renameTo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int DEFAULT_VALUE_FIELD_NUMBER = 3;
    private AttrValue defaultValue_;

    /**
     * <pre>
     * Specify a new default value to use for this attr.  This default
     * will be used when creating new graphs, as opposed to the
     * default in the OpDef, which will be used when interpreting old
     * GraphDefs.
     * </pre>
     *
     * <code>.tensorflow.AttrValue default_value = 3;</code>
     */
    public boolean hasDefaultValue() {
      return defaultValue_ != null;
    }

    /**
     * <pre>
     * Specify a new default value to use for this attr.  This default
     * will be used when creating new graphs, as opposed to the
     * default in the OpDef, which will be used when interpreting old
     * GraphDefs.
     * </pre>
     *
     * <code>.tensorflow.AttrValue default_value = 3;</code>
     */
    public AttrValue getDefaultValue() {
      return defaultValue_ == null ? AttrValue.getDefaultInstance() : defaultValue_;
    }

    /**
     * <pre>
     * Specify a new default value to use for this attr.  This default
     * will be used when creating new graphs, as opposed to the
     * default in the OpDef, which will be used when interpreting old
     * GraphDefs.
     * </pre>
     *
     * <code>.tensorflow.AttrValue default_value = 3;</code>
     */
    public AttrValueOrBuilder getDefaultValueOrBuilder() {
      return getDefaultValue();
    }

    public static final int DESCRIPTION_FIELD_NUMBER = 4;
    private volatile Object description_;

    /**
     * <pre>
     * Note: this will replace any inherited attr doc, there is no current
     * way of modifying attr descriptions as can be done with op descriptions.
     * </pre>
     *
     * <code>string description = 4;</code>
     */
    public String getDescription() {
      Object ref = description_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        description_ = s;
        return s;
      }
    }

    /**
     * <pre>
     * Note: this will replace any inherited attr doc, there is no current
     * way of modifying attr descriptions as can be done with op descriptions.
     * </pre>
     *
     * <code>string description = 4;</code>
     */
    public com.google.protobuf.ByteString
    getDescriptionBytes() {
      Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;

    @Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
        throws java.io.IOException {
      if (!getNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
      }
      if (!getRenameToBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, renameTo_);
      }
      if (defaultValue_ != null) {
        output.writeMessage(3, getDefaultValue());
      }
      if (!getDescriptionBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!getNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
      }
      if (!getRenameToBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, renameTo_);
      }
      if (defaultValue_ != null) {
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(3, getDefaultValue());
      }
      if (!getDescriptionBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof Attr)) {
        return super.equals(obj);
      }
      Attr other = (Attr) obj;

      if (!getName()
          .equals(other.getName())) {
        return false;
      }
      if (!getRenameTo()
          .equals(other.getRenameTo())) return false;
      if (hasDefaultValue() != other.hasDefaultValue()) return false;
      if (hasDefaultValue()) {
        if (!getDefaultValue()
            .equals(other.getDefaultValue())) return false;
      }
      if (!getDescription()
          .equals(other.getDescription())) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + NAME_FIELD_NUMBER;
      hash = (53 * hash) + getName().hashCode();
      hash = (37 * hash) + RENAME_TO_FIELD_NUMBER;
      hash = (53 * hash) + getRenameTo().hashCode();
      if (hasDefaultValue()) {
        hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER;
        hash = (53 * hash) + getDefaultValue().hashCode();
      }
      hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
      hash = (53 * hash) + getDescription().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static Attr parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Attr parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Attr parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Attr parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Attr parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static Attr parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Attr parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }

    public static Attr 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 Attr parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }

    public static Attr 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 Attr parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }

    public static Attr parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(Attr prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }

    /**
     * <pre>
     * Description of the graph-construction-time configuration of this
     * Op.  That is to say, this describes the attr fields that will
     * be specified in the NodeDef.
     * </pre>
     *
     * Protobuf type {@code tensorflow.ApiDef.Attr}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef.Attr)
        AttrOrBuilder {

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

      @Override
      protected FieldAccessorTable
      internalGetFieldAccessorTable() {
        return ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                Attr.class, Builder.class);
      }

      // Construct using org.tensorflow.proto.framework.ApiDef.Attr.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }

      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
            .alwaysUseFieldBuilders) {
        }
      }

      @Override
      public Builder clear() {
        super.clear();
        name_ = "";

        renameTo_ = "";

        if (defaultValueBuilder_ == null) {
          defaultValue_ = null;
        } else {
          defaultValue_ = null;
          defaultValueBuilder_ = null;
        }
        description_ = "";

        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
      getDescriptorForType() {
        return ApiDefProtos.internal_static_tensorflow_ApiDef_Attr_descriptor;
      }

      @Override
      public Attr getDefaultInstanceForType() {
        return Attr.getDefaultInstance();
      }

      @Override
      public Attr build() {
        Attr result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public Attr buildPartial() {
        Attr result = new Attr(this);
        result.name_ = name_;
        result.renameTo_ = renameTo_;
        if (defaultValueBuilder_ == null) {
          result.defaultValue_ = defaultValue_;
        } else {
          result.defaultValue_ = defaultValueBuilder_.build();
        }
        result.description_ = description_;
        onBuilt();
        return result;
      }

      @Override
      public Builder clone() {
        return super.clone();
      }

      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.setField(field, value);
      }

      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }

      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }

      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return super.setRepeatedField(field, index, value);
      }

      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.addRepeatedField(field, value);
      }

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

      public Builder mergeFrom(Attr other) {
        if (other == Attr.getDefaultInstance()) {
          return this;
        }
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          onChanged();
        }
        if (!other.getRenameTo().isEmpty()) {
          renameTo_ = other.renameTo_;
          onChanged();
        }
        if (other.hasDefaultValue()) {
          mergeDefaultValue(other.getDefaultValue());
        }
        if (!other.getDescription().isEmpty()) {
          description_ = other.description_;
          onChanged();
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

      @Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        Attr parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (Attr) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private Object name_ = "";

      /**
       * <code>string name = 1;</code>
       */
      public String getName() {
        Object ref = name_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          name_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }

      /**
       * <code>string name = 1;</code>
       */
      public com.google.protobuf.ByteString
      getNameBytes() {
        Object ref = name_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       * <code>string name = 1;</code>
       */
      public Builder setName(
          String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        name_ = value;
        onChanged();
        return this;
      }

      /**
       * <code>string name = 1;</code>
       */
      public Builder clearName() {

        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }

      /**
       * <code>string name = 1;</code>
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        name_ = value;
        onChanged();
        return this;
      }

      private Object renameTo_ = "";

      /**
       * <pre>
       * Change the name used to access this attr in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public String getRenameTo() {
        Object ref = renameTo_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          renameTo_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }

      /**
       * <pre>
       * Change the name used to access this attr in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public com.google.protobuf.ByteString
      getRenameToBytes() {
        Object ref = renameTo_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          renameTo_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       * <pre>
       * Change the name used to access this attr in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public Builder setRenameTo(
          String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        renameTo_ = value;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Change the name used to access this attr in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public Builder clearRenameTo() {

        renameTo_ = getDefaultInstance().getRenameTo();
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Change the name used to access this attr in the API from what
       * is used in the GraphDef.  Note that these names in `backticks`
       * will also be replaced in the summary &amp; description fields.
       * </pre>
       *
       * <code>string rename_to = 2;</code>
       */
      public Builder setRenameToBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        renameTo_ = value;
        onChanged();
        return this;
      }

      private AttrValue defaultValue_;
      private com.google.protobuf.SingleFieldBuilderV3<
          AttrValue, AttrValue.Builder, AttrValueOrBuilder> defaultValueBuilder_;

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      public boolean hasDefaultValue() {
        return defaultValueBuilder_ != null || defaultValue_ != null;
      }

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      public AttrValue getDefaultValue() {
        if (defaultValueBuilder_ == null) {
          return defaultValue_ == null ? AttrValue.getDefaultInstance() : defaultValue_;
        } else {
          return defaultValueBuilder_.getMessage();
        }
      }

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      public Builder setDefaultValue(AttrValue value) {
        if (defaultValueBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          defaultValue_ = value;
          onChanged();
        } else {
          defaultValueBuilder_.setMessage(value);
        }

        return this;
      }

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      public Builder setDefaultValue(
          AttrValue.Builder builderForValue) {
        if (defaultValueBuilder_ == null) {
          defaultValue_ = builderForValue.build();
          onChanged();
        } else {
          defaultValueBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      public Builder mergeDefaultValue(AttrValue value) {
        if (defaultValueBuilder_ == null) {
          if (defaultValue_ != null) {
            defaultValue_ =
                AttrValue.newBuilder(defaultValue_).mergeFrom(value).buildPartial();
          } else {
            defaultValue_ = value;
          }
          onChanged();
        } else {
          defaultValueBuilder_.mergeFrom(value);
        }

        return this;
      }

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      public Builder clearDefaultValue() {
        if (defaultValueBuilder_ == null) {
          defaultValue_ = null;
          onChanged();
        } else {
          defaultValue_ = null;
          defaultValueBuilder_ = null;
        }

        return this;
      }

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      public AttrValue.Builder getDefaultValueBuilder() {

        onChanged();
        return getDefaultValueFieldBuilder().getBuilder();
      }

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      public AttrValueOrBuilder getDefaultValueOrBuilder() {
        if (defaultValueBuilder_ != null) {
          return defaultValueBuilder_.getMessageOrBuilder();
        } else {
          return defaultValue_ == null ?
              AttrValue.getDefaultInstance() : defaultValue_;
        }
      }

      /**
       * <pre>
       * Specify a new default value to use for this attr.  This default
       * will be used when creating new graphs, as opposed to the
       * default in the OpDef, which will be used when interpreting old
       * GraphDefs.
       * </pre>
       *
       * <code>.tensorflow.AttrValue default_value = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          AttrValue, AttrValue.Builder, AttrValueOrBuilder>
      getDefaultValueFieldBuilder() {
        if (defaultValueBuilder_ == null) {
          defaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              AttrValue, AttrValue.Builder, AttrValueOrBuilder>(
              getDefaultValue(),
              getParentForChildren(),
              isClean());
          defaultValue_ = null;
        }
        return defaultValueBuilder_;
      }

      private Object description_ = "";

      /**
       * <pre>
       * Note: this will replace any inherited attr doc, there is no current
       * way of modifying attr descriptions as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 4;</code>
       */
      public String getDescription() {
        Object ref = description_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          description_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }

      /**
       * <pre>
       * Note: this will replace any inherited attr doc, there is no current
       * way of modifying attr descriptions as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 4;</code>
       */
      public com.google.protobuf.ByteString
      getDescriptionBytes() {
        Object ref = description_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          description_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       * <pre>
       * Note: this will replace any inherited attr doc, there is no current
       * way of modifying attr descriptions as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 4;</code>
       */
      public Builder setDescription(
          String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        description_ = value;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Note: this will replace any inherited attr doc, there is no current
       * way of modifying attr descriptions as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 4;</code>
       */
      public Builder clearDescription() {

        description_ = getDefaultInstance().getDescription();
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Note: this will replace any inherited attr doc, there is no current
       * way of modifying attr descriptions as can be done with op descriptions.
       * </pre>
       *
       * <code>string description = 4;</code>
       */
      public Builder setDescriptionBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        description_ = value;
        onChanged();
        return this;
      }

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

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

      // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef.Attr)
    }

    // @@protoc_insertion_point(class_scope:tensorflow.ApiDef.Attr)
    private static final Attr DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new Attr();
    }

    public static Attr getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @Override
    public Attr getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public static final int GRAPH_OP_NAME_FIELD_NUMBER = 1;
  private volatile Object graphOpName_;

  /**
   * <pre>
   * Name of the op (in the OpDef) to specify the API for.
   * </pre>
   *
   * <code>string graph_op_name = 1;</code>
   */
  public String getGraphOpName() {
    Object ref = graphOpName_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      graphOpName_ = s;
      return s;
    }
  }

  /**
   * <pre>
   * Name of the op (in the OpDef) to specify the API for.
   * </pre>
   *
   * <code>string graph_op_name = 1;</code>
   */
  public com.google.protobuf.ByteString
  getGraphOpNameBytes() {
    Object ref = graphOpName_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      graphOpName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEPRECATION_MESSAGE_FIELD_NUMBER = 12;
  private volatile Object deprecationMessage_;

  /**
   * <pre>
   * If this op is deprecated, set deprecation message to the message
   * that should be logged when this op is used.
   * The message should indicate alternative op to use, if any.
   * </pre>
   *
   * <code>string deprecation_message = 12;</code>
   */
  public String getDeprecationMessage() {
    Object ref = deprecationMessage_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      deprecationMessage_ = s;
      return s;
    }
  }

  /**
   * <pre>
   * If this op is deprecated, set deprecation message to the message
   * that should be logged when this op is used.
   * The message should indicate alternative op to use, if any.
   * </pre>
   *
   * <code>string deprecation_message = 12;</code>
   */
  public com.google.protobuf.ByteString
  getDeprecationMessageBytes() {
    Object ref = deprecationMessage_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      deprecationMessage_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEPRECATION_VERSION_FIELD_NUMBER = 13;
  private int deprecationVersion_;

  /**
   * <pre>
   * Major version when the op will be deleted. For e.g. set this
   * value to 2 if op API should be removed in TensorFlow 2.0 and
   * deprecated in versions before that.
   * </pre>
   *
   * <code>int32 deprecation_version = 13;</code>
   */
  public int getDeprecationVersion() {
    return deprecationVersion_;
  }

  public static final int VISIBILITY_FIELD_NUMBER = 2;
  private int visibility_;

  /**
   * <code>.tensorflow.ApiDef.Visibility visibility = 2;</code>
   */
  public int getVisibilityValue() {
    return visibility_;
  }

  /**
   * <code>.tensorflow.ApiDef.Visibility visibility = 2;</code>
   */
  public Visibility getVisibility() {
    @SuppressWarnings("deprecation")
    Visibility result = Visibility.valueOf(visibility_);
    return result == null ? Visibility.UNRECOGNIZED : result;
  }

  public static final int ENDPOINT_FIELD_NUMBER = 3;
  private java.util.List<Endpoint> endpoint_;

  /**
   * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
   */
  public java.util.List<Endpoint> getEndpointList() {
    return endpoint_;
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
   */
  public java.util.List<? extends EndpointOrBuilder>
  getEndpointOrBuilderList() {
    return endpoint_;
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
   */
  public int getEndpointCount() {
    return endpoint_.size();
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
   */
  public Endpoint getEndpoint(int index) {
    return endpoint_.get(index);
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
   */
  public EndpointOrBuilder getEndpointOrBuilder(
      int index) {
    return endpoint_.get(index);
  }

  public static final int IN_ARG_FIELD_NUMBER = 4;
  private java.util.List<Arg> inArg_;

  /**
   * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
   */
  public java.util.List<Arg> getInArgList() {
    return inArg_;
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
   */
  public java.util.List<? extends ArgOrBuilder>
  getInArgOrBuilderList() {
    return inArg_;
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
   */
  public int getInArgCount() {
    return inArg_.size();
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
   */
  public Arg getInArg(int index) {
    return inArg_.get(index);
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
   */
  public ArgOrBuilder getInArgOrBuilder(
      int index) {
    return inArg_.get(index);
  }

  public static final int OUT_ARG_FIELD_NUMBER = 5;
  private java.util.List<Arg> outArg_;

  /**
   * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
   */
  public java.util.List<Arg> getOutArgList() {
    return outArg_;
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
   */
  public java.util.List<? extends ArgOrBuilder>
  getOutArgOrBuilderList() {
    return outArg_;
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
   */
  public int getOutArgCount() {
    return outArg_.size();
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
   */
  public Arg getOutArg(int index) {
    return outArg_.get(index);
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
   */
  public ArgOrBuilder getOutArgOrBuilder(
      int index) {
    return outArg_.get(index);
  }

  public static final int ARG_ORDER_FIELD_NUMBER = 11;
  private com.google.protobuf.LazyStringList argOrder_;

  /**
   * <pre>
   * List of original in_arg names to specify new argument order.
   * Length of arg_order should be either empty to keep current order
   * or match size of in_arg.
   * </pre>
   *
   * <code>repeated string arg_order = 11;</code>
   */
  public com.google.protobuf.ProtocolStringList
  getArgOrderList() {
    return argOrder_;
  }

  /**
   * <pre>
   * List of original in_arg names to specify new argument order.
   * Length of arg_order should be either empty to keep current order
   * or match size of in_arg.
   * </pre>
   *
   * <code>repeated string arg_order = 11;</code>
   */
  public int getArgOrderCount() {
    return argOrder_.size();
  }

  /**
   * <pre>
   * List of original in_arg names to specify new argument order.
   * Length of arg_order should be either empty to keep current order
   * or match size of in_arg.
   * </pre>
   *
   * <code>repeated string arg_order = 11;</code>
   */
  public String getArgOrder(int index) {
    return argOrder_.get(index);
  }

  /**
   * <pre>
   * List of original in_arg names to specify new argument order.
   * Length of arg_order should be either empty to keep current order
   * or match size of in_arg.
   * </pre>
   *
   * <code>repeated string arg_order = 11;</code>
   */
  public com.google.protobuf.ByteString
  getArgOrderBytes(int index) {
    return argOrder_.getByteString(index);
  }

  public static final int ATTR_FIELD_NUMBER = 6;
  private java.util.List<Attr> attr_;

  /**
   * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
   */
  public java.util.List<Attr> getAttrList() {
    return attr_;
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
   */
  public java.util.List<? extends AttrOrBuilder>
  getAttrOrBuilderList() {
    return attr_;
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
   */
  public int getAttrCount() {
    return attr_.size();
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
   */
  public Attr getAttr(int index) {
    return attr_.get(index);
  }

  /**
   * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
   */
  public AttrOrBuilder getAttrOrBuilder(
      int index) {
    return attr_.get(index);
  }

  public static final int SUMMARY_FIELD_NUMBER = 7;
  private volatile Object summary_;

  /**
   * <pre>
   * One-line human-readable description of what the Op does.
   * </pre>
   *
   * <code>string summary = 7;</code>
   */
  public String getSummary() {
    Object ref = summary_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      summary_ = s;
      return s;
    }
  }

  /**
   * <pre>
   * One-line human-readable description of what the Op does.
   * </pre>
   *
   * <code>string summary = 7;</code>
   */
  public com.google.protobuf.ByteString
  getSummaryBytes() {
    Object ref = summary_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      summary_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 8;
  private volatile Object description_;

  /**
   * <pre>
   * Additional, longer human-readable description of what the Op does.
   * </pre>
   *
   * <code>string description = 8;</code>
   */
  public String getDescription() {
    Object ref = description_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      description_ = s;
      return s;
    }
  }

  /**
   * <pre>
   * Additional, longer human-readable description of what the Op does.
   * </pre>
   *
   * <code>string description = 8;</code>
   */
  public com.google.protobuf.ByteString
  getDescriptionBytes() {
    Object ref = description_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      description_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESCRIPTION_PREFIX_FIELD_NUMBER = 9;
  private volatile Object descriptionPrefix_;

  /**
   * <pre>
   * Modify an existing/inherited description by adding text to the beginning
   * or end.
   * </pre>
   *
   * <code>string description_prefix = 9;</code>
   */
  public String getDescriptionPrefix() {
    Object ref = descriptionPrefix_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      descriptionPrefix_ = s;
      return s;
    }
  }

  /**
   * <pre>
   * Modify an existing/inherited description by adding text to the beginning
   * or end.
   * </pre>
   *
   * <code>string description_prefix = 9;</code>
   */
  public com.google.protobuf.ByteString
  getDescriptionPrefixBytes() {
    Object ref = descriptionPrefix_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      descriptionPrefix_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESCRIPTION_SUFFIX_FIELD_NUMBER = 10;
  private volatile Object descriptionSuffix_;

  /**
   * <code>string description_suffix = 10;</code>
   */
  public String getDescriptionSuffix() {
    Object ref = descriptionSuffix_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      descriptionSuffix_ = s;
      return s;
    }
  }

  /**
   * <code>string description_suffix = 10;</code>
   */
  public com.google.protobuf.ByteString
  getDescriptionSuffixBytes() {
    Object ref = descriptionSuffix_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      descriptionSuffix_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
      throws java.io.IOException {
    if (!getGraphOpNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, graphOpName_);
    }
    if (visibility_ != Visibility.DEFAULT_VISIBILITY.getNumber()) {
      output.writeEnum(2, visibility_);
    }
    for (int i = 0; i < endpoint_.size(); i++) {
      output.writeMessage(3, endpoint_.get(i));
    }
    for (int i = 0; i < inArg_.size(); i++) {
      output.writeMessage(4, inArg_.get(i));
    }
    for (int i = 0; i < outArg_.size(); i++) {
      output.writeMessage(5, outArg_.get(i));
    }
    for (int i = 0; i < attr_.size(); i++) {
      output.writeMessage(6, attr_.get(i));
    }
    if (!getSummaryBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, summary_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_);
    }
    if (!getDescriptionPrefixBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, descriptionPrefix_);
    }
    if (!getDescriptionSuffixBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, descriptionSuffix_);
    }
    for (int i = 0; i < argOrder_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, argOrder_.getRaw(i));
    }
    if (!getDeprecationMessageBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, deprecationMessage_);
    }
    if (deprecationVersion_ != 0) {
      output.writeInt32(13, deprecationVersion_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getGraphOpNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, graphOpName_);
    }
    if (visibility_ != Visibility.DEFAULT_VISIBILITY.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(2, visibility_);
    }
    for (int i = 0; i < endpoint_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, endpoint_.get(i));
    }
    for (int i = 0; i < inArg_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, inArg_.get(i));
    }
    for (int i = 0; i < outArg_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, outArg_.get(i));
    }
    for (int i = 0; i < attr_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, attr_.get(i));
    }
    if (!getSummaryBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, summary_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_);
    }
    if (!getDescriptionPrefixBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, descriptionPrefix_);
    }
    if (!getDescriptionSuffixBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, descriptionSuffix_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < argOrder_.size(); i++) {
        dataSize += computeStringSizeNoTag(argOrder_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getArgOrderList().size();
    }
    if (!getDeprecationMessageBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, deprecationMessage_);
    }
    if (deprecationVersion_ != 0) {
      size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(13, deprecationVersion_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof ApiDef)) {
      return super.equals(obj);
    }
    ApiDef other = (ApiDef) obj;

    if (!getGraphOpName()
        .equals(other.getGraphOpName())) {
      return false;
    }
    if (!getDeprecationMessage()
        .equals(other.getDeprecationMessage())) return false;
    if (getDeprecationVersion()
        != other.getDeprecationVersion()) return false;
    if (visibility_ != other.visibility_) return false;
    if (!getEndpointList()
        .equals(other.getEndpointList())) return false;
    if (!getInArgList()
        .equals(other.getInArgList())) return false;
    if (!getOutArgList()
        .equals(other.getOutArgList())) return false;
    if (!getArgOrderList()
        .equals(other.getArgOrderList())) return false;
    if (!getAttrList()
        .equals(other.getAttrList())) return false;
    if (!getSummary()
        .equals(other.getSummary())) return false;
    if (!getDescription()
        .equals(other.getDescription())) return false;
    if (!getDescriptionPrefix()
        .equals(other.getDescriptionPrefix())) return false;
    if (!getDescriptionSuffix()
        .equals(other.getDescriptionSuffix())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + GRAPH_OP_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getGraphOpName().hashCode();
    hash = (37 * hash) + DEPRECATION_MESSAGE_FIELD_NUMBER;
    hash = (53 * hash) + getDeprecationMessage().hashCode();
    hash = (37 * hash) + DEPRECATION_VERSION_FIELD_NUMBER;
    hash = (53 * hash) + getDeprecationVersion();
    hash = (37 * hash) + VISIBILITY_FIELD_NUMBER;
    hash = (53 * hash) + visibility_;
    if (getEndpointCount() > 0) {
      hash = (37 * hash) + ENDPOINT_FIELD_NUMBER;
      hash = (53 * hash) + getEndpointList().hashCode();
    }
    if (getInArgCount() > 0) {
      hash = (37 * hash) + IN_ARG_FIELD_NUMBER;
      hash = (53 * hash) + getInArgList().hashCode();
    }
    if (getOutArgCount() > 0) {
      hash = (37 * hash) + OUT_ARG_FIELD_NUMBER;
      hash = (53 * hash) + getOutArgList().hashCode();
    }
    if (getArgOrderCount() > 0) {
      hash = (37 * hash) + ARG_ORDER_FIELD_NUMBER;
      hash = (53 * hash) + getArgOrderList().hashCode();
    }
    if (getAttrCount() > 0) {
      hash = (37 * hash) + ATTR_FIELD_NUMBER;
      hash = (53 * hash) + getAttrList().hashCode();
    }
    hash = (37 * hash) + SUMMARY_FIELD_NUMBER;
    hash = (53 * hash) + getSummary().hashCode();
    hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
    hash = (53 * hash) + getDescription().hashCode();
    hash = (37 * hash) + DESCRIPTION_PREFIX_FIELD_NUMBER;
    hash = (53 * hash) + getDescriptionPrefix().hashCode();
    hash = (37 * hash) + DESCRIPTION_SUFFIX_FIELD_NUMBER;
    hash = (53 * hash) + getDescriptionSuffix().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static ApiDef parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static ApiDef parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static ApiDef parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static ApiDef parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static ApiDef parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static ApiDef parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static ApiDef parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }

  public static ApiDef 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 ApiDef parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static ApiDef 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 ApiDef parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }

  public static ApiDef parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(ApiDef prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }

  /**
   * <pre>
   * Used to specify and override the default API &amp; behavior in the
   * generated code for client languages, from what you would get from
   * the OpDef alone. There will be a set of ApiDefs that are common
   * to all client languages, and another set per client language.
   * The per-client-language ApiDefs will inherit values from the
   * common ApiDefs which it can either replace or modify.
   * We separate the API definition from the OpDef so we can evolve the
   * API while remaining backwards compatible when interpretting old
   * graphs.  Overrides go in an "api_def.pbtxt" file with a text-format
   * ApiDefs message.
   * WARNING: Be *very* careful changing the API for any existing op --
   * you can change the semantics of existing code.  These changes may
   * need to wait until a major release of TensorFlow to avoid breaking
   * our compatibility promises.
   * </pre>
   *
   * Protobuf type {@code tensorflow.ApiDef}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.ApiDef)
      ApiDefOrBuilder {

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

    @Override
    protected FieldAccessorTable
    internalGetFieldAccessorTable() {
      return ApiDefProtos.internal_static_tensorflow_ApiDef_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ApiDef.class, Builder.class);
    }

    // Construct using org.tensorflow.proto.framework.ApiDef.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
          .alwaysUseFieldBuilders) {
        getEndpointFieldBuilder();
        getInArgFieldBuilder();
        getOutArgFieldBuilder();
        getAttrFieldBuilder();
      }
    }

    @Override
    public Builder clear() {
      super.clear();
      graphOpName_ = "";

      deprecationMessage_ = "";

      deprecationVersion_ = 0;

      visibility_ = 0;

      if (endpointBuilder_ == null) {
        endpoint_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        endpointBuilder_.clear();
      }
      if (inArgBuilder_ == null) {
        inArg_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        inArgBuilder_.clear();
      }
      if (outArgBuilder_ == null) {
        outArg_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
      } else {
        outArgBuilder_.clear();
      }
      argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000008);
      if (attrBuilder_ == null) {
        attr_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
      } else {
        attrBuilder_.clear();
      }
      summary_ = "";

      description_ = "";

      descriptionPrefix_ = "";

      descriptionSuffix_ = "";

      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
    getDescriptorForType() {
      return ApiDefProtos.internal_static_tensorflow_ApiDef_descriptor;
    }

    @Override
    public ApiDef getDefaultInstanceForType() {
      return ApiDef.getDefaultInstance();
    }

    @Override
    public ApiDef build() {
      ApiDef result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public ApiDef buildPartial() {
      ApiDef result = new ApiDef(this);
      int from_bitField0_ = bitField0_;
      result.graphOpName_ = graphOpName_;
      result.deprecationMessage_ = deprecationMessage_;
      result.deprecationVersion_ = deprecationVersion_;
      result.visibility_ = visibility_;
      if (endpointBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          endpoint_ = java.util.Collections.unmodifiableList(endpoint_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.endpoint_ = endpoint_;
      } else {
        result.endpoint_ = endpointBuilder_.build();
      }
      if (inArgBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          inArg_ = java.util.Collections.unmodifiableList(inArg_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.inArg_ = inArg_;
      } else {
        result.inArg_ = inArgBuilder_.build();
      }
      if (outArgBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)) {
          outArg_ = java.util.Collections.unmodifiableList(outArg_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.outArg_ = outArg_;
      } else {
        result.outArg_ = outArgBuilder_.build();
      }
      if (((bitField0_ & 0x00000008) != 0)) {
        argOrder_ = argOrder_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000008);
      }
      result.argOrder_ = argOrder_;
      if (attrBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)) {
          attr_ = java.util.Collections.unmodifiableList(attr_);
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.attr_ = attr_;
      } else {
        result.attr_ = attrBuilder_.build();
      }
      result.summary_ = summary_;
      result.description_ = description_;
      result.descriptionPrefix_ = descriptionPrefix_;
      result.descriptionSuffix_ = descriptionSuffix_;
      onBuilt();
      return result;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }

    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }

    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }

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

    public Builder mergeFrom(ApiDef other) {
      if (other == ApiDef.getDefaultInstance()) {
        return this;
      }
      if (!other.getGraphOpName().isEmpty()) {
        graphOpName_ = other.graphOpName_;
        onChanged();
      }
      if (!other.getDeprecationMessage().isEmpty()) {
        deprecationMessage_ = other.deprecationMessage_;
        onChanged();
      }
      if (other.getDeprecationVersion() != 0) {
        setDeprecationVersion(other.getDeprecationVersion());
      }
      if (other.visibility_ != 0) {
        setVisibilityValue(other.getVisibilityValue());
      }
      if (endpointBuilder_ == null) {
        if (!other.endpoint_.isEmpty()) {
          if (endpoint_.isEmpty()) {
            endpoint_ = other.endpoint_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureEndpointIsMutable();
            endpoint_.addAll(other.endpoint_);
          }
          onChanged();
        }
      } else {
        if (!other.endpoint_.isEmpty()) {
          if (endpointBuilder_.isEmpty()) {
            endpointBuilder_.dispose();
            endpointBuilder_ = null;
            endpoint_ = other.endpoint_;
            bitField0_ = (bitField0_ & ~0x00000001);
            endpointBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                    getEndpointFieldBuilder() : null;
          } else {
            endpointBuilder_.addAllMessages(other.endpoint_);
          }
        }
      }
      if (inArgBuilder_ == null) {
        if (!other.inArg_.isEmpty()) {
          if (inArg_.isEmpty()) {
            inArg_ = other.inArg_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureInArgIsMutable();
            inArg_.addAll(other.inArg_);
          }
          onChanged();
        }
      } else {
        if (!other.inArg_.isEmpty()) {
          if (inArgBuilder_.isEmpty()) {
            inArgBuilder_.dispose();
            inArgBuilder_ = null;
            inArg_ = other.inArg_;
            bitField0_ = (bitField0_ & ~0x00000002);
            inArgBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                    getInArgFieldBuilder() : null;
          } else {
            inArgBuilder_.addAllMessages(other.inArg_);
          }
        }
      }
      if (outArgBuilder_ == null) {
        if (!other.outArg_.isEmpty()) {
          if (outArg_.isEmpty()) {
            outArg_ = other.outArg_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureOutArgIsMutable();
            outArg_.addAll(other.outArg_);
          }
          onChanged();
        }
      } else {
        if (!other.outArg_.isEmpty()) {
          if (outArgBuilder_.isEmpty()) {
            outArgBuilder_.dispose();
            outArgBuilder_ = null;
            outArg_ = other.outArg_;
            bitField0_ = (bitField0_ & ~0x00000004);
            outArgBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                    getOutArgFieldBuilder() : null;
          } else {
            outArgBuilder_.addAllMessages(other.outArg_);
          }
        }
      }
      if (!other.argOrder_.isEmpty()) {
        if (argOrder_.isEmpty()) {
          argOrder_ = other.argOrder_;
          bitField0_ = (bitField0_ & ~0x00000008);
        } else {
          ensureArgOrderIsMutable();
          argOrder_.addAll(other.argOrder_);
        }
        onChanged();
      }
      if (attrBuilder_ == null) {
        if (!other.attr_.isEmpty()) {
          if (attr_.isEmpty()) {
            attr_ = other.attr_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureAttrIsMutable();
            attr_.addAll(other.attr_);
          }
          onChanged();
        }
      } else {
        if (!other.attr_.isEmpty()) {
          if (attrBuilder_.isEmpty()) {
            attrBuilder_.dispose();
            attrBuilder_ = null;
            attr_ = other.attr_;
            bitField0_ = (bitField0_ & ~0x00000010);
            attrBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                    getAttrFieldBuilder() : null;
          } else {
            attrBuilder_.addAllMessages(other.attr_);
          }
        }
      }
      if (!other.getSummary().isEmpty()) {
        summary_ = other.summary_;
        onChanged();
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        onChanged();
      }
      if (!other.getDescriptionPrefix().isEmpty()) {
        descriptionPrefix_ = other.descriptionPrefix_;
        onChanged();
      }
      if (!other.getDescriptionSuffix().isEmpty()) {
        descriptionSuffix_ = other.descriptionSuffix_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      ApiDef parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (ApiDef) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private Object graphOpName_ = "";

    /**
     * <pre>
     * Name of the op (in the OpDef) to specify the API for.
     * </pre>
     *
     * <code>string graph_op_name = 1;</code>
     */
    public String getGraphOpName() {
      Object ref = graphOpName_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        graphOpName_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }

    /**
     * <pre>
     * Name of the op (in the OpDef) to specify the API for.
     * </pre>
     *
     * <code>string graph_op_name = 1;</code>
     */
    public com.google.protobuf.ByteString
    getGraphOpNameBytes() {
      Object ref = graphOpName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        graphOpName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <pre>
     * Name of the op (in the OpDef) to specify the API for.
     * </pre>
     *
     * <code>string graph_op_name = 1;</code>
     */
    public Builder setGraphOpName(
        String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      graphOpName_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * Name of the op (in the OpDef) to specify the API for.
     * </pre>
     *
     * <code>string graph_op_name = 1;</code>
     */
    public Builder clearGraphOpName() {

      graphOpName_ = getDefaultInstance().getGraphOpName();
      onChanged();
      return this;
    }

    /**
     * <pre>
     * Name of the op (in the OpDef) to specify the API for.
     * </pre>
     *
     * <code>string graph_op_name = 1;</code>
     */
    public Builder setGraphOpNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      graphOpName_ = value;
      onChanged();
      return this;
    }

    private Object deprecationMessage_ = "";

    /**
     * <pre>
     * If this op is deprecated, set deprecation message to the message
     * that should be logged when this op is used.
     * The message should indicate alternative op to use, if any.
     * </pre>
     *
     * <code>string deprecation_message = 12;</code>
     */
    public String getDeprecationMessage() {
      Object ref = deprecationMessage_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        deprecationMessage_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }

    /**
     * <pre>
     * If this op is deprecated, set deprecation message to the message
     * that should be logged when this op is used.
     * The message should indicate alternative op to use, if any.
     * </pre>
     *
     * <code>string deprecation_message = 12;</code>
     */
    public com.google.protobuf.ByteString
    getDeprecationMessageBytes() {
      Object ref = deprecationMessage_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        deprecationMessage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <pre>
     * If this op is deprecated, set deprecation message to the message
     * that should be logged when this op is used.
     * The message should indicate alternative op to use, if any.
     * </pre>
     *
     * <code>string deprecation_message = 12;</code>
     */
    public Builder setDeprecationMessage(
        String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      deprecationMessage_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * If this op is deprecated, set deprecation message to the message
     * that should be logged when this op is used.
     * The message should indicate alternative op to use, if any.
     * </pre>
     *
     * <code>string deprecation_message = 12;</code>
     */
    public Builder clearDeprecationMessage() {

      deprecationMessage_ = getDefaultInstance().getDeprecationMessage();
      onChanged();
      return this;
    }

    /**
     * <pre>
     * If this op is deprecated, set deprecation message to the message
     * that should be logged when this op is used.
     * The message should indicate alternative op to use, if any.
     * </pre>
     *
     * <code>string deprecation_message = 12;</code>
     */
    public Builder setDeprecationMessageBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      deprecationMessage_ = value;
      onChanged();
      return this;
    }

    private int deprecationVersion_ ;

    /**
     * <pre>
     * Major version when the op will be deleted. For e.g. set this
     * value to 2 if op API should be removed in TensorFlow 2.0 and
     * deprecated in versions before that.
     * </pre>
     *
     * <code>int32 deprecation_version = 13;</code>
     */
    public int getDeprecationVersion() {
      return deprecationVersion_;
    }

    /**
     * <pre>
     * Major version when the op will be deleted. For e.g. set this
     * value to 2 if op API should be removed in TensorFlow 2.0 and
     * deprecated in versions before that.
     * </pre>
     *
     * <code>int32 deprecation_version = 13;</code>
     */
    public Builder setDeprecationVersion(int value) {

      deprecationVersion_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * Major version when the op will be deleted. For e.g. set this
     * value to 2 if op API should be removed in TensorFlow 2.0 and
     * deprecated in versions before that.
     * </pre>
     *
     * <code>int32 deprecation_version = 13;</code>
     */
    public Builder clearDeprecationVersion() {

      deprecationVersion_ = 0;
      onChanged();
      return this;
    }

    private int visibility_ = 0;

    /**
     * <code>.tensorflow.ApiDef.Visibility visibility = 2;</code>
     */
    public int getVisibilityValue() {
      return visibility_;
    }

    /**
     * <code>.tensorflow.ApiDef.Visibility visibility = 2;</code>
     */
    public Builder setVisibilityValue(int value) {
      visibility_ = value;
      onChanged();
      return this;
    }

    /**
     * <code>.tensorflow.ApiDef.Visibility visibility = 2;</code>
     */
    public Visibility getVisibility() {
      @SuppressWarnings("deprecation")
      Visibility result = Visibility.valueOf(visibility_);
      return result == null ? Visibility.UNRECOGNIZED : result;
    }

    /**
     * <code>.tensorflow.ApiDef.Visibility visibility = 2;</code>
     */
    public Builder setVisibility(Visibility value) {
      if (value == null) {
        throw new NullPointerException();
      }

      visibility_ = value.getNumber();
      onChanged();
      return this;
    }

    /**
     * <code>.tensorflow.ApiDef.Visibility visibility = 2;</code>
     */
    public Builder clearVisibility() {

      visibility_ = 0;
      onChanged();
      return this;
    }

    private java.util.List<Endpoint> endpoint_ =
        java.util.Collections.emptyList();

    private void ensureEndpointIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        endpoint_ = new java.util.ArrayList<Endpoint>(endpoint_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Endpoint, Endpoint.Builder, EndpointOrBuilder> endpointBuilder_;

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public java.util.List<Endpoint> getEndpointList() {
      if (endpointBuilder_ == null) {
        return java.util.Collections.unmodifiableList(endpoint_);
      } else {
        return endpointBuilder_.getMessageList();
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public int getEndpointCount() {
      if (endpointBuilder_ == null) {
        return endpoint_.size();
      } else {
        return endpointBuilder_.getCount();
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Endpoint getEndpoint(int index) {
      if (endpointBuilder_ == null) {
        return endpoint_.get(index);
      } else {
        return endpointBuilder_.getMessage(index);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder setEndpoint(
        int index, Endpoint value) {
      if (endpointBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEndpointIsMutable();
        endpoint_.set(index, value);
        onChanged();
      } else {
        endpointBuilder_.setMessage(index, value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder setEndpoint(
        int index, Endpoint.Builder builderForValue) {
      if (endpointBuilder_ == null) {
        ensureEndpointIsMutable();
        endpoint_.set(index, builderForValue.build());
        onChanged();
      } else {
        endpointBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder addEndpoint(Endpoint value) {
      if (endpointBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEndpointIsMutable();
        endpoint_.add(value);
        onChanged();
      } else {
        endpointBuilder_.addMessage(value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder addEndpoint(
        int index, Endpoint value) {
      if (endpointBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEndpointIsMutable();
        endpoint_.add(index, value);
        onChanged();
      } else {
        endpointBuilder_.addMessage(index, value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder addEndpoint(
        Endpoint.Builder builderForValue) {
      if (endpointBuilder_ == null) {
        ensureEndpointIsMutable();
        endpoint_.add(builderForValue.build());
        onChanged();
      } else {
        endpointBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder addEndpoint(
        int index, Endpoint.Builder builderForValue) {
      if (endpointBuilder_ == null) {
        ensureEndpointIsMutable();
        endpoint_.add(index, builderForValue.build());
        onChanged();
      } else {
        endpointBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder addAllEndpoint(
        Iterable<? extends Endpoint> values) {
      if (endpointBuilder_ == null) {
        ensureEndpointIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, endpoint_);
        onChanged();
      } else {
        endpointBuilder_.addAllMessages(values);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder clearEndpoint() {
      if (endpointBuilder_ == null) {
        endpoint_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        endpointBuilder_.clear();
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Builder removeEndpoint(int index) {
      if (endpointBuilder_ == null) {
        ensureEndpointIsMutable();
        endpoint_.remove(index);
        onChanged();
      } else {
        endpointBuilder_.remove(index);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Endpoint.Builder getEndpointBuilder(
        int index) {
      return getEndpointFieldBuilder().getBuilder(index);
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public EndpointOrBuilder getEndpointOrBuilder(
        int index) {
      if (endpointBuilder_ == null) {
        return endpoint_.get(index);
      } else {
        return endpointBuilder_.getMessageOrBuilder(index);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public java.util.List<? extends EndpointOrBuilder>
    getEndpointOrBuilderList() {
      if (endpointBuilder_ != null) {
        return endpointBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(endpoint_);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Endpoint.Builder addEndpointBuilder() {
      return getEndpointFieldBuilder().addBuilder(
          Endpoint.getDefaultInstance());
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public Endpoint.Builder addEndpointBuilder(
        int index) {
      return getEndpointFieldBuilder().addBuilder(
          index, Endpoint.getDefaultInstance());
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Endpoint endpoint = 3;</code>
     */
    public java.util.List<Endpoint.Builder>
    getEndpointBuilderList() {
      return getEndpointFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Endpoint, Endpoint.Builder, EndpointOrBuilder>
    getEndpointFieldBuilder() {
      if (endpointBuilder_ == null) {
        endpointBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            Endpoint, Endpoint.Builder, EndpointOrBuilder>(
            endpoint_,
            ((bitField0_ & 0x00000001) != 0),
            getParentForChildren(),
            isClean());
        endpoint_ = null;
      }
      return endpointBuilder_;
    }

    private java.util.List<Arg> inArg_ =
        java.util.Collections.emptyList();

    private void ensureInArgIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        inArg_ = new java.util.ArrayList<Arg>(inArg_);
        bitField0_ |= 0x00000002;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Arg, Arg.Builder, ArgOrBuilder> inArgBuilder_;

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public java.util.List<Arg> getInArgList() {
      if (inArgBuilder_ == null) {
        return java.util.Collections.unmodifiableList(inArg_);
      } else {
        return inArgBuilder_.getMessageList();
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public int getInArgCount() {
      if (inArgBuilder_ == null) {
        return inArg_.size();
      } else {
        return inArgBuilder_.getCount();
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Arg getInArg(int index) {
      if (inArgBuilder_ == null) {
        return inArg_.get(index);
      } else {
        return inArgBuilder_.getMessage(index);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder setInArg(
        int index, Arg value) {
      if (inArgBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInArgIsMutable();
        inArg_.set(index, value);
        onChanged();
      } else {
        inArgBuilder_.setMessage(index, value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder setInArg(
        int index, Arg.Builder builderForValue) {
      if (inArgBuilder_ == null) {
        ensureInArgIsMutable();
        inArg_.set(index, builderForValue.build());
        onChanged();
      } else {
        inArgBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder addInArg(Arg value) {
      if (inArgBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInArgIsMutable();
        inArg_.add(value);
        onChanged();
      } else {
        inArgBuilder_.addMessage(value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder addInArg(
        int index, Arg value) {
      if (inArgBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInArgIsMutable();
        inArg_.add(index, value);
        onChanged();
      } else {
        inArgBuilder_.addMessage(index, value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder addInArg(
        Arg.Builder builderForValue) {
      if (inArgBuilder_ == null) {
        ensureInArgIsMutable();
        inArg_.add(builderForValue.build());
        onChanged();
      } else {
        inArgBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder addInArg(
        int index, Arg.Builder builderForValue) {
      if (inArgBuilder_ == null) {
        ensureInArgIsMutable();
        inArg_.add(index, builderForValue.build());
        onChanged();
      } else {
        inArgBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder addAllInArg(
        Iterable<? extends Arg> values) {
      if (inArgBuilder_ == null) {
        ensureInArgIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, inArg_);
        onChanged();
      } else {
        inArgBuilder_.addAllMessages(values);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder clearInArg() {
      if (inArgBuilder_ == null) {
        inArg_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        inArgBuilder_.clear();
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Builder removeInArg(int index) {
      if (inArgBuilder_ == null) {
        ensureInArgIsMutable();
        inArg_.remove(index);
        onChanged();
      } else {
        inArgBuilder_.remove(index);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Arg.Builder getInArgBuilder(
        int index) {
      return getInArgFieldBuilder().getBuilder(index);
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public ArgOrBuilder getInArgOrBuilder(
        int index) {
      if (inArgBuilder_ == null) {
        return inArg_.get(index);
      } else {
        return inArgBuilder_.getMessageOrBuilder(index);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public java.util.List<? extends ArgOrBuilder>
    getInArgOrBuilderList() {
      if (inArgBuilder_ != null) {
        return inArgBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(inArg_);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Arg.Builder addInArgBuilder() {
      return getInArgFieldBuilder().addBuilder(
          Arg.getDefaultInstance());
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public Arg.Builder addInArgBuilder(
        int index) {
      return getInArgFieldBuilder().addBuilder(
          index, Arg.getDefaultInstance());
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg in_arg = 4;</code>
     */
    public java.util.List<Arg.Builder>
    getInArgBuilderList() {
      return getInArgFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Arg, Arg.Builder, ArgOrBuilder>
    getInArgFieldBuilder() {
      if (inArgBuilder_ == null) {
        inArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            Arg, Arg.Builder, ArgOrBuilder>(
            inArg_,
            ((bitField0_ & 0x00000002) != 0),
            getParentForChildren(),
            isClean());
        inArg_ = null;
      }
      return inArgBuilder_;
    }

    private java.util.List<Arg> outArg_ =
        java.util.Collections.emptyList();

    private void ensureOutArgIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        outArg_ = new java.util.ArrayList<Arg>(outArg_);
        bitField0_ |= 0x00000004;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Arg, Arg.Builder, ArgOrBuilder> outArgBuilder_;

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public java.util.List<Arg> getOutArgList() {
      if (outArgBuilder_ == null) {
        return java.util.Collections.unmodifiableList(outArg_);
      } else {
        return outArgBuilder_.getMessageList();
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public int getOutArgCount() {
      if (outArgBuilder_ == null) {
        return outArg_.size();
      } else {
        return outArgBuilder_.getCount();
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Arg getOutArg(int index) {
      if (outArgBuilder_ == null) {
        return outArg_.get(index);
      } else {
        return outArgBuilder_.getMessage(index);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder setOutArg(
        int index, Arg value) {
      if (outArgBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOutArgIsMutable();
        outArg_.set(index, value);
        onChanged();
      } else {
        outArgBuilder_.setMessage(index, value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder setOutArg(
        int index, Arg.Builder builderForValue) {
      if (outArgBuilder_ == null) {
        ensureOutArgIsMutable();
        outArg_.set(index, builderForValue.build());
        onChanged();
      } else {
        outArgBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder addOutArg(Arg value) {
      if (outArgBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOutArgIsMutable();
        outArg_.add(value);
        onChanged();
      } else {
        outArgBuilder_.addMessage(value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder addOutArg(
        int index, Arg value) {
      if (outArgBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOutArgIsMutable();
        outArg_.add(index, value);
        onChanged();
      } else {
        outArgBuilder_.addMessage(index, value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder addOutArg(
        Arg.Builder builderForValue) {
      if (outArgBuilder_ == null) {
        ensureOutArgIsMutable();
        outArg_.add(builderForValue.build());
        onChanged();
      } else {
        outArgBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder addOutArg(
        int index, Arg.Builder builderForValue) {
      if (outArgBuilder_ == null) {
        ensureOutArgIsMutable();
        outArg_.add(index, builderForValue.build());
        onChanged();
      } else {
        outArgBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder addAllOutArg(
        Iterable<? extends Arg> values) {
      if (outArgBuilder_ == null) {
        ensureOutArgIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, outArg_);
        onChanged();
      } else {
        outArgBuilder_.addAllMessages(values);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder clearOutArg() {
      if (outArgBuilder_ == null) {
        outArg_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        outArgBuilder_.clear();
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Builder removeOutArg(int index) {
      if (outArgBuilder_ == null) {
        ensureOutArgIsMutable();
        outArg_.remove(index);
        onChanged();
      } else {
        outArgBuilder_.remove(index);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Arg.Builder getOutArgBuilder(
        int index) {
      return getOutArgFieldBuilder().getBuilder(index);
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public ArgOrBuilder getOutArgOrBuilder(
        int index) {
      if (outArgBuilder_ == null) {
        return outArg_.get(index);
      } else {
        return outArgBuilder_.getMessageOrBuilder(index);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public java.util.List<? extends ArgOrBuilder>
    getOutArgOrBuilderList() {
      if (outArgBuilder_ != null) {
        return outArgBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(outArg_);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Arg.Builder addOutArgBuilder() {
      return getOutArgFieldBuilder().addBuilder(
          Arg.getDefaultInstance());
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public Arg.Builder addOutArgBuilder(
        int index) {
      return getOutArgFieldBuilder().addBuilder(
          index, Arg.getDefaultInstance());
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Arg out_arg = 5;</code>
     */
    public java.util.List<Arg.Builder>
    getOutArgBuilderList() {
      return getOutArgFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Arg, Arg.Builder, ArgOrBuilder>
    getOutArgFieldBuilder() {
      if (outArgBuilder_ == null) {
        outArgBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            Arg, Arg.Builder, ArgOrBuilder>(
            outArg_,
            ((bitField0_ & 0x00000004) != 0),
            getParentForChildren(),
            isClean());
        outArg_ = null;
      }
      return outArgBuilder_;
    }

    private com.google.protobuf.LazyStringList argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureArgOrderIsMutable() {
      if (!((bitField0_ & 0x00000008) != 0)) {
        argOrder_ = new com.google.protobuf.LazyStringArrayList(argOrder_);
        bitField0_ |= 0x00000008;
      }
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public com.google.protobuf.ProtocolStringList
    getArgOrderList() {
      return argOrder_.getUnmodifiableView();
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public int getArgOrderCount() {
      return argOrder_.size();
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public String getArgOrder(int index) {
      return argOrder_.get(index);
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public com.google.protobuf.ByteString
    getArgOrderBytes(int index) {
      return argOrder_.getByteString(index);
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public Builder setArgOrder(
        int index, String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureArgOrderIsMutable();
      argOrder_.set(index, value);
      onChanged();
      return this;
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public Builder addArgOrder(
        String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureArgOrderIsMutable();
      argOrder_.add(value);
      onChanged();
      return this;
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public Builder addAllArgOrder(
        Iterable<String> values) {
      ensureArgOrderIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, argOrder_);
      onChanged();
      return this;
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public Builder clearArgOrder() {
      argOrder_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }

    /**
     * <pre>
     * List of original in_arg names to specify new argument order.
     * Length of arg_order should be either empty to keep current order
     * or match size of in_arg.
     * </pre>
     *
     * <code>repeated string arg_order = 11;</code>
     */
    public Builder addArgOrderBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureArgOrderIsMutable();
      argOrder_.add(value);
      onChanged();
      return this;
    }

    private java.util.List<Attr> attr_ =
        java.util.Collections.emptyList();

    private void ensureAttrIsMutable() {
      if (!((bitField0_ & 0x00000010) != 0)) {
        attr_ = new java.util.ArrayList<Attr>(attr_);
        bitField0_ |= 0x00000010;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Attr, Attr.Builder, AttrOrBuilder> attrBuilder_;

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public java.util.List<Attr> getAttrList() {
      if (attrBuilder_ == null) {
        return java.util.Collections.unmodifiableList(attr_);
      } else {
        return attrBuilder_.getMessageList();
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public int getAttrCount() {
      if (attrBuilder_ == null) {
        return attr_.size();
      } else {
        return attrBuilder_.getCount();
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Attr getAttr(int index) {
      if (attrBuilder_ == null) {
        return attr_.get(index);
      } else {
        return attrBuilder_.getMessage(index);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder setAttr(
        int index, Attr value) {
      if (attrBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAttrIsMutable();
        attr_.set(index, value);
        onChanged();
      } else {
        attrBuilder_.setMessage(index, value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder setAttr(
        int index, Attr.Builder builderForValue) {
      if (attrBuilder_ == null) {
        ensureAttrIsMutable();
        attr_.set(index, builderForValue.build());
        onChanged();
      } else {
        attrBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder addAttr(Attr value) {
      if (attrBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAttrIsMutable();
        attr_.add(value);
        onChanged();
      } else {
        attrBuilder_.addMessage(value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder addAttr(
        int index, Attr value) {
      if (attrBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAttrIsMutable();
        attr_.add(index, value);
        onChanged();
      } else {
        attrBuilder_.addMessage(index, value);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder addAttr(
        Attr.Builder builderForValue) {
      if (attrBuilder_ == null) {
        ensureAttrIsMutable();
        attr_.add(builderForValue.build());
        onChanged();
      } else {
        attrBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder addAttr(
        int index, Attr.Builder builderForValue) {
      if (attrBuilder_ == null) {
        ensureAttrIsMutable();
        attr_.add(index, builderForValue.build());
        onChanged();
      } else {
        attrBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder addAllAttr(
        Iterable<? extends Attr> values) {
      if (attrBuilder_ == null) {
        ensureAttrIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, attr_);
        onChanged();
      } else {
        attrBuilder_.addAllMessages(values);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder clearAttr() {
      if (attrBuilder_ == null) {
        attr_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
      } else {
        attrBuilder_.clear();
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Builder removeAttr(int index) {
      if (attrBuilder_ == null) {
        ensureAttrIsMutable();
        attr_.remove(index);
        onChanged();
      } else {
        attrBuilder_.remove(index);
      }
      return this;
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Attr.Builder getAttrBuilder(
        int index) {
      return getAttrFieldBuilder().getBuilder(index);
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public AttrOrBuilder getAttrOrBuilder(
        int index) {
      if (attrBuilder_ == null) {
        return attr_.get(index);
      } else {
        return attrBuilder_.getMessageOrBuilder(index);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public java.util.List<? extends AttrOrBuilder>
    getAttrOrBuilderList() {
      if (attrBuilder_ != null) {
        return attrBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(attr_);
      }
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Attr.Builder addAttrBuilder() {
      return getAttrFieldBuilder().addBuilder(
          Attr.getDefaultInstance());
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public Attr.Builder addAttrBuilder(
        int index) {
      return getAttrFieldBuilder().addBuilder(
          index, Attr.getDefaultInstance());
    }

    /**
     * <code>repeated .tensorflow.ApiDef.Attr attr = 6;</code>
     */
    public java.util.List<Attr.Builder>
    getAttrBuilderList() {
      return getAttrFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Attr, Attr.Builder, AttrOrBuilder>
    getAttrFieldBuilder() {
      if (attrBuilder_ == null) {
        attrBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            Attr, Attr.Builder, AttrOrBuilder>(
            attr_,
            ((bitField0_ & 0x00000010) != 0),
            getParentForChildren(),
            isClean());
        attr_ = null;
      }
      return attrBuilder_;
    }

    private Object summary_ = "";

    /**
     * <pre>
     * One-line human-readable description of what the Op does.
     * </pre>
     *
     * <code>string summary = 7;</code>
     */
    public String getSummary() {
      Object ref = summary_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        summary_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }

    /**
     * <pre>
     * One-line human-readable description of what the Op does.
     * </pre>
     *
     * <code>string summary = 7;</code>
     */
    public com.google.protobuf.ByteString
    getSummaryBytes() {
      Object ref = summary_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        summary_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <pre>
     * One-line human-readable description of what the Op does.
     * </pre>
     *
     * <code>string summary = 7;</code>
     */
    public Builder setSummary(
        String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      summary_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * One-line human-readable description of what the Op does.
     * </pre>
     *
     * <code>string summary = 7;</code>
     */
    public Builder clearSummary() {

      summary_ = getDefaultInstance().getSummary();
      onChanged();
      return this;
    }

    /**
     * <pre>
     * One-line human-readable description of what the Op does.
     * </pre>
     *
     * <code>string summary = 7;</code>
     */
    public Builder setSummaryBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      summary_ = value;
      onChanged();
      return this;
    }

    private Object description_ = "";

    /**
     * <pre>
     * Additional, longer human-readable description of what the Op does.
     * </pre>
     *
     * <code>string description = 8;</code>
     */
    public String getDescription() {
      Object ref = description_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        description_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }

    /**
     * <pre>
     * Additional, longer human-readable description of what the Op does.
     * </pre>
     *
     * <code>string description = 8;</code>
     */
    public com.google.protobuf.ByteString
    getDescriptionBytes() {
      Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <pre>
     * Additional, longer human-readable description of what the Op does.
     * </pre>
     *
     * <code>string description = 8;</code>
     */
    public Builder setDescription(
        String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      description_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * Additional, longer human-readable description of what the Op does.
     * </pre>
     *
     * <code>string description = 8;</code>
     */
    public Builder clearDescription() {

      description_ = getDefaultInstance().getDescription();
      onChanged();
      return this;
    }

    /**
     * <pre>
     * Additional, longer human-readable description of what the Op does.
     * </pre>
     *
     * <code>string description = 8;</code>
     */
    public Builder setDescriptionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      description_ = value;
      onChanged();
      return this;
    }

    private Object descriptionPrefix_ = "";

    /**
     * <pre>
     * Modify an existing/inherited description by adding text to the beginning
     * or end.
     * </pre>
     *
     * <code>string description_prefix = 9;</code>
     */
    public String getDescriptionPrefix() {
      Object ref = descriptionPrefix_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        descriptionPrefix_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }

    /**
     * <pre>
     * Modify an existing/inherited description by adding text to the beginning
     * or end.
     * </pre>
     *
     * <code>string description_prefix = 9;</code>
     */
    public com.google.protobuf.ByteString
    getDescriptionPrefixBytes() {
      Object ref = descriptionPrefix_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        descriptionPrefix_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <pre>
     * Modify an existing/inherited description by adding text to the beginning
     * or end.
     * </pre>
     *
     * <code>string description_prefix = 9;</code>
     */
    public Builder setDescriptionPrefix(
        String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      descriptionPrefix_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * Modify an existing/inherited description by adding text to the beginning
     * or end.
     * </pre>
     *
     * <code>string description_prefix = 9;</code>
     */
    public Builder clearDescriptionPrefix() {

      descriptionPrefix_ = getDefaultInstance().getDescriptionPrefix();
      onChanged();
      return this;
    }

    /**
     * <pre>
     * Modify an existing/inherited description by adding text to the beginning
     * or end.
     * </pre>
     *
     * <code>string description_prefix = 9;</code>
     */
    public Builder setDescriptionPrefixBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      descriptionPrefix_ = value;
      onChanged();
      return this;
    }

    private Object descriptionSuffix_ = "";

    /**
     * <code>string description_suffix = 10;</code>
     */
    public String getDescriptionSuffix() {
      Object ref = descriptionSuffix_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        descriptionSuffix_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }

    /**
     * <code>string description_suffix = 10;</code>
     */
    public com.google.protobuf.ByteString
    getDescriptionSuffixBytes() {
      Object ref = descriptionSuffix_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        descriptionSuffix_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <code>string description_suffix = 10;</code>
     */
    public Builder setDescriptionSuffix(
        String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      descriptionSuffix_ = value;
      onChanged();
      return this;
    }

    /**
     * <code>string description_suffix = 10;</code>
     */
    public Builder clearDescriptionSuffix() {

      descriptionSuffix_ = getDefaultInstance().getDescriptionSuffix();
      onChanged();
      return this;
    }

    /**
     * <code>string description_suffix = 10;</code>
     */
    public Builder setDescriptionSuffixBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      descriptionSuffix_ = value;
      onChanged();
      return this;
    }

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

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

    // @@protoc_insertion_point(builder_scope:tensorflow.ApiDef)
  }

  // @@protoc_insertion_point(class_scope:tensorflow.ApiDef)
  private static final ApiDef DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new ApiDef();
  }

  public static ApiDef getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @Override
  public ApiDef getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

