org.tensorflow.framework.SaveSliceInfoDef Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/framework/variable.proto
package org.tensorflow.framework;
/**
* Protobuf type {@code tensorflow.SaveSliceInfoDef}
*/
public final class SaveSliceInfoDef extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.SaveSliceInfoDef)
SaveSliceInfoDefOrBuilder {
private static final long serialVersionUID = 0L;
// Use SaveSliceInfoDef.newBuilder() to construct.
private SaveSliceInfoDef(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private SaveSliceInfoDef() {
fullName_ = "";
fullShape_ = emptyLongList();
varOffset_ = emptyLongList();
varShape_ = emptyLongList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SaveSliceInfoDef();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SaveSliceInfoDef(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.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();
fullName_ = s;
break;
}
case 16: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
fullShape_ = newLongList();
mutable_bitField0_ |= 0x00000001;
}
fullShape_.addLong(input.readInt64());
break;
}
case 18: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
fullShape_ = newLongList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
fullShape_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
case 24: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
varOffset_ = newLongList();
mutable_bitField0_ |= 0x00000002;
}
varOffset_.addLong(input.readInt64());
break;
}
case 26: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
varOffset_ = newLongList();
mutable_bitField0_ |= 0x00000002;
}
while (input.getBytesUntilLimit() > 0) {
varOffset_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
case 32: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
varShape_ = newLongList();
mutable_bitField0_ |= 0x00000004;
}
varShape_.addLong(input.readInt64());
break;
}
case 34: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
varShape_ = newLongList();
mutable_bitField0_ |= 0x00000004;
}
while (input.getBytesUntilLimit() > 0) {
varShape_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (org.nd4j.shade.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
fullShape_.makeImmutable(); // C
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
varOffset_.makeImmutable(); // C
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
varShape_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.SaveSliceInfoDef.class, org.tensorflow.framework.SaveSliceInfoDef.Builder.class);
}
public static final int FULL_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object fullName_;
/**
*
* Name of the full variable of which this is a slice.
*
*
* string full_name = 1;
* @return The fullName.
*/
@java.lang.Override
public java.lang.String getFullName() {
java.lang.Object ref = fullName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fullName_ = s;
return s;
}
}
/**
*
* Name of the full variable of which this is a slice.
*
*
* string full_name = 1;
* @return The bytes for fullName.
*/
@java.lang.Override
public org.nd4j.shade.protobuf.ByteString
getFullNameBytes() {
java.lang.Object ref = fullName_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
fullName_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int FULL_SHAPE_FIELD_NUMBER = 2;
private org.nd4j.shade.protobuf.Internal.LongList fullShape_;
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @return A list containing the fullShape.
*/
@java.lang.Override
public java.util.List
getFullShapeList() {
return fullShape_;
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @return The count of fullShape.
*/
public int getFullShapeCount() {
return fullShape_.size();
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @param index The index of the element to return.
* @return The fullShape at the given index.
*/
public long getFullShape(int index) {
return fullShape_.getLong(index);
}
private int fullShapeMemoizedSerializedSize = -1;
public static final int VAR_OFFSET_FIELD_NUMBER = 3;
private org.nd4j.shade.protobuf.Internal.LongList varOffset_;
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @return A list containing the varOffset.
*/
@java.lang.Override
public java.util.List
getVarOffsetList() {
return varOffset_;
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @return The count of varOffset.
*/
public int getVarOffsetCount() {
return varOffset_.size();
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @param index The index of the element to return.
* @return The varOffset at the given index.
*/
public long getVarOffset(int index) {
return varOffset_.getLong(index);
}
private int varOffsetMemoizedSerializedSize = -1;
public static final int VAR_SHAPE_FIELD_NUMBER = 4;
private org.nd4j.shade.protobuf.Internal.LongList varShape_;
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @return A list containing the varShape.
*/
@java.lang.Override
public java.util.List
getVarShapeList() {
return varShape_;
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @return The count of varShape.
*/
public int getVarShapeCount() {
return varShape_.size();
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @param index The index of the element to return.
* @return The varShape at the given index.
*/
public long getVarShape(int index) {
return varShape_.getLong(index);
}
private int varShapeMemoizedSerializedSize = -1;
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(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, fullName_);
}
if (getFullShapeList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(fullShapeMemoizedSerializedSize);
}
for (int i = 0; i < fullShape_.size(); i++) {
output.writeInt64NoTag(fullShape_.getLong(i));
}
if (getVarOffsetList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(varOffsetMemoizedSerializedSize);
}
for (int i = 0; i < varOffset_.size(); i++) {
output.writeInt64NoTag(varOffset_.getLong(i));
}
if (getVarShapeList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(varShapeMemoizedSerializedSize);
}
for (int i = 0; i < varShape_.size(); i++) {
output.writeInt64NoTag(varShape_.getLong(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!org.nd4j.shade.protobuf.GeneratedMessageV3.isStringEmpty(fullName_)) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, fullName_);
}
{
int dataSize = 0;
for (int i = 0; i < fullShape_.size(); i++) {
dataSize += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64SizeNoTag(fullShape_.getLong(i));
}
size += dataSize;
if (!getFullShapeList().isEmpty()) {
size += 1;
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
fullShapeMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < varOffset_.size(); i++) {
dataSize += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64SizeNoTag(varOffset_.getLong(i));
}
size += dataSize;
if (!getVarOffsetList().isEmpty()) {
size += 1;
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
varOffsetMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < varShape_.size(); i++) {
dataSize += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64SizeNoTag(varShape_.getLong(i));
}
size += dataSize;
if (!getVarShapeList().isEmpty()) {
size += 1;
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
varShapeMemoizedSerializedSize = dataSize;
}
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.framework.SaveSliceInfoDef)) {
return super.equals(obj);
}
org.tensorflow.framework.SaveSliceInfoDef other = (org.tensorflow.framework.SaveSliceInfoDef) obj;
if (!getFullName()
.equals(other.getFullName())) return false;
if (!getFullShapeList()
.equals(other.getFullShapeList())) return false;
if (!getVarOffsetList()
.equals(other.getVarOffsetList())) return false;
if (!getVarShapeList()
.equals(other.getVarShapeList())) 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) + FULL_NAME_FIELD_NUMBER;
hash = (53 * hash) + getFullName().hashCode();
if (getFullShapeCount() > 0) {
hash = (37 * hash) + FULL_SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getFullShapeList().hashCode();
}
if (getVarOffsetCount() > 0) {
hash = (37 * hash) + VAR_OFFSET_FIELD_NUMBER;
hash = (53 * hash) + getVarOffsetList().hashCode();
}
if (getVarShapeCount() > 0) {
hash = (37 * hash) + VAR_SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getVarShapeList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.SaveSliceInfoDef parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.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.framework.SaveSliceInfoDef 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(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code tensorflow.SaveSliceInfoDef}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.SaveSliceInfoDef)
org.tensorflow.framework.SaveSliceInfoDefOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.SaveSliceInfoDef.class, org.tensorflow.framework.SaveSliceInfoDef.Builder.class);
}
// Construct using org.tensorflow.framework.SaveSliceInfoDef.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
fullName_ = "";
fullShape_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000001);
varOffset_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000002);
varShape_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.VariableProtos.internal_static_tensorflow_SaveSliceInfoDef_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.SaveSliceInfoDef getDefaultInstanceForType() {
return org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.SaveSliceInfoDef build() {
org.tensorflow.framework.SaveSliceInfoDef result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.framework.SaveSliceInfoDef buildPartial() {
org.tensorflow.framework.SaveSliceInfoDef result = new org.tensorflow.framework.SaveSliceInfoDef(this);
int from_bitField0_ = bitField0_;
result.fullName_ = fullName_;
if (((bitField0_ & 0x00000001) != 0)) {
fullShape_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.fullShape_ = fullShape_;
if (((bitField0_ & 0x00000002) != 0)) {
varOffset_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.varOffset_ = varOffset_;
if (((bitField0_ & 0x00000004) != 0)) {
varShape_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.varShape_ = varShape_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.SaveSliceInfoDef) {
return mergeFrom((org.tensorflow.framework.SaveSliceInfoDef)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.SaveSliceInfoDef other) {
if (other == org.tensorflow.framework.SaveSliceInfoDef.getDefaultInstance()) return this;
if (!other.getFullName().isEmpty()) {
fullName_ = other.fullName_;
onChanged();
}
if (!other.fullShape_.isEmpty()) {
if (fullShape_.isEmpty()) {
fullShape_ = other.fullShape_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFullShapeIsMutable();
fullShape_.addAll(other.fullShape_);
}
onChanged();
}
if (!other.varOffset_.isEmpty()) {
if (varOffset_.isEmpty()) {
varOffset_ = other.varOffset_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureVarOffsetIsMutable();
varOffset_.addAll(other.varOffset_);
}
onChanged();
}
if (!other.varShape_.isEmpty()) {
if (varShape_.isEmpty()) {
varShape_ = other.varShape_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureVarShapeIsMutable();
varShape_.addAll(other.varShape_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.SaveSliceInfoDef parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.SaveSliceInfoDef) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object fullName_ = "";
/**
*
* Name of the full variable of which this is a slice.
*
*
* string full_name = 1;
* @return The fullName.
*/
public java.lang.String getFullName() {
java.lang.Object ref = fullName_;
if (!(ref instanceof java.lang.String)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fullName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the full variable of which this is a slice.
*
*
* string full_name = 1;
* @return The bytes for fullName.
*/
public org.nd4j.shade.protobuf.ByteString
getFullNameBytes() {
java.lang.Object ref = fullName_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
fullName_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
*
* Name of the full variable of which this is a slice.
*
*
* string full_name = 1;
* @param value The fullName to set.
* @return This builder for chaining.
*/
public Builder setFullName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
fullName_ = value;
onChanged();
return this;
}
/**
*
* Name of the full variable of which this is a slice.
*
*
* string full_name = 1;
* @return This builder for chaining.
*/
public Builder clearFullName() {
fullName_ = getDefaultInstance().getFullName();
onChanged();
return this;
}
/**
*
* Name of the full variable of which this is a slice.
*
*
* string full_name = 1;
* @param value The bytes for fullName to set.
* @return This builder for chaining.
*/
public Builder setFullNameBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
fullName_ = value;
onChanged();
return this;
}
private org.nd4j.shade.protobuf.Internal.LongList fullShape_ = emptyLongList();
private void ensureFullShapeIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
fullShape_ = mutableCopy(fullShape_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @return A list containing the fullShape.
*/
public java.util.List
getFullShapeList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(fullShape_) : fullShape_;
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @return The count of fullShape.
*/
public int getFullShapeCount() {
return fullShape_.size();
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @param index The index of the element to return.
* @return The fullShape at the given index.
*/
public long getFullShape(int index) {
return fullShape_.getLong(index);
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @param index The index to set the value at.
* @param value The fullShape to set.
* @return This builder for chaining.
*/
public Builder setFullShape(
int index, long value) {
ensureFullShapeIsMutable();
fullShape_.setLong(index, value);
onChanged();
return this;
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @param value The fullShape to add.
* @return This builder for chaining.
*/
public Builder addFullShape(long value) {
ensureFullShapeIsMutable();
fullShape_.addLong(value);
onChanged();
return this;
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @param values The fullShape to add.
* @return This builder for chaining.
*/
public Builder addAllFullShape(
java.lang.Iterable values) {
ensureFullShapeIsMutable();
org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
values, fullShape_);
onChanged();
return this;
}
/**
*
* Shape of the full variable.
*
*
* repeated int64 full_shape = 2;
* @return This builder for chaining.
*/
public Builder clearFullShape() {
fullShape_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private org.nd4j.shade.protobuf.Internal.LongList varOffset_ = emptyLongList();
private void ensureVarOffsetIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
varOffset_ = mutableCopy(varOffset_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @return A list containing the varOffset.
*/
public java.util.List
getVarOffsetList() {
return ((bitField0_ & 0x00000002) != 0) ?
java.util.Collections.unmodifiableList(varOffset_) : varOffset_;
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @return The count of varOffset.
*/
public int getVarOffsetCount() {
return varOffset_.size();
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @param index The index of the element to return.
* @return The varOffset at the given index.
*/
public long getVarOffset(int index) {
return varOffset_.getLong(index);
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @param index The index to set the value at.
* @param value The varOffset to set.
* @return This builder for chaining.
*/
public Builder setVarOffset(
int index, long value) {
ensureVarOffsetIsMutable();
varOffset_.setLong(index, value);
onChanged();
return this;
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @param value The varOffset to add.
* @return This builder for chaining.
*/
public Builder addVarOffset(long value) {
ensureVarOffsetIsMutable();
varOffset_.addLong(value);
onChanged();
return this;
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @param values The varOffset to add.
* @return This builder for chaining.
*/
public Builder addAllVarOffset(
java.lang.Iterable values) {
ensureVarOffsetIsMutable();
org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
values, varOffset_);
onChanged();
return this;
}
/**
*
* Offset of this variable into the full variable.
*
*
* repeated int64 var_offset = 3;
* @return This builder for chaining.
*/
public Builder clearVarOffset() {
varOffset_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
private org.nd4j.shade.protobuf.Internal.LongList varShape_ = emptyLongList();
private void ensureVarShapeIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
varShape_ = mutableCopy(varShape_);
bitField0_ |= 0x00000004;
}
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @return A list containing the varShape.
*/
public java.util.List
getVarShapeList() {
return ((bitField0_ & 0x00000004) != 0) ?
java.util.Collections.unmodifiableList(varShape_) : varShape_;
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @return The count of varShape.
*/
public int getVarShapeCount() {
return varShape_.size();
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @param index The index of the element to return.
* @return The varShape at the given index.
*/
public long getVarShape(int index) {
return varShape_.getLong(index);
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @param index The index to set the value at.
* @param value The varShape to set.
* @return This builder for chaining.
*/
public Builder setVarShape(
int index, long value) {
ensureVarShapeIsMutable();
varShape_.setLong(index, value);
onChanged();
return this;
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @param value The varShape to add.
* @return This builder for chaining.
*/
public Builder addVarShape(long value) {
ensureVarShapeIsMutable();
varShape_.addLong(value);
onChanged();
return this;
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @param values The varShape to add.
* @return This builder for chaining.
*/
public Builder addAllVarShape(
java.lang.Iterable values) {
ensureVarShapeIsMutable();
org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
values, varShape_);
onChanged();
return this;
}
/**
*
* Shape of this variable.
*
*
* repeated int64 var_shape = 4;
* @return This builder for chaining.
*/
public Builder clearVarShape() {
varShape_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.SaveSliceInfoDef)
}
// @@protoc_insertion_point(class_scope:tensorflow.SaveSliceInfoDef)
private static final org.tensorflow.framework.SaveSliceInfoDef DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.SaveSliceInfoDef();
}
public static org.tensorflow.framework.SaveSliceInfoDef getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public SaveSliceInfoDef parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new SaveSliceInfoDef(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.framework.SaveSliceInfoDef getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}