org.tensorflow.framework.AttrValue 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/framework/attr_value.proto
package org.tensorflow.framework;
/**
*
* Protocol buffer representing the value for an attr used to configure an Op.
* Comment indicates the corresponding attr type. Only the field matching the
* attr type may be filled.
*
*
* Protobuf type {@code tensorflow.AttrValue}
*/
public final class AttrValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.AttrValue)
AttrValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use AttrValue.newBuilder() to construct.
private AttrValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AttrValue() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AttrValue(
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: {
org.tensorflow.framework.AttrValue.ListValue.Builder subBuilder = null;
if (valueCase_ == 1) {
subBuilder = ((org.tensorflow.framework.AttrValue.ListValue) value_).toBuilder();
}
value_ =
input.readMessage(org.tensorflow.framework.AttrValue.ListValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.tensorflow.framework.AttrValue.ListValue) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 1;
break;
}
case 18: {
valueCase_ = 2;
value_ = input.readBytes();
break;
}
case 24: {
valueCase_ = 3;
value_ = input.readInt64();
break;
}
case 37: {
valueCase_ = 4;
value_ = input.readFloat();
break;
}
case 40: {
valueCase_ = 5;
value_ = input.readBool();
break;
}
case 48: {
int rawValue = input.readEnum();
valueCase_ = 6;
value_ = rawValue;
break;
}
case 58: {
org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null;
if (valueCase_ == 7) {
subBuilder = ((org.tensorflow.framework.TensorShapeProto) value_).toBuilder();
}
value_ =
input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.tensorflow.framework.TensorShapeProto) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 7;
break;
}
case 66: {
org.tensorflow.framework.TensorProto.Builder subBuilder = null;
if (valueCase_ == 8) {
subBuilder = ((org.tensorflow.framework.TensorProto) value_).toBuilder();
}
value_ =
input.readMessage(org.tensorflow.framework.TensorProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.tensorflow.framework.TensorProto) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 8;
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
valueCase_ = 9;
value_ = s;
break;
}
case 82: {
org.tensorflow.framework.NameAttrList.Builder subBuilder = null;
if (valueCase_ == 10) {
subBuilder = ((org.tensorflow.framework.NameAttrList) value_).toBuilder();
}
value_ =
input.readMessage(org.tensorflow.framework.NameAttrList.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.tensorflow.framework.NameAttrList) value_);
value_ = subBuilder.buildPartial();
}
valueCase_ = 10;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.AttrValue.class, org.tensorflow.framework.AttrValue.Builder.class);
}
public interface ListValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.AttrValue.ListValue)
com.google.protobuf.MessageOrBuilder {
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
java.util.List getSList();
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
int getSCount();
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
com.google.protobuf.ByteString getS(int index);
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
java.util.List getIList();
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
int getICount();
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
long getI(int index);
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
java.util.List getFList();
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
int getFCount();
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
float getF(int index);
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
java.util.List getBList();
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
int getBCount();
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
boolean getB(int index);
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
java.util.List getTypeList();
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
int getTypeCount();
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
org.tensorflow.framework.DataType getType(int index);
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
java.util.List
getTypeValueList();
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
int getTypeValue(int index);
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
java.util.List
getShapeList();
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
org.tensorflow.framework.TensorShapeProto getShape(int index);
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
int getShapeCount();
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
java.util.List extends org.tensorflow.framework.TensorShapeProtoOrBuilder>
getShapeOrBuilderList();
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(
int index);
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
java.util.List
getTensorList();
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
org.tensorflow.framework.TensorProto getTensor(int index);
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
int getTensorCount();
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
java.util.List extends org.tensorflow.framework.TensorProtoOrBuilder>
getTensorOrBuilderList();
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder(
int index);
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
java.util.List
getFuncList();
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
org.tensorflow.framework.NameAttrList getFunc(int index);
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
int getFuncCount();
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
java.util.List extends org.tensorflow.framework.NameAttrListOrBuilder>
getFuncOrBuilderList();
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
org.tensorflow.framework.NameAttrListOrBuilder getFuncOrBuilder(
int index);
}
/**
*
* LINT.IfChange
*
*
* Protobuf type {@code tensorflow.AttrValue.ListValue}
*/
public static final class ListValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.AttrValue.ListValue)
ListValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListValue.newBuilder() to construct.
private ListValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListValue() {
s_ = java.util.Collections.emptyList();
i_ = java.util.Collections.emptyList();
f_ = java.util.Collections.emptyList();
b_ = java.util.Collections.emptyList();
type_ = java.util.Collections.emptyList();
shape_ = java.util.Collections.emptyList();
tensor_ = java.util.Collections.emptyList();
func_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListValue(
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 18: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
s_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
s_.add(input.readBytes());
break;
}
case 24: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
i_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
i_.add(input.readInt64());
break;
}
case 26: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
i_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
while (input.getBytesUntilLimit() > 0) {
i_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 37: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
f_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
f_.add(input.readFloat());
break;
}
case 34: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
f_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
while (input.getBytesUntilLimit() > 0) {
f_.add(input.readFloat());
}
input.popLimit(limit);
break;
}
case 40: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
b_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
b_.add(input.readBool());
break;
}
case 42: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
b_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
while (input.getBytesUntilLimit() > 0) {
b_.add(input.readBool());
}
input.popLimit(limit);
break;
}
case 48: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
type_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
type_.add(rawValue);
break;
}
case 50: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
type_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
type_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
shape_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
shape_.add(
input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry));
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
tensor_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
tensor_.add(
input.readMessage(org.tensorflow.framework.TensorProto.parser(), extensionRegistry));
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
func_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
func_.add(
input.readMessage(org.tensorflow.framework.NameAttrList.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_ & 0x00000001) == 0x00000001)) {
s_ = java.util.Collections.unmodifiableList(s_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
i_ = java.util.Collections.unmodifiableList(i_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
f_ = java.util.Collections.unmodifiableList(f_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
b_ = java.util.Collections.unmodifiableList(b_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
type_ = java.util.Collections.unmodifiableList(type_);
}
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
shape_ = java.util.Collections.unmodifiableList(shape_);
}
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
tensor_ = java.util.Collections.unmodifiableList(tensor_);
}
if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
func_ = java.util.Collections.unmodifiableList(func_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.AttrValue.ListValue.class, org.tensorflow.framework.AttrValue.ListValue.Builder.class);
}
public static final int S_FIELD_NUMBER = 2;
private java.util.List s_;
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public java.util.List
getSList() {
return s_;
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public int getSCount() {
return s_.size();
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public com.google.protobuf.ByteString getS(int index) {
return s_.get(index);
}
public static final int I_FIELD_NUMBER = 3;
private java.util.List i_;
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public java.util.List
getIList() {
return i_;
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public int getICount() {
return i_.size();
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public long getI(int index) {
return i_.get(index);
}
private int iMemoizedSerializedSize = -1;
public static final int F_FIELD_NUMBER = 4;
private java.util.List f_;
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public java.util.List
getFList() {
return f_;
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public int getFCount() {
return f_.size();
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public float getF(int index) {
return f_.get(index);
}
private int fMemoizedSerializedSize = -1;
public static final int B_FIELD_NUMBER = 5;
private java.util.List b_;
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public java.util.List
getBList() {
return b_;
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public int getBCount() {
return b_.size();
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public boolean getB(int index) {
return b_.get(index);
}
private int bMemoizedSerializedSize = -1;
public static final int TYPE_FIELD_NUMBER = 6;
private java.util.List type_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, org.tensorflow.framework.DataType> type_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, org.tensorflow.framework.DataType>() {
public org.tensorflow.framework.DataType convert(java.lang.Integer from) {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(from);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
};
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public java.util.List getTypeList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, org.tensorflow.framework.DataType>(type_, type_converter_);
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public int getTypeCount() {
return type_.size();
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public org.tensorflow.framework.DataType getType(int index) {
return type_converter_.convert(type_.get(index));
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public java.util.List
getTypeValueList() {
return type_;
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public int getTypeValue(int index) {
return type_.get(index);
}
private int typeMemoizedSerializedSize;
public static final int SHAPE_FIELD_NUMBER = 7;
private java.util.List shape_;
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public java.util.List getShapeList() {
return shape_;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public java.util.List extends org.tensorflow.framework.TensorShapeProtoOrBuilder>
getShapeOrBuilderList() {
return shape_;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public int getShapeCount() {
return shape_.size();
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProto getShape(int index) {
return shape_.get(index);
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(
int index) {
return shape_.get(index);
}
public static final int TENSOR_FIELD_NUMBER = 8;
private java.util.List tensor_;
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public java.util.List getTensorList() {
return tensor_;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public java.util.List extends org.tensorflow.framework.TensorProtoOrBuilder>
getTensorOrBuilderList() {
return tensor_;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public int getTensorCount() {
return tensor_.size();
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProto getTensor(int index) {
return tensor_.get(index);
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder(
int index) {
return tensor_.get(index);
}
public static final int FUNC_FIELD_NUMBER = 9;
private java.util.List func_;
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public java.util.List getFuncList() {
return func_;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public java.util.List extends org.tensorflow.framework.NameAttrListOrBuilder>
getFuncOrBuilderList() {
return func_;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public int getFuncCount() {
return func_.size();
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public org.tensorflow.framework.NameAttrList getFunc(int index) {
return func_.get(index);
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public org.tensorflow.framework.NameAttrListOrBuilder getFuncOrBuilder(
int index) {
return func_.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 {
getSerializedSize();
for (int i = 0; i < s_.size(); i++) {
output.writeBytes(2, s_.get(i));
}
if (getIList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(iMemoizedSerializedSize);
}
for (int i = 0; i < i_.size(); i++) {
output.writeInt64NoTag(i_.get(i));
}
if (getFList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(fMemoizedSerializedSize);
}
for (int i = 0; i < f_.size(); i++) {
output.writeFloatNoTag(f_.get(i));
}
if (getBList().size() > 0) {
output.writeUInt32NoTag(42);
output.writeUInt32NoTag(bMemoizedSerializedSize);
}
for (int i = 0; i < b_.size(); i++) {
output.writeBoolNoTag(b_.get(i));
}
if (getTypeList().size() > 0) {
output.writeUInt32NoTag(50);
output.writeUInt32NoTag(typeMemoizedSerializedSize);
}
for (int i = 0; i < type_.size(); i++) {
output.writeEnumNoTag(type_.get(i));
}
for (int i = 0; i < shape_.size(); i++) {
output.writeMessage(7, shape_.get(i));
}
for (int i = 0; i < tensor_.size(); i++) {
output.writeMessage(8, tensor_.get(i));
}
for (int i = 0; i < func_.size(); i++) {
output.writeMessage(9, func_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < s_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(s_.get(i));
}
size += dataSize;
size += 1 * getSList().size();
}
{
int dataSize = 0;
for (int i = 0; i < i_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(i_.get(i));
}
size += dataSize;
if (!getIList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
iMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 4 * getFList().size();
size += dataSize;
if (!getFList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
fMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 1 * getBList().size();
size += dataSize;
if (!getBList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
bMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < type_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(type_.get(i));
}
size += dataSize;
if (!getTypeList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}typeMemoizedSerializedSize = dataSize;
}
for (int i = 0; i < shape_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, shape_.get(i));
}
for (int i = 0; i < tensor_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, tensor_.get(i));
}
for (int i = 0; i < func_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, func_.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.framework.AttrValue.ListValue)) {
return super.equals(obj);
}
org.tensorflow.framework.AttrValue.ListValue other = (org.tensorflow.framework.AttrValue.ListValue) obj;
boolean result = true;
result = result && getSList()
.equals(other.getSList());
result = result && getIList()
.equals(other.getIList());
result = result && getFList()
.equals(other.getFList());
result = result && getBList()
.equals(other.getBList());
result = result && type_.equals(other.type_);
result = result && getShapeList()
.equals(other.getShapeList());
result = result && getTensorList()
.equals(other.getTensorList());
result = result && getFuncList()
.equals(other.getFuncList());
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();
if (getSCount() > 0) {
hash = (37 * hash) + S_FIELD_NUMBER;
hash = (53 * hash) + getSList().hashCode();
}
if (getICount() > 0) {
hash = (37 * hash) + I_FIELD_NUMBER;
hash = (53 * hash) + getIList().hashCode();
}
if (getFCount() > 0) {
hash = (37 * hash) + F_FIELD_NUMBER;
hash = (53 * hash) + getFList().hashCode();
}
if (getBCount() > 0) {
hash = (37 * hash) + B_FIELD_NUMBER;
hash = (53 * hash) + getBList().hashCode();
}
if (getTypeCount() > 0) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_.hashCode();
}
if (getShapeCount() > 0) {
hash = (37 * hash) + SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getShapeList().hashCode();
}
if (getTensorCount() > 0) {
hash = (37 * hash) + TENSOR_FIELD_NUMBER;
hash = (53 * hash) + getTensorList().hashCode();
}
if (getFuncCount() > 0) {
hash = (37 * hash) + FUNC_FIELD_NUMBER;
hash = (53 * hash) + getFuncList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.AttrValue.ListValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue.ListValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue.ListValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue.ListValue 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.framework.AttrValue.ListValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue.ListValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue.ListValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue.ListValue 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.framework.AttrValue.ListValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue.ListValue 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.framework.AttrValue.ListValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue.ListValue 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.framework.AttrValue.ListValue 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;
}
/**
*
* LINT.IfChange
*
*
* Protobuf type {@code tensorflow.AttrValue.ListValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.AttrValue.ListValue)
org.tensorflow.framework.AttrValue.ListValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.AttrValue.ListValue.class, org.tensorflow.framework.AttrValue.ListValue.Builder.class);
}
// Construct using org.tensorflow.framework.AttrValue.ListValue.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getShapeFieldBuilder();
getTensorFieldBuilder();
getFuncFieldBuilder();
}
}
public Builder clear() {
super.clear();
s_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
i_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
f_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
b_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
type_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
if (shapeBuilder_ == null) {
shape_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
} else {
shapeBuilder_.clear();
}
if (tensorBuilder_ == null) {
tensor_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
} else {
tensorBuilder_.clear();
}
if (funcBuilder_ == null) {
func_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
} else {
funcBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_ListValue_descriptor;
}
public org.tensorflow.framework.AttrValue.ListValue getDefaultInstanceForType() {
return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance();
}
public org.tensorflow.framework.AttrValue.ListValue build() {
org.tensorflow.framework.AttrValue.ListValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.AttrValue.ListValue buildPartial() {
org.tensorflow.framework.AttrValue.ListValue result = new org.tensorflow.framework.AttrValue.ListValue(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
s_ = java.util.Collections.unmodifiableList(s_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.s_ = s_;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
i_ = java.util.Collections.unmodifiableList(i_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.i_ = i_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
f_ = java.util.Collections.unmodifiableList(f_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.f_ = f_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
b_ = java.util.Collections.unmodifiableList(b_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.b_ = b_;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
type_ = java.util.Collections.unmodifiableList(type_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.type_ = type_;
if (shapeBuilder_ == null) {
if (((bitField0_ & 0x00000020) == 0x00000020)) {
shape_ = java.util.Collections.unmodifiableList(shape_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.shape_ = shape_;
} else {
result.shape_ = shapeBuilder_.build();
}
if (tensorBuilder_ == null) {
if (((bitField0_ & 0x00000040) == 0x00000040)) {
tensor_ = java.util.Collections.unmodifiableList(tensor_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.tensor_ = tensor_;
} else {
result.tensor_ = tensorBuilder_.build();
}
if (funcBuilder_ == null) {
if (((bitField0_ & 0x00000080) == 0x00000080)) {
func_ = java.util.Collections.unmodifiableList(func_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.func_ = func_;
} else {
result.func_ = funcBuilder_.build();
}
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.framework.AttrValue.ListValue) {
return mergeFrom((org.tensorflow.framework.AttrValue.ListValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.AttrValue.ListValue other) {
if (other == org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance()) return this;
if (!other.s_.isEmpty()) {
if (s_.isEmpty()) {
s_ = other.s_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSIsMutable();
s_.addAll(other.s_);
}
onChanged();
}
if (!other.i_.isEmpty()) {
if (i_.isEmpty()) {
i_ = other.i_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureIIsMutable();
i_.addAll(other.i_);
}
onChanged();
}
if (!other.f_.isEmpty()) {
if (f_.isEmpty()) {
f_ = other.f_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureFIsMutable();
f_.addAll(other.f_);
}
onChanged();
}
if (!other.b_.isEmpty()) {
if (b_.isEmpty()) {
b_ = other.b_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureBIsMutable();
b_.addAll(other.b_);
}
onChanged();
}
if (!other.type_.isEmpty()) {
if (type_.isEmpty()) {
type_ = other.type_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureTypeIsMutable();
type_.addAll(other.type_);
}
onChanged();
}
if (shapeBuilder_ == null) {
if (!other.shape_.isEmpty()) {
if (shape_.isEmpty()) {
shape_ = other.shape_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureShapeIsMutable();
shape_.addAll(other.shape_);
}
onChanged();
}
} else {
if (!other.shape_.isEmpty()) {
if (shapeBuilder_.isEmpty()) {
shapeBuilder_.dispose();
shapeBuilder_ = null;
shape_ = other.shape_;
bitField0_ = (bitField0_ & ~0x00000020);
shapeBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getShapeFieldBuilder() : null;
} else {
shapeBuilder_.addAllMessages(other.shape_);
}
}
}
if (tensorBuilder_ == null) {
if (!other.tensor_.isEmpty()) {
if (tensor_.isEmpty()) {
tensor_ = other.tensor_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureTensorIsMutable();
tensor_.addAll(other.tensor_);
}
onChanged();
}
} else {
if (!other.tensor_.isEmpty()) {
if (tensorBuilder_.isEmpty()) {
tensorBuilder_.dispose();
tensorBuilder_ = null;
tensor_ = other.tensor_;
bitField0_ = (bitField0_ & ~0x00000040);
tensorBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTensorFieldBuilder() : null;
} else {
tensorBuilder_.addAllMessages(other.tensor_);
}
}
}
if (funcBuilder_ == null) {
if (!other.func_.isEmpty()) {
if (func_.isEmpty()) {
func_ = other.func_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureFuncIsMutable();
func_.addAll(other.func_);
}
onChanged();
}
} else {
if (!other.func_.isEmpty()) {
if (funcBuilder_.isEmpty()) {
funcBuilder_.dispose();
funcBuilder_ = null;
func_ = other.func_;
bitField0_ = (bitField0_ & ~0x00000080);
funcBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFuncFieldBuilder() : null;
} else {
funcBuilder_.addAllMessages(other.func_);
}
}
}
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.framework.AttrValue.ListValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.AttrValue.ListValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List s_ = java.util.Collections.emptyList();
private void ensureSIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
s_ = new java.util.ArrayList(s_);
bitField0_ |= 0x00000001;
}
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public java.util.List
getSList() {
return java.util.Collections.unmodifiableList(s_);
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public int getSCount() {
return s_.size();
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public com.google.protobuf.ByteString getS(int index) {
return s_.get(index);
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public Builder setS(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureSIsMutable();
s_.set(index, value);
onChanged();
return this;
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public Builder addS(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureSIsMutable();
s_.add(value);
onChanged();
return this;
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public Builder addAllS(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureSIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, s_);
onChanged();
return this;
}
/**
*
* "list(string)"
*
*
* repeated bytes s = 2;
*/
public Builder clearS() {
s_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private java.util.List i_ = java.util.Collections.emptyList();
private void ensureIIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
i_ = new java.util.ArrayList(i_);
bitField0_ |= 0x00000002;
}
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public java.util.List
getIList() {
return java.util.Collections.unmodifiableList(i_);
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public int getICount() {
return i_.size();
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public long getI(int index) {
return i_.get(index);
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public Builder setI(
int index, long value) {
ensureIIsMutable();
i_.set(index, value);
onChanged();
return this;
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public Builder addI(long value) {
ensureIIsMutable();
i_.add(value);
onChanged();
return this;
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public Builder addAllI(
java.lang.Iterable extends java.lang.Long> values) {
ensureIIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, i_);
onChanged();
return this;
}
/**
*
* "list(int)"
*
*
* repeated int64 i = 3 [packed = true];
*/
public Builder clearI() {
i_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
private java.util.List f_ = java.util.Collections.emptyList();
private void ensureFIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
f_ = new java.util.ArrayList(f_);
bitField0_ |= 0x00000004;
}
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public java.util.List
getFList() {
return java.util.Collections.unmodifiableList(f_);
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public int getFCount() {
return f_.size();
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public float getF(int index) {
return f_.get(index);
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public Builder setF(
int index, float value) {
ensureFIsMutable();
f_.set(index, value);
onChanged();
return this;
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public Builder addF(float value) {
ensureFIsMutable();
f_.add(value);
onChanged();
return this;
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public Builder addAllF(
java.lang.Iterable extends java.lang.Float> values) {
ensureFIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, f_);
onChanged();
return this;
}
/**
*
* "list(float)"
*
*
* repeated float f = 4 [packed = true];
*/
public Builder clearF() {
f_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
private java.util.List b_ = java.util.Collections.emptyList();
private void ensureBIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
b_ = new java.util.ArrayList(b_);
bitField0_ |= 0x00000008;
}
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public java.util.List
getBList() {
return java.util.Collections.unmodifiableList(b_);
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public int getBCount() {
return b_.size();
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public boolean getB(int index) {
return b_.get(index);
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public Builder setB(
int index, boolean value) {
ensureBIsMutable();
b_.set(index, value);
onChanged();
return this;
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public Builder addB(boolean value) {
ensureBIsMutable();
b_.add(value);
onChanged();
return this;
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public Builder addAllB(
java.lang.Iterable extends java.lang.Boolean> values) {
ensureBIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, b_);
onChanged();
return this;
}
/**
*
* "list(bool)"
*
*
* repeated bool b = 5 [packed = true];
*/
public Builder clearB() {
b_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
private java.util.List type_ =
java.util.Collections.emptyList();
private void ensureTypeIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
type_ = new java.util.ArrayList(type_);
bitField0_ |= 0x00000010;
}
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public java.util.List getTypeList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, org.tensorflow.framework.DataType>(type_, type_converter_);
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public int getTypeCount() {
return type_.size();
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public org.tensorflow.framework.DataType getType(int index) {
return type_converter_.convert(type_.get(index));
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public Builder setType(
int index, org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
ensureTypeIsMutable();
type_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public Builder addType(org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
ensureTypeIsMutable();
type_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public Builder addAllType(
java.lang.Iterable extends org.tensorflow.framework.DataType> values) {
ensureTypeIsMutable();
for (org.tensorflow.framework.DataType value : values) {
type_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public Builder clearType() {
type_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public java.util.List
getTypeValueList() {
return java.util.Collections.unmodifiableList(type_);
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public int getTypeValue(int index) {
return type_.get(index);
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public Builder setTypeValue(
int index, int value) {
ensureTypeIsMutable();
type_.set(index, value);
onChanged();
return this;
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public Builder addTypeValue(int value) {
ensureTypeIsMutable();
type_.add(value);
onChanged();
return this;
}
/**
*
* "list(type)"
*
*
* repeated .tensorflow.DataType type = 6 [packed = true];
*/
public Builder addAllTypeValue(
java.lang.Iterable values) {
ensureTypeIsMutable();
for (int value : values) {
type_.add(value);
}
onChanged();
return this;
}
private java.util.List shape_ =
java.util.Collections.emptyList();
private void ensureShapeIsMutable() {
if (!((bitField0_ & 0x00000020) == 0x00000020)) {
shape_ = new java.util.ArrayList(shape_);
bitField0_ |= 0x00000020;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> shapeBuilder_;
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public java.util.List getShapeList() {
if (shapeBuilder_ == null) {
return java.util.Collections.unmodifiableList(shape_);
} else {
return shapeBuilder_.getMessageList();
}
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public int getShapeCount() {
if (shapeBuilder_ == null) {
return shape_.size();
} else {
return shapeBuilder_.getCount();
}
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProto getShape(int index) {
if (shapeBuilder_ == null) {
return shape_.get(index);
} else {
return shapeBuilder_.getMessage(index);
}
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder setShape(
int index, org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureShapeIsMutable();
shape_.set(index, value);
onChanged();
} else {
shapeBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder setShape(
int index, org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (shapeBuilder_ == null) {
ensureShapeIsMutable();
shape_.set(index, builderForValue.build());
onChanged();
} else {
shapeBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder addShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureShapeIsMutable();
shape_.add(value);
onChanged();
} else {
shapeBuilder_.addMessage(value);
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder addShape(
int index, org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureShapeIsMutable();
shape_.add(index, value);
onChanged();
} else {
shapeBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder addShape(
org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (shapeBuilder_ == null) {
ensureShapeIsMutable();
shape_.add(builderForValue.build());
onChanged();
} else {
shapeBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder addShape(
int index, org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (shapeBuilder_ == null) {
ensureShapeIsMutable();
shape_.add(index, builderForValue.build());
onChanged();
} else {
shapeBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder addAllShape(
java.lang.Iterable extends org.tensorflow.framework.TensorShapeProto> values) {
if (shapeBuilder_ == null) {
ensureShapeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, shape_);
onChanged();
} else {
shapeBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder clearShape() {
if (shapeBuilder_ == null) {
shape_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
shapeBuilder_.clear();
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public Builder removeShape(int index) {
if (shapeBuilder_ == null) {
ensureShapeIsMutable();
shape_.remove(index);
onChanged();
} else {
shapeBuilder_.remove(index);
}
return this;
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProto.Builder getShapeBuilder(
int index) {
return getShapeFieldBuilder().getBuilder(index);
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder(
int index) {
if (shapeBuilder_ == null) {
return shape_.get(index); } else {
return shapeBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public java.util.List extends org.tensorflow.framework.TensorShapeProtoOrBuilder>
getShapeOrBuilderList() {
if (shapeBuilder_ != null) {
return shapeBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(shape_);
}
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProto.Builder addShapeBuilder() {
return getShapeFieldBuilder().addBuilder(
org.tensorflow.framework.TensorShapeProto.getDefaultInstance());
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProto.Builder addShapeBuilder(
int index) {
return getShapeFieldBuilder().addBuilder(
index, org.tensorflow.framework.TensorShapeProto.getDefaultInstance());
}
/**
*
* "list(shape)"
*
*
* repeated .tensorflow.TensorShapeProto shape = 7;
*/
public java.util.List
getShapeBuilderList() {
return getShapeFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>
getShapeFieldBuilder() {
if (shapeBuilder_ == null) {
shapeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>(
shape_,
((bitField0_ & 0x00000020) == 0x00000020),
getParentForChildren(),
isClean());
shape_ = null;
}
return shapeBuilder_;
}
private java.util.List tensor_ =
java.util.Collections.emptyList();
private void ensureTensorIsMutable() {
if (!((bitField0_ & 0x00000040) == 0x00000040)) {
tensor_ = new java.util.ArrayList(tensor_);
bitField0_ |= 0x00000040;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder> tensorBuilder_;
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public java.util.List getTensorList() {
if (tensorBuilder_ == null) {
return java.util.Collections.unmodifiableList(tensor_);
} else {
return tensorBuilder_.getMessageList();
}
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public int getTensorCount() {
if (tensorBuilder_ == null) {
return tensor_.size();
} else {
return tensorBuilder_.getCount();
}
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProto getTensor(int index) {
if (tensorBuilder_ == null) {
return tensor_.get(index);
} else {
return tensorBuilder_.getMessage(index);
}
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder setTensor(
int index, org.tensorflow.framework.TensorProto value) {
if (tensorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTensorIsMutable();
tensor_.set(index, value);
onChanged();
} else {
tensorBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder setTensor(
int index, org.tensorflow.framework.TensorProto.Builder builderForValue) {
if (tensorBuilder_ == null) {
ensureTensorIsMutable();
tensor_.set(index, builderForValue.build());
onChanged();
} else {
tensorBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder addTensor(org.tensorflow.framework.TensorProto value) {
if (tensorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTensorIsMutable();
tensor_.add(value);
onChanged();
} else {
tensorBuilder_.addMessage(value);
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder addTensor(
int index, org.tensorflow.framework.TensorProto value) {
if (tensorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTensorIsMutable();
tensor_.add(index, value);
onChanged();
} else {
tensorBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder addTensor(
org.tensorflow.framework.TensorProto.Builder builderForValue) {
if (tensorBuilder_ == null) {
ensureTensorIsMutable();
tensor_.add(builderForValue.build());
onChanged();
} else {
tensorBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder addTensor(
int index, org.tensorflow.framework.TensorProto.Builder builderForValue) {
if (tensorBuilder_ == null) {
ensureTensorIsMutable();
tensor_.add(index, builderForValue.build());
onChanged();
} else {
tensorBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder addAllTensor(
java.lang.Iterable extends org.tensorflow.framework.TensorProto> values) {
if (tensorBuilder_ == null) {
ensureTensorIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tensor_);
onChanged();
} else {
tensorBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder clearTensor() {
if (tensorBuilder_ == null) {
tensor_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
tensorBuilder_.clear();
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public Builder removeTensor(int index) {
if (tensorBuilder_ == null) {
ensureTensorIsMutable();
tensor_.remove(index);
onChanged();
} else {
tensorBuilder_.remove(index);
}
return this;
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProto.Builder getTensorBuilder(
int index) {
return getTensorFieldBuilder().getBuilder(index);
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder(
int index) {
if (tensorBuilder_ == null) {
return tensor_.get(index); } else {
return tensorBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public java.util.List extends org.tensorflow.framework.TensorProtoOrBuilder>
getTensorOrBuilderList() {
if (tensorBuilder_ != null) {
return tensorBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(tensor_);
}
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProto.Builder addTensorBuilder() {
return getTensorFieldBuilder().addBuilder(
org.tensorflow.framework.TensorProto.getDefaultInstance());
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProto.Builder addTensorBuilder(
int index) {
return getTensorFieldBuilder().addBuilder(
index, org.tensorflow.framework.TensorProto.getDefaultInstance());
}
/**
*
* "list(tensor)"
*
*
* repeated .tensorflow.TensorProto tensor = 8;
*/
public java.util.List
getTensorBuilderList() {
return getTensorFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder>
getTensorFieldBuilder() {
if (tensorBuilder_ == null) {
tensorBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder>(
tensor_,
((bitField0_ & 0x00000040) == 0x00000040),
getParentForChildren(),
isClean());
tensor_ = null;
}
return tensorBuilder_;
}
private java.util.List func_ =
java.util.Collections.emptyList();
private void ensureFuncIsMutable() {
if (!((bitField0_ & 0x00000080) == 0x00000080)) {
func_ = new java.util.ArrayList(func_);
bitField0_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder> funcBuilder_;
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public java.util.List getFuncList() {
if (funcBuilder_ == null) {
return java.util.Collections.unmodifiableList(func_);
} else {
return funcBuilder_.getMessageList();
}
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public int getFuncCount() {
if (funcBuilder_ == null) {
return func_.size();
} else {
return funcBuilder_.getCount();
}
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public org.tensorflow.framework.NameAttrList getFunc(int index) {
if (funcBuilder_ == null) {
return func_.get(index);
} else {
return funcBuilder_.getMessage(index);
}
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder setFunc(
int index, org.tensorflow.framework.NameAttrList value) {
if (funcBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFuncIsMutable();
func_.set(index, value);
onChanged();
} else {
funcBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder setFunc(
int index, org.tensorflow.framework.NameAttrList.Builder builderForValue) {
if (funcBuilder_ == null) {
ensureFuncIsMutable();
func_.set(index, builderForValue.build());
onChanged();
} else {
funcBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder addFunc(org.tensorflow.framework.NameAttrList value) {
if (funcBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFuncIsMutable();
func_.add(value);
onChanged();
} else {
funcBuilder_.addMessage(value);
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder addFunc(
int index, org.tensorflow.framework.NameAttrList value) {
if (funcBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFuncIsMutable();
func_.add(index, value);
onChanged();
} else {
funcBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder addFunc(
org.tensorflow.framework.NameAttrList.Builder builderForValue) {
if (funcBuilder_ == null) {
ensureFuncIsMutable();
func_.add(builderForValue.build());
onChanged();
} else {
funcBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder addFunc(
int index, org.tensorflow.framework.NameAttrList.Builder builderForValue) {
if (funcBuilder_ == null) {
ensureFuncIsMutable();
func_.add(index, builderForValue.build());
onChanged();
} else {
funcBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder addAllFunc(
java.lang.Iterable extends org.tensorflow.framework.NameAttrList> values) {
if (funcBuilder_ == null) {
ensureFuncIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, func_);
onChanged();
} else {
funcBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder clearFunc() {
if (funcBuilder_ == null) {
func_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
funcBuilder_.clear();
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public Builder removeFunc(int index) {
if (funcBuilder_ == null) {
ensureFuncIsMutable();
func_.remove(index);
onChanged();
} else {
funcBuilder_.remove(index);
}
return this;
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public org.tensorflow.framework.NameAttrList.Builder getFuncBuilder(
int index) {
return getFuncFieldBuilder().getBuilder(index);
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public org.tensorflow.framework.NameAttrListOrBuilder getFuncOrBuilder(
int index) {
if (funcBuilder_ == null) {
return func_.get(index); } else {
return funcBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public java.util.List extends org.tensorflow.framework.NameAttrListOrBuilder>
getFuncOrBuilderList() {
if (funcBuilder_ != null) {
return funcBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(func_);
}
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public org.tensorflow.framework.NameAttrList.Builder addFuncBuilder() {
return getFuncFieldBuilder().addBuilder(
org.tensorflow.framework.NameAttrList.getDefaultInstance());
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public org.tensorflow.framework.NameAttrList.Builder addFuncBuilder(
int index) {
return getFuncFieldBuilder().addBuilder(
index, org.tensorflow.framework.NameAttrList.getDefaultInstance());
}
/**
*
* "list(attr)"
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public java.util.List
getFuncBuilderList() {
return getFuncFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder>
getFuncFieldBuilder() {
if (funcBuilder_ == null) {
funcBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder>(
func_,
((bitField0_ & 0x00000080) == 0x00000080),
getParentForChildren(),
isClean());
func_ = null;
}
return funcBuilder_;
}
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.AttrValue.ListValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.AttrValue.ListValue)
private static final org.tensorflow.framework.AttrValue.ListValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.AttrValue.ListValue();
}
public static org.tensorflow.framework.AttrValue.ListValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ListValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ListValue(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.framework.AttrValue.ListValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int valueCase_ = 0;
private java.lang.Object value_;
public enum ValueCase
implements com.google.protobuf.Internal.EnumLite {
S(2),
I(3),
F(4),
B(5),
TYPE(6),
SHAPE(7),
TENSOR(8),
LIST(1),
FUNC(10),
PLACEHOLDER(9),
VALUE_NOT_SET(0);
private final int value;
private ValueCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueCase valueOf(int value) {
return forNumber(value);
}
public static ValueCase forNumber(int value) {
switch (value) {
case 2: return S;
case 3: return I;
case 4: return F;
case 5: return B;
case 6: return TYPE;
case 7: return SHAPE;
case 8: return TENSOR;
case 1: return LIST;
case 10: return FUNC;
case 9: return PLACEHOLDER;
case 0: return VALUE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public static final int S_FIELD_NUMBER = 2;
/**
*
* "string"
*
*
* bytes s = 2;
*/
public com.google.protobuf.ByteString getS() {
if (valueCase_ == 2) {
return (com.google.protobuf.ByteString) value_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int I_FIELD_NUMBER = 3;
/**
*
* "int"
*
*
* int64 i = 3;
*/
public long getI() {
if (valueCase_ == 3) {
return (java.lang.Long) value_;
}
return 0L;
}
public static final int F_FIELD_NUMBER = 4;
/**
*
* "float"
*
*
* float f = 4;
*/
public float getF() {
if (valueCase_ == 4) {
return (java.lang.Float) value_;
}
return 0F;
}
public static final int B_FIELD_NUMBER = 5;
/**
*
* "bool"
*
*
* bool b = 5;
*/
public boolean getB() {
if (valueCase_ == 5) {
return (java.lang.Boolean) value_;
}
return false;
}
public static final int TYPE_FIELD_NUMBER = 6;
/**
*
* "type"
*
*
* .tensorflow.DataType type = 6;
*/
public int getTypeValue() {
if (valueCase_ == 6) {
return (java.lang.Integer) value_;
}
return 0;
}
/**
*
* "type"
*
*
* .tensorflow.DataType type = 6;
*/
public org.tensorflow.framework.DataType getType() {
if (valueCase_ == 6) {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(
(java.lang.Integer) value_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
return org.tensorflow.framework.DataType.DT_INVALID;
}
public static final int SHAPE_FIELD_NUMBER = 7;
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public boolean hasShape() {
return valueCase_ == 7;
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProto getShape() {
if (valueCase_ == 7) {
return (org.tensorflow.framework.TensorShapeProto) value_;
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
if (valueCase_ == 7) {
return (org.tensorflow.framework.TensorShapeProto) value_;
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
public static final int TENSOR_FIELD_NUMBER = 8;
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public boolean hasTensor() {
return valueCase_ == 8;
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProto getTensor() {
if (valueCase_ == 8) {
return (org.tensorflow.framework.TensorProto) value_;
}
return org.tensorflow.framework.TensorProto.getDefaultInstance();
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder() {
if (valueCase_ == 8) {
return (org.tensorflow.framework.TensorProto) value_;
}
return org.tensorflow.framework.TensorProto.getDefaultInstance();
}
public static final int LIST_FIELD_NUMBER = 1;
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public boolean hasList() {
return valueCase_ == 1;
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public org.tensorflow.framework.AttrValue.ListValue getList() {
if (valueCase_ == 1) {
return (org.tensorflow.framework.AttrValue.ListValue) value_;
}
return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance();
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public org.tensorflow.framework.AttrValue.ListValueOrBuilder getListOrBuilder() {
if (valueCase_ == 1) {
return (org.tensorflow.framework.AttrValue.ListValue) value_;
}
return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance();
}
public static final int FUNC_FIELD_NUMBER = 10;
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public boolean hasFunc() {
return valueCase_ == 10;
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public org.tensorflow.framework.NameAttrList getFunc() {
if (valueCase_ == 10) {
return (org.tensorflow.framework.NameAttrList) value_;
}
return org.tensorflow.framework.NameAttrList.getDefaultInstance();
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public org.tensorflow.framework.NameAttrListOrBuilder getFuncOrBuilder() {
if (valueCase_ == 10) {
return (org.tensorflow.framework.NameAttrList) value_;
}
return org.tensorflow.framework.NameAttrList.getDefaultInstance();
}
public static final int PLACEHOLDER_FIELD_NUMBER = 9;
/**
*
* This is a placeholder only used in nodes defined inside a
* function. It indicates the attr value will be supplied when
* the function is instantiated. For example, let us suppose a
* node "N" in function "FN". "N" has an attr "A" with value
* placeholder = "foo". When FN is instantiated with attr "foo"
* set to "bar", the instantiated node N's attr A will have been
* given the value "bar".
*
*
* string placeholder = 9;
*/
public java.lang.String getPlaceholder() {
java.lang.Object ref = "";
if (valueCase_ == 9) {
ref = value_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 9) {
value_ = s;
}
return s;
}
}
/**
*
* This is a placeholder only used in nodes defined inside a
* function. It indicates the attr value will be supplied when
* the function is instantiated. For example, let us suppose a
* node "N" in function "FN". "N" has an attr "A" with value
* placeholder = "foo". When FN is instantiated with attr "foo"
* set to "bar", the instantiated node N's attr A will have been
* given the value "bar".
*
*
* string placeholder = 9;
*/
public com.google.protobuf.ByteString
getPlaceholderBytes() {
java.lang.Object ref = "";
if (valueCase_ == 9) {
ref = value_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 9) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (valueCase_ == 1) {
output.writeMessage(1, (org.tensorflow.framework.AttrValue.ListValue) value_);
}
if (valueCase_ == 2) {
output.writeBytes(
2, (com.google.protobuf.ByteString) value_);
}
if (valueCase_ == 3) {
output.writeInt64(
3, (long)((java.lang.Long) value_));
}
if (valueCase_ == 4) {
output.writeFloat(
4, (float)((java.lang.Float) value_));
}
if (valueCase_ == 5) {
output.writeBool(
5, (boolean)((java.lang.Boolean) value_));
}
if (valueCase_ == 6) {
output.writeEnum(6, ((java.lang.Integer) value_));
}
if (valueCase_ == 7) {
output.writeMessage(7, (org.tensorflow.framework.TensorShapeProto) value_);
}
if (valueCase_ == 8) {
output.writeMessage(8, (org.tensorflow.framework.TensorProto) value_);
}
if (valueCase_ == 9) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, value_);
}
if (valueCase_ == 10) {
output.writeMessage(10, (org.tensorflow.framework.NameAttrList) value_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (valueCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (org.tensorflow.framework.AttrValue.ListValue) value_);
}
if (valueCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
2, (com.google.protobuf.ByteString) value_);
}
if (valueCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
3, (long)((java.lang.Long) value_));
}
if (valueCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(
4, (float)((java.lang.Float) value_));
}
if (valueCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
5, (boolean)((java.lang.Boolean) value_));
}
if (valueCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, ((java.lang.Integer) value_));
}
if (valueCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (org.tensorflow.framework.TensorShapeProto) value_);
}
if (valueCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (org.tensorflow.framework.TensorProto) value_);
}
if (valueCase_ == 9) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, value_);
}
if (valueCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (org.tensorflow.framework.NameAttrList) value_);
}
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.AttrValue)) {
return super.equals(obj);
}
org.tensorflow.framework.AttrValue other = (org.tensorflow.framework.AttrValue) obj;
boolean result = true;
result = result && getValueCase().equals(
other.getValueCase());
if (!result) return false;
switch (valueCase_) {
case 2:
result = result && getS()
.equals(other.getS());
break;
case 3:
result = result && (getI()
== other.getI());
break;
case 4:
result = result && (
java.lang.Float.floatToIntBits(getF())
== java.lang.Float.floatToIntBits(
other.getF()));
break;
case 5:
result = result && (getB()
== other.getB());
break;
case 6:
result = result && getTypeValue()
== other.getTypeValue();
break;
case 7:
result = result && getShape()
.equals(other.getShape());
break;
case 8:
result = result && getTensor()
.equals(other.getTensor());
break;
case 1:
result = result && getList()
.equals(other.getList());
break;
case 10:
result = result && getFunc()
.equals(other.getFunc());
break;
case 9:
result = result && getPlaceholder()
.equals(other.getPlaceholder());
break;
case 0:
default:
}
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();
switch (valueCase_) {
case 2:
hash = (37 * hash) + S_FIELD_NUMBER;
hash = (53 * hash) + getS().hashCode();
break;
case 3:
hash = (37 * hash) + I_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getI());
break;
case 4:
hash = (37 * hash) + F_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getF());
break;
case 5:
hash = (37 * hash) + B_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getB());
break;
case 6:
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getTypeValue();
break;
case 7:
hash = (37 * hash) + SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getShape().hashCode();
break;
case 8:
hash = (37 * hash) + TENSOR_FIELD_NUMBER;
hash = (53 * hash) + getTensor().hashCode();
break;
case 1:
hash = (37 * hash) + LIST_FIELD_NUMBER;
hash = (53 * hash) + getList().hashCode();
break;
case 10:
hash = (37 * hash) + FUNC_FIELD_NUMBER;
hash = (53 * hash) + getFunc().hashCode();
break;
case 9:
hash = (37 * hash) + PLACEHOLDER_FIELD_NUMBER;
hash = (53 * hash) + getPlaceholder().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.AttrValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue 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.framework.AttrValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue 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.framework.AttrValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue 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.framework.AttrValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue 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.framework.AttrValue 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;
}
/**
*
* Protocol buffer representing the value for an attr used to configure an Op.
* Comment indicates the corresponding attr type. Only the field matching the
* attr type may be filled.
*
*
* Protobuf type {@code tensorflow.AttrValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.AttrValue)
org.tensorflow.framework.AttrValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.AttrValue.class, org.tensorflow.framework.AttrValue.Builder.class);
}
// Construct using org.tensorflow.framework.AttrValue.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
valueCase_ = 0;
value_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor;
}
public org.tensorflow.framework.AttrValue getDefaultInstanceForType() {
return org.tensorflow.framework.AttrValue.getDefaultInstance();
}
public org.tensorflow.framework.AttrValue build() {
org.tensorflow.framework.AttrValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.AttrValue buildPartial() {
org.tensorflow.framework.AttrValue result = new org.tensorflow.framework.AttrValue(this);
if (valueCase_ == 2) {
result.value_ = value_;
}
if (valueCase_ == 3) {
result.value_ = value_;
}
if (valueCase_ == 4) {
result.value_ = value_;
}
if (valueCase_ == 5) {
result.value_ = value_;
}
if (valueCase_ == 6) {
result.value_ = value_;
}
if (valueCase_ == 7) {
if (shapeBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = shapeBuilder_.build();
}
}
if (valueCase_ == 8) {
if (tensorBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = tensorBuilder_.build();
}
}
if (valueCase_ == 1) {
if (listBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = listBuilder_.build();
}
}
if (valueCase_ == 10) {
if (funcBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = funcBuilder_.build();
}
}
if (valueCase_ == 9) {
result.value_ = value_;
}
result.valueCase_ = valueCase_;
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.framework.AttrValue) {
return mergeFrom((org.tensorflow.framework.AttrValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.AttrValue other) {
if (other == org.tensorflow.framework.AttrValue.getDefaultInstance()) return this;
switch (other.getValueCase()) {
case S: {
setS(other.getS());
break;
}
case I: {
setI(other.getI());
break;
}
case F: {
setF(other.getF());
break;
}
case B: {
setB(other.getB());
break;
}
case TYPE: {
setTypeValue(other.getTypeValue());
break;
}
case SHAPE: {
mergeShape(other.getShape());
break;
}
case TENSOR: {
mergeTensor(other.getTensor());
break;
}
case LIST: {
mergeList(other.getList());
break;
}
case FUNC: {
mergeFunc(other.getFunc());
break;
}
case PLACEHOLDER: {
valueCase_ = 9;
value_ = other.value_;
onChanged();
break;
}
case VALUE_NOT_SET: {
break;
}
}
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.framework.AttrValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.AttrValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int valueCase_ = 0;
private java.lang.Object value_;
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public Builder clearValue() {
valueCase_ = 0;
value_ = null;
onChanged();
return this;
}
/**
*
* "string"
*
*
* bytes s = 2;
*/
public com.google.protobuf.ByteString getS() {
if (valueCase_ == 2) {
return (com.google.protobuf.ByteString) value_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* "string"
*
*
* bytes s = 2;
*/
public Builder setS(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 2;
value_ = value;
onChanged();
return this;
}
/**
*
* "string"
*
*
* bytes s = 2;
*/
public Builder clearS() {
if (valueCase_ == 2) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
* "int"
*
*
* int64 i = 3;
*/
public long getI() {
if (valueCase_ == 3) {
return (java.lang.Long) value_;
}
return 0L;
}
/**
*
* "int"
*
*
* int64 i = 3;
*/
public Builder setI(long value) {
valueCase_ = 3;
value_ = value;
onChanged();
return this;
}
/**
*
* "int"
*
*
* int64 i = 3;
*/
public Builder clearI() {
if (valueCase_ == 3) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
* "float"
*
*
* float f = 4;
*/
public float getF() {
if (valueCase_ == 4) {
return (java.lang.Float) value_;
}
return 0F;
}
/**
*
* "float"
*
*
* float f = 4;
*/
public Builder setF(float value) {
valueCase_ = 4;
value_ = value;
onChanged();
return this;
}
/**
*
* "float"
*
*
* float f = 4;
*/
public Builder clearF() {
if (valueCase_ == 4) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
* "bool"
*
*
* bool b = 5;
*/
public boolean getB() {
if (valueCase_ == 5) {
return (java.lang.Boolean) value_;
}
return false;
}
/**
*
* "bool"
*
*
* bool b = 5;
*/
public Builder setB(boolean value) {
valueCase_ = 5;
value_ = value;
onChanged();
return this;
}
/**
*
* "bool"
*
*
* bool b = 5;
*/
public Builder clearB() {
if (valueCase_ == 5) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
* "type"
*
*
* .tensorflow.DataType type = 6;
*/
public int getTypeValue() {
if (valueCase_ == 6) {
return ((java.lang.Integer) value_).intValue();
}
return 0;
}
/**
*
* "type"
*
*
* .tensorflow.DataType type = 6;
*/
public Builder setTypeValue(int value) {
valueCase_ = 6;
value_ = value;
onChanged();
return this;
}
/**
*
* "type"
*
*
* .tensorflow.DataType type = 6;
*/
public org.tensorflow.framework.DataType getType() {
if (valueCase_ == 6) {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(
(java.lang.Integer) value_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
return org.tensorflow.framework.DataType.DT_INVALID;
}
/**
*
* "type"
*
*
* .tensorflow.DataType type = 6;
*/
public Builder setType(org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 6;
value_ = value.getNumber();
onChanged();
return this;
}
/**
*
* "type"
*
*
* .tensorflow.DataType type = 6;
*/
public Builder clearType() {
if (valueCase_ == 6) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> shapeBuilder_;
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public boolean hasShape() {
return valueCase_ == 7;
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProto getShape() {
if (shapeBuilder_ == null) {
if (valueCase_ == 7) {
return (org.tensorflow.framework.TensorShapeProto) value_;
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
} else {
if (valueCase_ == 7) {
return shapeBuilder_.getMessage();
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public Builder setShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
shapeBuilder_.setMessage(value);
}
valueCase_ = 7;
return this;
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public Builder setShape(
org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (shapeBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
shapeBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 7;
return this;
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public Builder mergeShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (valueCase_ == 7 &&
value_ != org.tensorflow.framework.TensorShapeProto.getDefaultInstance()) {
value_ = org.tensorflow.framework.TensorShapeProto.newBuilder((org.tensorflow.framework.TensorShapeProto) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 7) {
shapeBuilder_.mergeFrom(value);
}
shapeBuilder_.setMessage(value);
}
valueCase_ = 7;
return this;
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public Builder clearShape() {
if (shapeBuilder_ == null) {
if (valueCase_ == 7) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 7) {
valueCase_ = 0;
value_ = null;
}
shapeBuilder_.clear();
}
return this;
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProto.Builder getShapeBuilder() {
return getShapeFieldBuilder().getBuilder();
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
if ((valueCase_ == 7) && (shapeBuilder_ != null)) {
return shapeBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 7) {
return (org.tensorflow.framework.TensorShapeProto) value_;
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
}
/**
*
* "shape"
*
*
* .tensorflow.TensorShapeProto shape = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>
getShapeFieldBuilder() {
if (shapeBuilder_ == null) {
if (!(valueCase_ == 7)) {
value_ = org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>(
(org.tensorflow.framework.TensorShapeProto) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 7;
onChanged();;
return shapeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder> tensorBuilder_;
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public boolean hasTensor() {
return valueCase_ == 8;
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProto getTensor() {
if (tensorBuilder_ == null) {
if (valueCase_ == 8) {
return (org.tensorflow.framework.TensorProto) value_;
}
return org.tensorflow.framework.TensorProto.getDefaultInstance();
} else {
if (valueCase_ == 8) {
return tensorBuilder_.getMessage();
}
return org.tensorflow.framework.TensorProto.getDefaultInstance();
}
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public Builder setTensor(org.tensorflow.framework.TensorProto value) {
if (tensorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
tensorBuilder_.setMessage(value);
}
valueCase_ = 8;
return this;
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public Builder setTensor(
org.tensorflow.framework.TensorProto.Builder builderForValue) {
if (tensorBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
tensorBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 8;
return this;
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public Builder mergeTensor(org.tensorflow.framework.TensorProto value) {
if (tensorBuilder_ == null) {
if (valueCase_ == 8 &&
value_ != org.tensorflow.framework.TensorProto.getDefaultInstance()) {
value_ = org.tensorflow.framework.TensorProto.newBuilder((org.tensorflow.framework.TensorProto) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 8) {
tensorBuilder_.mergeFrom(value);
}
tensorBuilder_.setMessage(value);
}
valueCase_ = 8;
return this;
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public Builder clearTensor() {
if (tensorBuilder_ == null) {
if (valueCase_ == 8) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 8) {
valueCase_ = 0;
value_ = null;
}
tensorBuilder_.clear();
}
return this;
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProto.Builder getTensorBuilder() {
return getTensorFieldBuilder().getBuilder();
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
public org.tensorflow.framework.TensorProtoOrBuilder getTensorOrBuilder() {
if ((valueCase_ == 8) && (tensorBuilder_ != null)) {
return tensorBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 8) {
return (org.tensorflow.framework.TensorProto) value_;
}
return org.tensorflow.framework.TensorProto.getDefaultInstance();
}
}
/**
*
* "tensor"
*
*
* .tensorflow.TensorProto tensor = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder>
getTensorFieldBuilder() {
if (tensorBuilder_ == null) {
if (!(valueCase_ == 8)) {
value_ = org.tensorflow.framework.TensorProto.getDefaultInstance();
}
tensorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorProto, org.tensorflow.framework.TensorProto.Builder, org.tensorflow.framework.TensorProtoOrBuilder>(
(org.tensorflow.framework.TensorProto) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 8;
onChanged();;
return tensorBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.AttrValue.ListValue, org.tensorflow.framework.AttrValue.ListValue.Builder, org.tensorflow.framework.AttrValue.ListValueOrBuilder> listBuilder_;
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public boolean hasList() {
return valueCase_ == 1;
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public org.tensorflow.framework.AttrValue.ListValue getList() {
if (listBuilder_ == null) {
if (valueCase_ == 1) {
return (org.tensorflow.framework.AttrValue.ListValue) value_;
}
return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance();
} else {
if (valueCase_ == 1) {
return listBuilder_.getMessage();
}
return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance();
}
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public Builder setList(org.tensorflow.framework.AttrValue.ListValue value) {
if (listBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
listBuilder_.setMessage(value);
}
valueCase_ = 1;
return this;
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public Builder setList(
org.tensorflow.framework.AttrValue.ListValue.Builder builderForValue) {
if (listBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
listBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 1;
return this;
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public Builder mergeList(org.tensorflow.framework.AttrValue.ListValue value) {
if (listBuilder_ == null) {
if (valueCase_ == 1 &&
value_ != org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance()) {
value_ = org.tensorflow.framework.AttrValue.ListValue.newBuilder((org.tensorflow.framework.AttrValue.ListValue) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 1) {
listBuilder_.mergeFrom(value);
}
listBuilder_.setMessage(value);
}
valueCase_ = 1;
return this;
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public Builder clearList() {
if (listBuilder_ == null) {
if (valueCase_ == 1) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 1) {
valueCase_ = 0;
value_ = null;
}
listBuilder_.clear();
}
return this;
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public org.tensorflow.framework.AttrValue.ListValue.Builder getListBuilder() {
return getListFieldBuilder().getBuilder();
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
public org.tensorflow.framework.AttrValue.ListValueOrBuilder getListOrBuilder() {
if ((valueCase_ == 1) && (listBuilder_ != null)) {
return listBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 1) {
return (org.tensorflow.framework.AttrValue.ListValue) value_;
}
return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance();
}
}
/**
*
* any "list(...)"
*
*
* .tensorflow.AttrValue.ListValue list = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.AttrValue.ListValue, org.tensorflow.framework.AttrValue.ListValue.Builder, org.tensorflow.framework.AttrValue.ListValueOrBuilder>
getListFieldBuilder() {
if (listBuilder_ == null) {
if (!(valueCase_ == 1)) {
value_ = org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance();
}
listBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.AttrValue.ListValue, org.tensorflow.framework.AttrValue.ListValue.Builder, org.tensorflow.framework.AttrValue.ListValueOrBuilder>(
(org.tensorflow.framework.AttrValue.ListValue) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 1;
onChanged();;
return listBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder> funcBuilder_;
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public boolean hasFunc() {
return valueCase_ == 10;
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public org.tensorflow.framework.NameAttrList getFunc() {
if (funcBuilder_ == null) {
if (valueCase_ == 10) {
return (org.tensorflow.framework.NameAttrList) value_;
}
return org.tensorflow.framework.NameAttrList.getDefaultInstance();
} else {
if (valueCase_ == 10) {
return funcBuilder_.getMessage();
}
return org.tensorflow.framework.NameAttrList.getDefaultInstance();
}
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public Builder setFunc(org.tensorflow.framework.NameAttrList value) {
if (funcBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
funcBuilder_.setMessage(value);
}
valueCase_ = 10;
return this;
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public Builder setFunc(
org.tensorflow.framework.NameAttrList.Builder builderForValue) {
if (funcBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
funcBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 10;
return this;
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public Builder mergeFunc(org.tensorflow.framework.NameAttrList value) {
if (funcBuilder_ == null) {
if (valueCase_ == 10 &&
value_ != org.tensorflow.framework.NameAttrList.getDefaultInstance()) {
value_ = org.tensorflow.framework.NameAttrList.newBuilder((org.tensorflow.framework.NameAttrList) value_)
.mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 10) {
funcBuilder_.mergeFrom(value);
}
funcBuilder_.setMessage(value);
}
valueCase_ = 10;
return this;
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public Builder clearFunc() {
if (funcBuilder_ == null) {
if (valueCase_ == 10) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 10) {
valueCase_ = 0;
value_ = null;
}
funcBuilder_.clear();
}
return this;
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public org.tensorflow.framework.NameAttrList.Builder getFuncBuilder() {
return getFuncFieldBuilder().getBuilder();
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
public org.tensorflow.framework.NameAttrListOrBuilder getFuncOrBuilder() {
if ((valueCase_ == 10) && (funcBuilder_ != null)) {
return funcBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 10) {
return (org.tensorflow.framework.NameAttrList) value_;
}
return org.tensorflow.framework.NameAttrList.getDefaultInstance();
}
}
/**
*
* "func" represents a function. func.name is a function's name or
* a primitive op's name. func.attr.first is the name of an attr
* defined for that function. func.attr.second is the value for
* that attr in the instantiation.
*
*
* .tensorflow.NameAttrList func = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder>
getFuncFieldBuilder() {
if (funcBuilder_ == null) {
if (!(valueCase_ == 10)) {
value_ = org.tensorflow.framework.NameAttrList.getDefaultInstance();
}
funcBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder>(
(org.tensorflow.framework.NameAttrList) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 10;
onChanged();;
return funcBuilder_;
}
/**
*
* This is a placeholder only used in nodes defined inside a
* function. It indicates the attr value will be supplied when
* the function is instantiated. For example, let us suppose a
* node "N" in function "FN". "N" has an attr "A" with value
* placeholder = "foo". When FN is instantiated with attr "foo"
* set to "bar", the instantiated node N's attr A will have been
* given the value "bar".
*
*
* string placeholder = 9;
*/
public java.lang.String getPlaceholder() {
java.lang.Object ref = "";
if (valueCase_ == 9) {
ref = value_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 9) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This is a placeholder only used in nodes defined inside a
* function. It indicates the attr value will be supplied when
* the function is instantiated. For example, let us suppose a
* node "N" in function "FN". "N" has an attr "A" with value
* placeholder = "foo". When FN is instantiated with attr "foo"
* set to "bar", the instantiated node N's attr A will have been
* given the value "bar".
*
*
* string placeholder = 9;
*/
public com.google.protobuf.ByteString
getPlaceholderBytes() {
java.lang.Object ref = "";
if (valueCase_ == 9) {
ref = value_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 9) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This is a placeholder only used in nodes defined inside a
* function. It indicates the attr value will be supplied when
* the function is instantiated. For example, let us suppose a
* node "N" in function "FN". "N" has an attr "A" with value
* placeholder = "foo". When FN is instantiated with attr "foo"
* set to "bar", the instantiated node N's attr A will have been
* given the value "bar".
*
*
* string placeholder = 9;
*/
public Builder setPlaceholder(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 9;
value_ = value;
onChanged();
return this;
}
/**
*
* This is a placeholder only used in nodes defined inside a
* function. It indicates the attr value will be supplied when
* the function is instantiated. For example, let us suppose a
* node "N" in function "FN". "N" has an attr "A" with value
* placeholder = "foo". When FN is instantiated with attr "foo"
* set to "bar", the instantiated node N's attr A will have been
* given the value "bar".
*
*
* string placeholder = 9;
*/
public Builder clearPlaceholder() {
if (valueCase_ == 9) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
* This is a placeholder only used in nodes defined inside a
* function. It indicates the attr value will be supplied when
* the function is instantiated. For example, let us suppose a
* node "N" in function "FN". "N" has an attr "A" with value
* placeholder = "foo". When FN is instantiated with attr "foo"
* set to "bar", the instantiated node N's attr A will have been
* given the value "bar".
*
*
* string placeholder = 9;
*/
public Builder setPlaceholderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueCase_ = 9;
value_ = value;
onChanged();
return this;
}
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.AttrValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.AttrValue)
private static final org.tensorflow.framework.AttrValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.AttrValue();
}
public static org.tensorflow.framework.AttrValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public AttrValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AttrValue(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.framework.AttrValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy