org.tensorflow.util.SavedSliceMeta Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto Show documentation
Show all versions of proto Show documentation
Java API for TensorFlow protocol buffers.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/util/saved_tensor_slice.proto
package org.tensorflow.util;
/**
*
* Metadata describing the set of slices of the same tensor saved in a
* checkpoint file.
*
*
* 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
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null;
if (shape_ != null) {
subBuilder = shape_.toBuilder();
}
shape_ = input.readMessage(org.tensorflow.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_ & 0x00000008) == 0x00000008)) {
slice_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
slice_.add(
input.readMessage(org.tensorflow.framework.TensorSliceProto.parser(), extensionRegistry));
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_ & 0x00000008) == 0x00000008)) {
slice_ = java.util.Collections.unmodifiableList(slice_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.util.SavedSliceMeta.class, org.tensorflow.util.SavedSliceMeta.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Name of the tensor.
*
*
* string name = 1;
*/
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;
}
}
/**
*
* Name of the tensor.
*
*
* string name = 1;
*/
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.framework.TensorShapeProto shape_;
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public boolean hasShape() {
return shape_ != null;
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto getShape() {
return shape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
return getShape();
}
public static final int TYPE_FIELD_NUMBER = 3;
private int type_;
/**
*
* Type of the tensor
*
*
* .tensorflow.DataType type = 3;
*/
public int getTypeValue() {
return type_;
}
/**
*
* Type of the tensor
*
*
* .tensorflow.DataType type = 3;
*/
public org.tensorflow.framework.DataType getType() {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(type_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
public static final int SLICE_FIELD_NUMBER = 4;
private java.util.List slice_;
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public java.util.List getSliceList() {
return slice_;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public java.util.List extends org.tensorflow.framework.TensorSliceProtoOrBuilder>
getSliceOrBuilderList() {
return slice_;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public int getSliceCount() {
return slice_.size();
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public org.tensorflow.framework.TensorSliceProto getSlice(int index) {
return slice_.get(index);
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public org.tensorflow.framework.TensorSliceProtoOrBuilder getSliceOrBuilder(
int index) {
return slice_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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.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);
}
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.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.util.SavedSliceMeta)) {
return super.equals(obj);
}
org.tensorflow.util.SavedSliceMeta other = (org.tensorflow.util.SavedSliceMeta) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && (hasShape() == other.hasShape());
if (hasShape()) {
result = result && getShape()
.equals(other.getShape());
}
result = result && type_ == other.type_;
result = result && getSliceList()
.equals(other.getSliceList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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.util.SavedSliceMeta parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.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.util.SavedSliceMeta parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.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.util.SavedSliceMeta parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.util.SavedSliceMeta parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.util.SavedSliceMeta parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.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.util.SavedSliceMeta parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.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.util.SavedSliceMeta parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.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);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.util.SavedSliceMeta prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Metadata describing the set of slices of the same tensor saved in a
* checkpoint file.
*
*
* Protobuf type {@code tensorflow.SavedSliceMeta}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.SavedSliceMeta)
org.tensorflow.util.SavedSliceMetaOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.util.SavedSliceMeta.class, org.tensorflow.util.SavedSliceMeta.Builder.class);
}
// Construct using org.tensorflow.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();
}
}
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_ & ~0x00000008);
} else {
sliceBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.util.SavedTensorSliceProtos.internal_static_tensorflow_SavedSliceMeta_descriptor;
}
public org.tensorflow.util.SavedSliceMeta getDefaultInstanceForType() {
return org.tensorflow.util.SavedSliceMeta.getDefaultInstance();
}
public org.tensorflow.util.SavedSliceMeta build() {
org.tensorflow.util.SavedSliceMeta result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.util.SavedSliceMeta buildPartial() {
org.tensorflow.util.SavedSliceMeta result = new org.tensorflow.util.SavedSliceMeta(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
if (shapeBuilder_ == null) {
result.shape_ = shape_;
} else {
result.shape_ = shapeBuilder_.build();
}
result.type_ = type_;
if (sliceBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
slice_ = java.util.Collections.unmodifiableList(slice_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.slice_ = slice_;
} else {
result.slice_ = sliceBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.util.SavedSliceMeta) {
return mergeFrom((org.tensorflow.util.SavedSliceMeta)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.util.SavedSliceMeta other) {
if (other == org.tensorflow.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_ & ~0x00000008);
} else {
ensureSliceIsMutable();
slice_.addAll(other.slice_);
}
onChanged();
}
} else {
if (!other.slice_.isEmpty()) {
if (sliceBuilder_.isEmpty()) {
sliceBuilder_.dispose();
sliceBuilder_ = null;
slice_ = other.slice_;
bitField0_ = (bitField0_ & ~0x00000008);
sliceBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSliceFieldBuilder() : null;
} else {
sliceBuilder_.addAllMessages(other.slice_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.util.SavedSliceMeta parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.util.SavedSliceMeta) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* Name of the tensor.
*
*
* string name = 1;
*/
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;
}
}
/**
*
* Name of the tensor.
*
*
* string name = 1;
*/
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;
}
}
/**
*
* Name of the tensor.
*
*
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name of the tensor.
*
*
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the tensor.
*
*
* string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private org.tensorflow.framework.TensorShapeProto shape_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> shapeBuilder_;
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public boolean hasShape() {
return shapeBuilder_ != null || shape_ != null;
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto getShape() {
if (shapeBuilder_ == null) {
return shape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
} else {
return shapeBuilder_.getMessage();
}
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public Builder setShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
shape_ = value;
onChanged();
} else {
shapeBuilder_.setMessage(value);
}
return this;
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public Builder setShape(
org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (shapeBuilder_ == null) {
shape_ = builderForValue.build();
onChanged();
} else {
shapeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public Builder mergeShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (shape_ != null) {
shape_ =
org.tensorflow.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
} else {
shape_ = value;
}
onChanged();
} else {
shapeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public Builder clearShape() {
if (shapeBuilder_ == null) {
shape_ = null;
onChanged();
} else {
shape_ = null;
shapeBuilder_ = null;
}
return this;
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto.Builder getShapeBuilder() {
onChanged();
return getShapeFieldBuilder().getBuilder();
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
if (shapeBuilder_ != null) {
return shapeBuilder_.getMessageOrBuilder();
} else {
return shape_ == null ?
org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
}
}
/**
*
* Shape of the tensor
*
*
* .tensorflow.TensorShapeProto shape = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>
getShapeFieldBuilder() {
if (shapeBuilder_ == null) {
shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>(
getShape(),
getParentForChildren(),
isClean());
shape_ = null;
}
return shapeBuilder_;
}
private int type_ = 0;
/**
*
* Type of the tensor
*
*
* .tensorflow.DataType type = 3;
*/
public int getTypeValue() {
return type_;
}
/**
*
* Type of the tensor
*
*
* .tensorflow.DataType type = 3;
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* Type of the tensor
*
*
* .tensorflow.DataType type = 3;
*/
public org.tensorflow.framework.DataType getType() {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(type_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
/**
*
* Type of the tensor
*
*
* .tensorflow.DataType type = 3;
*/
public Builder setType(org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type of the tensor
*
*
* .tensorflow.DataType type = 3;
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.util.List slice_ =
java.util.Collections.emptyList();
private void ensureSliceIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
slice_ = new java.util.ArrayList(slice_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorSliceProto, org.tensorflow.framework.TensorSliceProto.Builder, org.tensorflow.framework.TensorSliceProtoOrBuilder> sliceBuilder_;
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public java.util.List getSliceList() {
if (sliceBuilder_ == null) {
return java.util.Collections.unmodifiableList(slice_);
} else {
return sliceBuilder_.getMessageList();
}
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public int getSliceCount() {
if (sliceBuilder_ == null) {
return slice_.size();
} else {
return sliceBuilder_.getCount();
}
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public org.tensorflow.framework.TensorSliceProto getSlice(int index) {
if (sliceBuilder_ == null) {
return slice_.get(index);
} else {
return sliceBuilder_.getMessage(index);
}
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder setSlice(
int index, org.tensorflow.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;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder setSlice(
int index, org.tensorflow.framework.TensorSliceProto.Builder builderForValue) {
if (sliceBuilder_ == null) {
ensureSliceIsMutable();
slice_.set(index, builderForValue.build());
onChanged();
} else {
sliceBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder addSlice(org.tensorflow.framework.TensorSliceProto value) {
if (sliceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSliceIsMutable();
slice_.add(value);
onChanged();
} else {
sliceBuilder_.addMessage(value);
}
return this;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder addSlice(
int index, org.tensorflow.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;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder addSlice(
org.tensorflow.framework.TensorSliceProto.Builder builderForValue) {
if (sliceBuilder_ == null) {
ensureSliceIsMutable();
slice_.add(builderForValue.build());
onChanged();
} else {
sliceBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder addSlice(
int index, org.tensorflow.framework.TensorSliceProto.Builder builderForValue) {
if (sliceBuilder_ == null) {
ensureSliceIsMutable();
slice_.add(index, builderForValue.build());
onChanged();
} else {
sliceBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder addAllSlice(
java.lang.Iterable extends org.tensorflow.framework.TensorSliceProto> values) {
if (sliceBuilder_ == null) {
ensureSliceIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, slice_);
onChanged();
} else {
sliceBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder clearSlice() {
if (sliceBuilder_ == null) {
slice_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
sliceBuilder_.clear();
}
return this;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public Builder removeSlice(int index) {
if (sliceBuilder_ == null) {
ensureSliceIsMutable();
slice_.remove(index);
onChanged();
} else {
sliceBuilder_.remove(index);
}
return this;
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public org.tensorflow.framework.TensorSliceProto.Builder getSliceBuilder(
int index) {
return getSliceFieldBuilder().getBuilder(index);
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public org.tensorflow.framework.TensorSliceProtoOrBuilder getSliceOrBuilder(
int index) {
if (sliceBuilder_ == null) {
return slice_.get(index); } else {
return sliceBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public java.util.List extends org.tensorflow.framework.TensorSliceProtoOrBuilder>
getSliceOrBuilderList() {
if (sliceBuilder_ != null) {
return sliceBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(slice_);
}
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public org.tensorflow.framework.TensorSliceProto.Builder addSliceBuilder() {
return getSliceFieldBuilder().addBuilder(
org.tensorflow.framework.TensorSliceProto.getDefaultInstance());
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public org.tensorflow.framework.TensorSliceProto.Builder addSliceBuilder(
int index) {
return getSliceFieldBuilder().addBuilder(
index, org.tensorflow.framework.TensorSliceProto.getDefaultInstance());
}
/**
*
* Explicit list of slices saved in the checkpoint file.
*
*
* repeated .tensorflow.TensorSliceProto slice = 4;
*/
public java.util.List
getSliceBuilderList() {
return getSliceFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorSliceProto, org.tensorflow.framework.TensorSliceProto.Builder, org.tensorflow.framework.TensorSliceProtoOrBuilder>
getSliceFieldBuilder() {
if (sliceBuilder_ == null) {
sliceBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorSliceProto, org.tensorflow.framework.TensorSliceProto.Builder, org.tensorflow.framework.TensorSliceProtoOrBuilder>(
slice_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
slice_ = null;
}
return sliceBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
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.util.SavedSliceMeta DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.util.SavedSliceMeta();
}
public static org.tensorflow.util.SavedSliceMeta getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
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 parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.util.SavedSliceMeta getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}