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

package org.tensorflow.proto.framework;

/**
 * <pre>
 * Highly experimental and very likely to change.
 * This encoding uses tags instead of dedicated messages for regularity. In
 * particular the encoding imposes no restrictions on what the parameters of any
 * type should be, which in particular needs to be true for type symbols.
 * </pre>
 *
 * Protobuf type {@code tensorflow.FullTypeDef}
 */
public  final class FullTypeDef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.FullTypeDef)
    FullTypeDefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use FullTypeDef.newBuilder() to construct.
  private FullTypeDef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private FullTypeDef() {
    typeId_ = 0;
    args_ = java.util.Collections.emptyList();
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private FullTypeDef(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 8: {
            int rawValue = input.readEnum();

            typeId_ = rawValue;
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              args_ = new java.util.ArrayList<org.tensorflow.proto.framework.FullTypeDef>();
              mutable_bitField0_ |= 0x00000001;
            }
            args_.add(
                input.readMessage(org.tensorflow.proto.framework.FullTypeDef.parser(), extensionRegistry));
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();
            attrCase_ = 3;
            attr_ = s;
            break;
          }
          case 32: {
            attrCase_ = 4;
            attr_ = input.readInt64();
            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)) {
        args_ = java.util.Collections.unmodifiableList(args_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.framework.FullTypeProtos.internal_static_tensorflow_FullTypeDef_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.framework.FullTypeProtos.internal_static_tensorflow_FullTypeDef_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.framework.FullTypeDef.class, org.tensorflow.proto.framework.FullTypeDef.Builder.class);
  }

  private int attrCase_ = 0;
  private java.lang.Object attr_;
  public enum AttrCase
      implements com.google.protobuf.Internal.EnumLite {
    S(3),
    I(4),
    ATTR_NOT_SET(0);
    private final int value;
    private AttrCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static AttrCase valueOf(int value) {
      return forNumber(value);
    }

    public static AttrCase forNumber(int value) {
      switch (value) {
        case 3: return S;
        case 4: return I;
        case 0: return ATTR_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public AttrCase
  getAttrCase() {
    return AttrCase.forNumber(
        attrCase_);
  }

  public static final int TYPE_ID_FIELD_NUMBER = 1;
  private int typeId_;
  /**
   * <pre>
   * The principal type represented by this object. This may be a concrete type
   * (Tensor, Dataset) a type variable (used for dependent types) a type
   * symbol (Any, Union). See FullTypeId for details.
   * </pre>
   *
   * <code>.tensorflow.FullTypeId type_id = 1;</code>
   */
  public int getTypeIdValue() {
    return typeId_;
  }
  /**
   * <pre>
   * The principal type represented by this object. This may be a concrete type
   * (Tensor, Dataset) a type variable (used for dependent types) a type
   * symbol (Any, Union). See FullTypeId for details.
   * </pre>
   *
   * <code>.tensorflow.FullTypeId type_id = 1;</code>
   */
  public org.tensorflow.proto.framework.FullTypeId getTypeId() {
    @SuppressWarnings("deprecation")
    org.tensorflow.proto.framework.FullTypeId result = org.tensorflow.proto.framework.FullTypeId.valueOf(typeId_);
    return result == null ? org.tensorflow.proto.framework.FullTypeId.UNRECOGNIZED : result;
  }

  public static final int ARGS_FIELD_NUMBER = 2;
  private java.util.List<org.tensorflow.proto.framework.FullTypeDef> args_;
  /**
   * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.FullTypeDef> getArgsList() {
    return args_;
  }
  /**
   * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
   */
  public java.util.List<? extends org.tensorflow.proto.framework.FullTypeDefOrBuilder> 
      getArgsOrBuilderList() {
    return args_;
  }
  /**
   * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
   */
  public int getArgsCount() {
    return args_.size();
  }
  /**
   * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
   */
  public org.tensorflow.proto.framework.FullTypeDef getArgs(int index) {
    return args_.get(index);
  }
  /**
   * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
   */
  public org.tensorflow.proto.framework.FullTypeDefOrBuilder getArgsOrBuilder(
      int index) {
    return args_.get(index);
  }

  public static final int S_FIELD_NUMBER = 3;
  /**
   * <code>string s = 3;</code>
   */
  public java.lang.String getS() {
    java.lang.Object ref = "";
    if (attrCase_ == 3) {
      ref = attr_;
    }
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (attrCase_ == 3) {
        attr_ = s;
      }
      return s;
    }
  }
  /**
   * <code>string s = 3;</code>
   */
  public com.google.protobuf.ByteString
      getSBytes() {
    java.lang.Object ref = "";
    if (attrCase_ == 3) {
      ref = attr_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (attrCase_ == 3) {
        attr_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int I_FIELD_NUMBER = 4;
  /**
   * <pre>
   * TODO(mdan): list/tensor, map? Need to reconcile with TFT_RECORD, etc.
   * </pre>
   *
   * <code>int64 i = 4;</code>
   */
  public long getI() {
    if (attrCase_ == 4) {
      return (java.lang.Long) attr_;
    }
    return 0L;
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (typeId_ != org.tensorflow.proto.framework.FullTypeId.TFT_UNSET.getNumber()) {
      output.writeEnum(1, typeId_);
    }
    for (int i = 0; i < args_.size(); i++) {
      output.writeMessage(2, args_.get(i));
    }
    if (attrCase_ == 3) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, attr_);
    }
    if (attrCase_ == 4) {
      output.writeInt64(
          4, (long)((java.lang.Long) attr_));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (typeId_ != org.tensorflow.proto.framework.FullTypeId.TFT_UNSET.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(1, typeId_);
    }
    for (int i = 0; i < args_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, args_.get(i));
    }
    if (attrCase_ == 3) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, attr_);
    }
    if (attrCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(
            4, (long)((java.lang.Long) attr_));
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof org.tensorflow.proto.framework.FullTypeDef)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.framework.FullTypeDef other = (org.tensorflow.proto.framework.FullTypeDef) obj;

    if (typeId_ != other.typeId_) return false;
    if (!getArgsList()
        .equals(other.getArgsList())) return false;
    if (!getAttrCase().equals(other.getAttrCase())) return false;
    switch (attrCase_) {
      case 3:
        if (!getS()
            .equals(other.getS())) return false;
        break;
      case 4:
        if (getI()
            != other.getI()) return false;
        break;
      case 0:
      default:
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + TYPE_ID_FIELD_NUMBER;
    hash = (53 * hash) + typeId_;
    if (getArgsCount() > 0) {
      hash = (37 * hash) + ARGS_FIELD_NUMBER;
      hash = (53 * hash) + getArgsList().hashCode();
    }
    switch (attrCase_) {
      case 3:
        hash = (37 * hash) + S_FIELD_NUMBER;
        hash = (53 * hash) + getS().hashCode();
        break;
      case 4:
        hash = (37 * hash) + I_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getI());
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.tensorflow.proto.framework.FullTypeDef prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * Highly experimental and very likely to change.
   * This encoding uses tags instead of dedicated messages for regularity. In
   * particular the encoding imposes no restrictions on what the parameters of any
   * type should be, which in particular needs to be true for type symbols.
   * </pre>
   *
   * Protobuf type {@code tensorflow.FullTypeDef}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.FullTypeDef)
      org.tensorflow.proto.framework.FullTypeDefOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.framework.FullTypeProtos.internal_static_tensorflow_FullTypeDef_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.framework.FullTypeProtos.internal_static_tensorflow_FullTypeDef_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.framework.FullTypeDef.class, org.tensorflow.proto.framework.FullTypeDef.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getArgsFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      typeId_ = 0;

      if (argsBuilder_ == null) {
        args_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        argsBuilder_.clear();
      }
      attrCase_ = 0;
      attr_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.proto.framework.FullTypeProtos.internal_static_tensorflow_FullTypeDef_descriptor;
    }

    @java.lang.Override
    public org.tensorflow.proto.framework.FullTypeDef getDefaultInstanceForType() {
      return org.tensorflow.proto.framework.FullTypeDef.getDefaultInstance();
    }

    @java.lang.Override
    public org.tensorflow.proto.framework.FullTypeDef build() {
      org.tensorflow.proto.framework.FullTypeDef result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.tensorflow.proto.framework.FullTypeDef buildPartial() {
      org.tensorflow.proto.framework.FullTypeDef result = new org.tensorflow.proto.framework.FullTypeDef(this);
      int from_bitField0_ = bitField0_;
      result.typeId_ = typeId_;
      if (argsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          args_ = java.util.Collections.unmodifiableList(args_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.args_ = args_;
      } else {
        result.args_ = argsBuilder_.build();
      }
      if (attrCase_ == 3) {
        result.attr_ = attr_;
      }
      if (attrCase_ == 4) {
        result.attr_ = attr_;
      }
      result.attrCase_ = attrCase_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(org.tensorflow.proto.framework.FullTypeDef other) {
      if (other == org.tensorflow.proto.framework.FullTypeDef.getDefaultInstance()) return this;
      if (other.typeId_ != 0) {
        setTypeIdValue(other.getTypeIdValue());
      }
      if (argsBuilder_ == null) {
        if (!other.args_.isEmpty()) {
          if (args_.isEmpty()) {
            args_ = other.args_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureArgsIsMutable();
            args_.addAll(other.args_);
          }
          onChanged();
        }
      } else {
        if (!other.args_.isEmpty()) {
          if (argsBuilder_.isEmpty()) {
            argsBuilder_.dispose();
            argsBuilder_ = null;
            args_ = other.args_;
            bitField0_ = (bitField0_ & ~0x00000001);
            argsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getArgsFieldBuilder() : null;
          } else {
            argsBuilder_.addAllMessages(other.args_);
          }
        }
      }
      switch (other.getAttrCase()) {
        case S: {
          attrCase_ = 3;
          attr_ = other.attr_;
          onChanged();
          break;
        }
        case I: {
          setI(other.getI());
          break;
        }
        case ATTR_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      org.tensorflow.proto.framework.FullTypeDef parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.framework.FullTypeDef) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int attrCase_ = 0;
    private java.lang.Object attr_;
    public AttrCase
        getAttrCase() {
      return AttrCase.forNumber(
          attrCase_);
    }

    public Builder clearAttr() {
      attrCase_ = 0;
      attr_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private int typeId_ = 0;
    /**
     * <pre>
     * The principal type represented by this object. This may be a concrete type
     * (Tensor, Dataset) a type variable (used for dependent types) a type
     * symbol (Any, Union). See FullTypeId for details.
     * </pre>
     *
     * <code>.tensorflow.FullTypeId type_id = 1;</code>
     */
    public int getTypeIdValue() {
      return typeId_;
    }
    /**
     * <pre>
     * The principal type represented by this object. This may be a concrete type
     * (Tensor, Dataset) a type variable (used for dependent types) a type
     * symbol (Any, Union). See FullTypeId for details.
     * </pre>
     *
     * <code>.tensorflow.FullTypeId type_id = 1;</code>
     */
    public Builder setTypeIdValue(int value) {
      typeId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The principal type represented by this object. This may be a concrete type
     * (Tensor, Dataset) a type variable (used for dependent types) a type
     * symbol (Any, Union). See FullTypeId for details.
     * </pre>
     *
     * <code>.tensorflow.FullTypeId type_id = 1;</code>
     */
    public org.tensorflow.proto.framework.FullTypeId getTypeId() {
      @SuppressWarnings("deprecation")
      org.tensorflow.proto.framework.FullTypeId result = org.tensorflow.proto.framework.FullTypeId.valueOf(typeId_);
      return result == null ? org.tensorflow.proto.framework.FullTypeId.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * The principal type represented by this object. This may be a concrete type
     * (Tensor, Dataset) a type variable (used for dependent types) a type
     * symbol (Any, Union). See FullTypeId for details.
     * </pre>
     *
     * <code>.tensorflow.FullTypeId type_id = 1;</code>
     */
    public Builder setTypeId(org.tensorflow.proto.framework.FullTypeId value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      typeId_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The principal type represented by this object. This may be a concrete type
     * (Tensor, Dataset) a type variable (used for dependent types) a type
     * symbol (Any, Union). See FullTypeId for details.
     * </pre>
     *
     * <code>.tensorflow.FullTypeId type_id = 1;</code>
     */
    public Builder clearTypeId() {
      
      typeId_ = 0;
      onChanged();
      return this;
    }

    private java.util.List<org.tensorflow.proto.framework.FullTypeDef> args_ =
      java.util.Collections.emptyList();
    private void ensureArgsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        args_ = new java.util.ArrayList<org.tensorflow.proto.framework.FullTypeDef>(args_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.FullTypeDef, org.tensorflow.proto.framework.FullTypeDef.Builder, org.tensorflow.proto.framework.FullTypeDefOrBuilder> argsBuilder_;

    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.FullTypeDef> getArgsList() {
      if (argsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(args_);
      } else {
        return argsBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public int getArgsCount() {
      if (argsBuilder_ == null) {
        return args_.size();
      } else {
        return argsBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public org.tensorflow.proto.framework.FullTypeDef getArgs(int index) {
      if (argsBuilder_ == null) {
        return args_.get(index);
      } else {
        return argsBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder setArgs(
        int index, org.tensorflow.proto.framework.FullTypeDef value) {
      if (argsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureArgsIsMutable();
        args_.set(index, value);
        onChanged();
      } else {
        argsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder setArgs(
        int index, org.tensorflow.proto.framework.FullTypeDef.Builder builderForValue) {
      if (argsBuilder_ == null) {
        ensureArgsIsMutable();
        args_.set(index, builderForValue.build());
        onChanged();
      } else {
        argsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder addArgs(org.tensorflow.proto.framework.FullTypeDef value) {
      if (argsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureArgsIsMutable();
        args_.add(value);
        onChanged();
      } else {
        argsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder addArgs(
        int index, org.tensorflow.proto.framework.FullTypeDef value) {
      if (argsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureArgsIsMutable();
        args_.add(index, value);
        onChanged();
      } else {
        argsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder addArgs(
        org.tensorflow.proto.framework.FullTypeDef.Builder builderForValue) {
      if (argsBuilder_ == null) {
        ensureArgsIsMutable();
        args_.add(builderForValue.build());
        onChanged();
      } else {
        argsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder addArgs(
        int index, org.tensorflow.proto.framework.FullTypeDef.Builder builderForValue) {
      if (argsBuilder_ == null) {
        ensureArgsIsMutable();
        args_.add(index, builderForValue.build());
        onChanged();
      } else {
        argsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder addAllArgs(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.FullTypeDef> values) {
      if (argsBuilder_ == null) {
        ensureArgsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, args_);
        onChanged();
      } else {
        argsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder clearArgs() {
      if (argsBuilder_ == null) {
        args_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        argsBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public Builder removeArgs(int index) {
      if (argsBuilder_ == null) {
        ensureArgsIsMutable();
        args_.remove(index);
        onChanged();
      } else {
        argsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public org.tensorflow.proto.framework.FullTypeDef.Builder getArgsBuilder(
        int index) {
      return getArgsFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public org.tensorflow.proto.framework.FullTypeDefOrBuilder getArgsOrBuilder(
        int index) {
      if (argsBuilder_ == null) {
        return args_.get(index);  } else {
        return argsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.FullTypeDefOrBuilder> 
         getArgsOrBuilderList() {
      if (argsBuilder_ != null) {
        return argsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(args_);
      }
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public org.tensorflow.proto.framework.FullTypeDef.Builder addArgsBuilder() {
      return getArgsFieldBuilder().addBuilder(
          org.tensorflow.proto.framework.FullTypeDef.getDefaultInstance());
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public org.tensorflow.proto.framework.FullTypeDef.Builder addArgsBuilder(
        int index) {
      return getArgsFieldBuilder().addBuilder(
          index, org.tensorflow.proto.framework.FullTypeDef.getDefaultInstance());
    }
    /**
     * <code>repeated .tensorflow.FullTypeDef args = 2;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.FullTypeDef.Builder> 
         getArgsBuilderList() {
      return getArgsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.FullTypeDef, org.tensorflow.proto.framework.FullTypeDef.Builder, org.tensorflow.proto.framework.FullTypeDefOrBuilder> 
        getArgsFieldBuilder() {
      if (argsBuilder_ == null) {
        argsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.proto.framework.FullTypeDef, org.tensorflow.proto.framework.FullTypeDef.Builder, org.tensorflow.proto.framework.FullTypeDefOrBuilder>(
                args_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        args_ = null;
      }
      return argsBuilder_;
    }

    /**
     * <code>string s = 3;</code>
     */
    public java.lang.String getS() {
      java.lang.Object ref = "";
      if (attrCase_ == 3) {
        ref = attr_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (attrCase_ == 3) {
          attr_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string s = 3;</code>
     */
    public com.google.protobuf.ByteString
        getSBytes() {
      java.lang.Object ref = "";
      if (attrCase_ == 3) {
        ref = attr_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (attrCase_ == 3) {
          attr_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string s = 3;</code>
     */
    public Builder setS(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  attrCase_ = 3;
      attr_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string s = 3;</code>
     */
    public Builder clearS() {
      if (attrCase_ == 3) {
        attrCase_ = 0;
        attr_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * <code>string s = 3;</code>
     */
    public Builder setSBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      attrCase_ = 3;
      attr_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * TODO(mdan): list/tensor, map? Need to reconcile with TFT_RECORD, etc.
     * </pre>
     *
     * <code>int64 i = 4;</code>
     */
    public long getI() {
      if (attrCase_ == 4) {
        return (java.lang.Long) attr_;
      }
      return 0L;
    }
    /**
     * <pre>
     * TODO(mdan): list/tensor, map? Need to reconcile with TFT_RECORD, etc.
     * </pre>
     *
     * <code>int64 i = 4;</code>
     */
    public Builder setI(long value) {
      attrCase_ = 4;
      attr_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * TODO(mdan): list/tensor, map? Need to reconcile with TFT_RECORD, etc.
     * </pre>
     *
     * <code>int64 i = 4;</code>
     */
    public Builder clearI() {
      if (attrCase_ == 4) {
        attrCase_ = 0;
        attr_ = null;
        onChanged();
      }
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


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

  // @@protoc_insertion_point(class_scope:tensorflow.FullTypeDef)
  private static final org.tensorflow.proto.framework.FullTypeDef DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.tensorflow.proto.framework.FullTypeDef();
  }

  public static org.tensorflow.proto.framework.FullTypeDef getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public org.tensorflow.proto.framework.FullTypeDef getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

