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

package org.tensorflow.proto.util;

/**
 * <pre>
 * Metadata describing the set of slices of the same tensor saved in a
 * checkpoint file.
 * </pre>
 *
 * Protobuf type {@code tensorflow.SavedSliceMeta}
 */
public  final class SavedSliceMeta extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tensorflow.SavedSliceMeta)
    SavedSliceMetaOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SavedSliceMeta.newBuilder() to construct.
  private SavedSliceMeta(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SavedSliceMeta() {
    name_ = "";
    type_ = 0;
    slice_ = java.util.Collections.emptyList();
  }

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

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

            name_ = s;
            break;
          }
          case 18: {
            org.tensorflow.proto.framework.TensorShapeProto.Builder subBuilder = null;
            if (shape_ != null) {
              subBuilder = shape_.toBuilder();
            }
            shape_ = input.readMessage(org.tensorflow.proto.framework.TensorShapeProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(shape_);
              shape_ = subBuilder.buildPartial();
            }

            break;
          }
          case 24: {
            int rawValue = input.readEnum();

            type_ = rawValue;
            break;
          }
          case 34: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              slice_ = new java.util.ArrayList<org.tensorflow.proto.framework.TensorSliceProto>();
              mutable_bitField0_ |= 0x00000001;
            }
            slice_.add(
                input.readMessage(org.tensorflow.proto.framework.TensorSliceProto.parser(), extensionRegistry));
            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)) {
        slice_ = java.util.Collections.unmodifiableList(slice_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tensorflow.proto.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tensorflow.proto.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tensorflow.proto.util.SavedSliceMeta.class, org.tensorflow.proto.util.SavedSliceMeta.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   * Name of the tensor.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the tensor.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SHAPE_FIELD_NUMBER = 2;
  private org.tensorflow.proto.framework.TensorShapeProto shape_;
  /**
   * <pre>
   * Shape of the tensor
   * </pre>
   *
   * <code>.tensorflow.TensorShapeProto shape = 2;</code>
   */
  public boolean hasShape() {
    return shape_ != null;
  }
  /**
   * <pre>
   * Shape of the tensor
   * </pre>
   *
   * <code>.tensorflow.TensorShapeProto shape = 2;</code>
   */
  public org.tensorflow.proto.framework.TensorShapeProto getShape() {
    return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_;
  }
  /**
   * <pre>
   * Shape of the tensor
   * </pre>
   *
   * <code>.tensorflow.TensorShapeProto shape = 2;</code>
   */
  public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
    return getShape();
  }

  public static final int TYPE_FIELD_NUMBER = 3;
  private int type_;
  /**
   * <pre>
   * Type of the tensor
   * </pre>
   *
   * <code>.tensorflow.DataType type = 3;</code>
   */
  public int getTypeValue() {
    return type_;
  }
  /**
   * <pre>
   * Type of the tensor
   * </pre>
   *
   * <code>.tensorflow.DataType type = 3;</code>
   */
  public org.tensorflow.proto.framework.DataType getType() {
    @SuppressWarnings("deprecation")
    org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(type_);
    return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result;
  }

  public static final int SLICE_FIELD_NUMBER = 4;
  private java.util.List<org.tensorflow.proto.framework.TensorSliceProto> slice_;
  /**
   * <pre>
   * Explicit list of slices saved in the checkpoint file.
   * </pre>
   *
   * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
   */
  public java.util.List<org.tensorflow.proto.framework.TensorSliceProto> getSliceList() {
    return slice_;
  }
  /**
   * <pre>
   * Explicit list of slices saved in the checkpoint file.
   * </pre>
   *
   * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
   */
  public java.util.List<? extends org.tensorflow.proto.framework.TensorSliceProtoOrBuilder> 
      getSliceOrBuilderList() {
    return slice_;
  }
  /**
   * <pre>
   * Explicit list of slices saved in the checkpoint file.
   * </pre>
   *
   * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
   */
  public int getSliceCount() {
    return slice_.size();
  }
  /**
   * <pre>
   * Explicit list of slices saved in the checkpoint file.
   * </pre>
   *
   * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
   */
  public org.tensorflow.proto.framework.TensorSliceProto getSlice(int index) {
    return slice_.get(index);
  }
  /**
   * <pre>
   * Explicit list of slices saved in the checkpoint file.
   * </pre>
   *
   * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
   */
  public org.tensorflow.proto.framework.TensorSliceProtoOrBuilder getSliceOrBuilder(
      int index) {
    return slice_.get(index);
  }

  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 (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (shape_ != null) {
      output.writeMessage(2, getShape());
    }
    if (type_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) {
      output.writeEnum(3, type_);
    }
    for (int i = 0; i < slice_.size(); i++) {
      output.writeMessage(4, slice_.get(i));
    }
    unknownFields.writeTo(output);
  }

  @java.lang.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 (shape_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getShape());
    }
    if (type_ != org.tensorflow.proto.framework.DataType.DT_INVALID.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(3, type_);
    }
    for (int i = 0; i < slice_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, slice_.get(i));
    }
    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.util.SavedSliceMeta)) {
      return super.equals(obj);
    }
    org.tensorflow.proto.util.SavedSliceMeta other = (org.tensorflow.proto.util.SavedSliceMeta) obj;

    if (!getName()
        .equals(other.getName())) return false;
    if (hasShape() != other.hasShape()) return false;
    if (hasShape()) {
      if (!getShape()
          .equals(other.getShape())) return false;
    }
    if (type_ != other.type_) return false;
    if (!getSliceList()
        .equals(other.getSliceList())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    if (hasShape()) {
      hash = (37 * hash) + SHAPE_FIELD_NUMBER;
      hash = (53 * hash) + getShape().hashCode();
    }
    hash = (37 * hash) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + type_;
    if (getSliceCount() > 0) {
      hash = (37 * hash) + SLICE_FIELD_NUMBER;
      hash = (53 * hash) + getSliceList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tensorflow.proto.util.SavedSliceMeta parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.util.SavedSliceMeta 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.util.SavedSliceMeta parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.util.SavedSliceMeta 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.util.SavedSliceMeta parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tensorflow.proto.util.SavedSliceMeta parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tensorflow.proto.util.SavedSliceMeta parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.util.SavedSliceMeta 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.util.SavedSliceMeta parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.util.SavedSliceMeta 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.util.SavedSliceMeta parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tensorflow.proto.util.SavedSliceMeta 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.util.SavedSliceMeta 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>
   * Metadata describing the set of slices of the same tensor saved in a
   * checkpoint file.
   * </pre>
   *
   * Protobuf type {@code tensorflow.SavedSliceMeta}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tensorflow.SavedSliceMeta)
      org.tensorflow.proto.util.SavedSliceMetaOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tensorflow.proto.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tensorflow.proto.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tensorflow.proto.util.SavedSliceMeta.class, org.tensorflow.proto.util.SavedSliceMeta.Builder.class);
    }

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

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

      if (shapeBuilder_ == null) {
        shape_ = null;
      } else {
        shape_ = null;
        shapeBuilder_ = null;
      }
      type_ = 0;

      if (sliceBuilder_ == null) {
        slice_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        sliceBuilder_.clear();
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tensorflow.proto.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_descriptor;
    }

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

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

    @java.lang.Override
    public org.tensorflow.proto.util.SavedSliceMeta buildPartial() {
      org.tensorflow.proto.util.SavedSliceMeta result = new org.tensorflow.proto.util.SavedSliceMeta(this);
      int from_bitField0_ = bitField0_;
      result.name_ = name_;
      if (shapeBuilder_ == null) {
        result.shape_ = shape_;
      } else {
        result.shape_ = shapeBuilder_.build();
      }
      result.type_ = type_;
      if (sliceBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          slice_ = java.util.Collections.unmodifiableList(slice_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.slice_ = slice_;
      } else {
        result.slice_ = sliceBuilder_.build();
      }
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(org.tensorflow.proto.util.SavedSliceMeta other) {
      if (other == org.tensorflow.proto.util.SavedSliceMeta.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.hasShape()) {
        mergeShape(other.getShape());
      }
      if (other.type_ != 0) {
        setTypeValue(other.getTypeValue());
      }
      if (sliceBuilder_ == null) {
        if (!other.slice_.isEmpty()) {
          if (slice_.isEmpty()) {
            slice_ = other.slice_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureSliceIsMutable();
            slice_.addAll(other.slice_);
          }
          onChanged();
        }
      } else {
        if (!other.slice_.isEmpty()) {
          if (sliceBuilder_.isEmpty()) {
            sliceBuilder_.dispose();
            sliceBuilder_ = null;
            slice_ = other.slice_;
            bitField0_ = (bitField0_ & ~0x00000001);
            sliceBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getSliceFieldBuilder() : null;
          } else {
            sliceBuilder_.addAllMessages(other.slice_);
          }
        }
      }
      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.util.SavedSliceMeta parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tensorflow.proto.util.SavedSliceMeta) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     * <pre>
     * Name of the tensor.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the tensor.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the tensor.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the tensor.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the tensor.
     * </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 org.tensorflow.proto.framework.TensorShapeProto shape_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> shapeBuilder_;
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public boolean hasShape() {
      return shapeBuilder_ != null || shape_ != null;
    }
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public org.tensorflow.proto.framework.TensorShapeProto getShape() {
      if (shapeBuilder_ == null) {
        return shape_ == null ? org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_;
      } else {
        return shapeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public Builder setShape(org.tensorflow.proto.framework.TensorShapeProto value) {
      if (shapeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        shape_ = value;
        onChanged();
      } else {
        shapeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public Builder setShape(
        org.tensorflow.proto.framework.TensorShapeProto.Builder builderForValue) {
      if (shapeBuilder_ == null) {
        shape_ = builderForValue.build();
        onChanged();
      } else {
        shapeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public Builder mergeShape(org.tensorflow.proto.framework.TensorShapeProto value) {
      if (shapeBuilder_ == null) {
        if (shape_ != null) {
          shape_ =
            org.tensorflow.proto.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
        } else {
          shape_ = value;
        }
        onChanged();
      } else {
        shapeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public Builder clearShape() {
      if (shapeBuilder_ == null) {
        shape_ = null;
        onChanged();
      } else {
        shape_ = null;
        shapeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public org.tensorflow.proto.framework.TensorShapeProto.Builder getShapeBuilder() {
      
      onChanged();
      return getShapeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    public org.tensorflow.proto.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
      if (shapeBuilder_ != null) {
        return shapeBuilder_.getMessageOrBuilder();
      } else {
        return shape_ == null ?
            org.tensorflow.proto.framework.TensorShapeProto.getDefaultInstance() : shape_;
      }
    }
    /**
     * <pre>
     * Shape of the tensor
     * </pre>
     *
     * <code>.tensorflow.TensorShapeProto shape = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder> 
        getShapeFieldBuilder() {
      if (shapeBuilder_ == null) {
        shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tensorflow.proto.framework.TensorShapeProto, org.tensorflow.proto.framework.TensorShapeProto.Builder, org.tensorflow.proto.framework.TensorShapeProtoOrBuilder>(
                getShape(),
                getParentForChildren(),
                isClean());
        shape_ = null;
      }
      return shapeBuilder_;
    }

    private int type_ = 0;
    /**
     * <pre>
     * Type of the tensor
     * </pre>
     *
     * <code>.tensorflow.DataType type = 3;</code>
     */
    public int getTypeValue() {
      return type_;
    }
    /**
     * <pre>
     * Type of the tensor
     * </pre>
     *
     * <code>.tensorflow.DataType type = 3;</code>
     */
    public Builder setTypeValue(int value) {
      type_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Type of the tensor
     * </pre>
     *
     * <code>.tensorflow.DataType type = 3;</code>
     */
    public org.tensorflow.proto.framework.DataType getType() {
      @SuppressWarnings("deprecation")
      org.tensorflow.proto.framework.DataType result = org.tensorflow.proto.framework.DataType.valueOf(type_);
      return result == null ? org.tensorflow.proto.framework.DataType.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * Type of the tensor
     * </pre>
     *
     * <code>.tensorflow.DataType type = 3;</code>
     */
    public Builder setType(org.tensorflow.proto.framework.DataType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      type_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Type of the tensor
     * </pre>
     *
     * <code>.tensorflow.DataType type = 3;</code>
     */
    public Builder clearType() {
      
      type_ = 0;
      onChanged();
      return this;
    }

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

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.TensorSliceProto, org.tensorflow.proto.framework.TensorSliceProto.Builder, org.tensorflow.proto.framework.TensorSliceProtoOrBuilder> sliceBuilder_;

    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.TensorSliceProto> getSliceList() {
      if (sliceBuilder_ == null) {
        return java.util.Collections.unmodifiableList(slice_);
      } else {
        return sliceBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public int getSliceCount() {
      if (sliceBuilder_ == null) {
        return slice_.size();
      } else {
        return sliceBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public org.tensorflow.proto.framework.TensorSliceProto getSlice(int index) {
      if (sliceBuilder_ == null) {
        return slice_.get(index);
      } else {
        return sliceBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder setSlice(
        int index, org.tensorflow.proto.framework.TensorSliceProto value) {
      if (sliceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSliceIsMutable();
        slice_.set(index, value);
        onChanged();
      } else {
        sliceBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder setSlice(
        int index, org.tensorflow.proto.framework.TensorSliceProto.Builder builderForValue) {
      if (sliceBuilder_ == null) {
        ensureSliceIsMutable();
        slice_.set(index, builderForValue.build());
        onChanged();
      } else {
        sliceBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder addSlice(org.tensorflow.proto.framework.TensorSliceProto value) {
      if (sliceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSliceIsMutable();
        slice_.add(value);
        onChanged();
      } else {
        sliceBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder addSlice(
        int index, org.tensorflow.proto.framework.TensorSliceProto value) {
      if (sliceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSliceIsMutable();
        slice_.add(index, value);
        onChanged();
      } else {
        sliceBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder addSlice(
        org.tensorflow.proto.framework.TensorSliceProto.Builder builderForValue) {
      if (sliceBuilder_ == null) {
        ensureSliceIsMutable();
        slice_.add(builderForValue.build());
        onChanged();
      } else {
        sliceBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder addSlice(
        int index, org.tensorflow.proto.framework.TensorSliceProto.Builder builderForValue) {
      if (sliceBuilder_ == null) {
        ensureSliceIsMutable();
        slice_.add(index, builderForValue.build());
        onChanged();
      } else {
        sliceBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder addAllSlice(
        java.lang.Iterable<? extends org.tensorflow.proto.framework.TensorSliceProto> values) {
      if (sliceBuilder_ == null) {
        ensureSliceIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, slice_);
        onChanged();
      } else {
        sliceBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder clearSlice() {
      if (sliceBuilder_ == null) {
        slice_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        sliceBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public Builder removeSlice(int index) {
      if (sliceBuilder_ == null) {
        ensureSliceIsMutable();
        slice_.remove(index);
        onChanged();
      } else {
        sliceBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public org.tensorflow.proto.framework.TensorSliceProto.Builder getSliceBuilder(
        int index) {
      return getSliceFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public org.tensorflow.proto.framework.TensorSliceProtoOrBuilder getSliceOrBuilder(
        int index) {
      if (sliceBuilder_ == null) {
        return slice_.get(index);  } else {
        return sliceBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public java.util.List<? extends org.tensorflow.proto.framework.TensorSliceProtoOrBuilder> 
         getSliceOrBuilderList() {
      if (sliceBuilder_ != null) {
        return sliceBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(slice_);
      }
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public org.tensorflow.proto.framework.TensorSliceProto.Builder addSliceBuilder() {
      return getSliceFieldBuilder().addBuilder(
          org.tensorflow.proto.framework.TensorSliceProto.getDefaultInstance());
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public org.tensorflow.proto.framework.TensorSliceProto.Builder addSliceBuilder(
        int index) {
      return getSliceFieldBuilder().addBuilder(
          index, org.tensorflow.proto.framework.TensorSliceProto.getDefaultInstance());
    }
    /**
     * <pre>
     * Explicit list of slices saved in the checkpoint file.
     * </pre>
     *
     * <code>repeated .tensorflow.TensorSliceProto slice = 4;</code>
     */
    public java.util.List<org.tensorflow.proto.framework.TensorSliceProto.Builder> 
         getSliceBuilderList() {
      return getSliceFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.tensorflow.proto.framework.TensorSliceProto, org.tensorflow.proto.framework.TensorSliceProto.Builder, org.tensorflow.proto.framework.TensorSliceProtoOrBuilder> 
        getSliceFieldBuilder() {
      if (sliceBuilder_ == null) {
        sliceBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.tensorflow.proto.framework.TensorSliceProto, org.tensorflow.proto.framework.TensorSliceProto.Builder, org.tensorflow.proto.framework.TensorSliceProtoOrBuilder>(
                slice_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        slice_ = null;
      }
      return sliceBuilder_;
    }
    @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.SavedSliceMeta)
  }

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

  public static org.tensorflow.proto.util.SavedSliceMeta getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

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

}

