Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.AttrValue)
AttrValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use AttrValue.newBuilder() to construct.
private AttrValue(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AttrValue() {
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AttrValue(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
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 (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor;
}
protected org.nd4j.shade.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)
org.nd4j.shade.protobuf.MessageOrBuilder {
/**
*
*
* 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_;
/**
*
*
* repeated .tensorflow.NameAttrList func = 9;
*/
public java.util.List
getFuncBuilderList() {
return getFuncFieldBuilder().getBuilderList();
}
private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.NameAttrList, org.tensorflow.framework.NameAttrList.Builder, org.tensorflow.framework.NameAttrListOrBuilder>
getFuncFieldBuilder() {
if (funcBuilder_ == null) {
funcBuilder_ = new org.nd4j.shade.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 org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.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 org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public ListValue parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new ListValue(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.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 org.nd4j.shade.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 org.nd4j.shade.protobuf.ByteString getS() {
if (valueCase_ == 2) {
return (org.nd4j.shade.protobuf.ByteString) value_;
}
return org.nd4j.shade.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;
/**
*
*
* .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.
*
* "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.
*
* "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".
*
* 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 org.nd4j.shade.protobuf.ByteString
getPlaceholderBytes() {
java.lang.Object ref = "";
if (valueCase_ == 9) {
ref = value_;
}
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (valueCase_ == 9) {
value_ = b;
}
return b;
} else {
return (org.nd4j.shade.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(org.nd4j.shade.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, (org.nd4j.shade.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) {
org.nd4j.shade.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 += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(1, (org.tensorflow.framework.AttrValue.ListValue) value_);
}
if (valueCase_ == 2) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBytesSize(
2, (org.nd4j.shade.protobuf.ByteString) value_);
}
if (valueCase_ == 3) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(
3, (long)((java.lang.Long) value_));
}
if (valueCase_ == 4) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeFloatSize(
4, (float)((java.lang.Float) value_));
}
if (valueCase_ == 5) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeBoolSize(
5, (boolean)((java.lang.Boolean) value_));
}
if (valueCase_ == 6) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeEnumSize(6, ((java.lang.Integer) value_));
}
if (valueCase_ == 7) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(7, (org.tensorflow.framework.TensorShapeProto) value_);
}
if (valueCase_ == 8) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(8, (org.tensorflow.framework.TensorProto) value_);
}
if (valueCase_ == 9) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(9, value_);
}
if (valueCase_ == 10) {
size += org.nd4j.shade.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) + org.nd4j.shade.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) + org.nd4j.shade.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 org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AttrValue parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.AttrValue parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AttrValue parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
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(
org.nd4j.shade.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
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.AttrValue)
org.tensorflow.framework.AttrValueOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.AttrValueProtos.internal_static_tensorflow_AttrValue_descriptor;
}
protected org.nd4j.shade.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(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
valueCase_ = 0;
value_ = null;
return this;
}
public org.nd4j.shade.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(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(org.nd4j.shade.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(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.AttrValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.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 org.nd4j.shade.protobuf.ByteString getS() {
if (valueCase_ == 2) {
return (org.nd4j.shade.protobuf.ByteString) value_;
}
return org.nd4j.shade.protobuf.ByteString.EMPTY;
}
/**
*
* "string"
*
*
* bytes s = 2;
*/
public Builder setS(org.nd4j.shade.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;
}
/**
*
* "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.
*
* "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.
*
* "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.
*
* "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.
*
* "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.
*
* "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.
*
* "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.
*
* "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.
*
* "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.
*
* 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".
*
* 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".
*
* 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".
*
* 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".
*
* 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(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueCase_ = 9;
value_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final org.nd4j.shade.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 org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
public AttrValue parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new AttrValue(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.AttrValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}