tensorflow.Struct Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/struct.proto
package tensorflow;
public final class Struct {
private Struct() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface StructuredValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.StructuredValue)
com.google.protobuf.MessageOrBuilder {
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
boolean hasNoneValue();
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
tensorflow.Struct.NoneValue getNoneValue();
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
tensorflow.Struct.NoneValueOrBuilder getNoneValueOrBuilder();
/**
*
* Represents a double-precision floating-point value (a Python `float`).
*
*
* double float64_value = 11;
*/
double getFloat64Value();
/**
*
* Represents a signed integer value, limited to 64 bits.
* Larger values from Python's arbitrary-precision integers are unsupported.
*
*
* sint64 int64_value = 12;
*/
long getInt64Value();
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
java.lang.String getStringValue();
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
com.google.protobuf.ByteString
getStringValueBytes();
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 14;
*/
boolean getBoolValue();
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
boolean hasTensorShapeValue();
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
org.tensorflow.framework.TensorShapeProto getTensorShapeValue();
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder();
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
int getTensorDtypeValueValue();
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
org.tensorflow.framework.DataType getTensorDtypeValue();
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
boolean hasTensorSpecValue();
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
tensorflow.Struct.TensorSpecProto getTensorSpecValue();
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
tensorflow.Struct.TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder();
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
boolean hasTypeSpecValue();
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
tensorflow.Struct.TypeSpecProto getTypeSpecValue();
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
tensorflow.Struct.TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder();
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
boolean hasListValue();
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
tensorflow.Struct.ListValue getListValue();
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
tensorflow.Struct.ListValueOrBuilder getListValueOrBuilder();
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
boolean hasTupleValue();
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
tensorflow.Struct.TupleValue getTupleValue();
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
tensorflow.Struct.TupleValueOrBuilder getTupleValueOrBuilder();
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
boolean hasDictValue();
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
tensorflow.Struct.DictValue getDictValue();
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
tensorflow.Struct.DictValueOrBuilder getDictValueOrBuilder();
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
boolean hasNamedTupleValue();
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
tensorflow.Struct.NamedTupleValue getNamedTupleValue();
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
tensorflow.Struct.NamedTupleValueOrBuilder getNamedTupleValueOrBuilder();
public tensorflow.Struct.StructuredValue.KindCase getKindCase();
}
/**
*
* `StructuredValue` represents a dynamically typed value representing various
* data structures that are inspired by Python data structures typically used in
* TensorFlow functions as inputs and outputs.
* For example when saving a Layer there may be a `training` argument. If the
* user passes a boolean True/False, that switches between two concrete
* TensorFlow functions. In order to switch between them in the same way after
* loading the SavedModel, we need to represent "True" and "False".
* A more advanced example might be a function which takes a list of
* dictionaries mapping from strings to Tensors. In order to map from
* user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]`
* after load to the right saved TensorFlow function, we need to represent the
* nested structure and the strings, recording that we have a trace for anything
* matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([],
* tf.float64)}]` as an example.
* Likewise functions may return nested structures of Tensors, for example
* returning a dictionary mapping from strings to Tensors. In order for the
* loaded function to return the same structure we need to serialize it.
* This is an ergonomic aid for working with loaded SavedModels, not a promise
* to serialize all possible function signatures. For example we do not expect
* to pickle generic Python objects, and ideally we'd stay language-agnostic.
*
*
* Protobuf type {@code tensorflow.StructuredValue}
*/
public static final class StructuredValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.StructuredValue)
StructuredValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use StructuredValue.newBuilder() to construct.
private StructuredValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StructuredValue() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StructuredValue(
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: {
tensorflow.Struct.NoneValue.Builder subBuilder = null;
if (kindCase_ == 1) {
subBuilder = ((tensorflow.Struct.NoneValue) kind_).toBuilder();
}
kind_ =
input.readMessage(tensorflow.Struct.NoneValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.Struct.NoneValue) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 1;
break;
}
case 89: {
kindCase_ = 11;
kind_ = input.readDouble();
break;
}
case 96: {
kindCase_ = 12;
kind_ = input.readSInt64();
break;
}
case 106: {
java.lang.String s = input.readStringRequireUtf8();
kindCase_ = 13;
kind_ = s;
break;
}
case 112: {
kindCase_ = 14;
kind_ = input.readBool();
break;
}
case 250: {
org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null;
if (kindCase_ == 31) {
subBuilder = ((org.tensorflow.framework.TensorShapeProto) kind_).toBuilder();
}
kind_ =
input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((org.tensorflow.framework.TensorShapeProto) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 31;
break;
}
case 256: {
int rawValue = input.readEnum();
kindCase_ = 32;
kind_ = rawValue;
break;
}
case 266: {
tensorflow.Struct.TensorSpecProto.Builder subBuilder = null;
if (kindCase_ == 33) {
subBuilder = ((tensorflow.Struct.TensorSpecProto) kind_).toBuilder();
}
kind_ =
input.readMessage(tensorflow.Struct.TensorSpecProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.Struct.TensorSpecProto) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 33;
break;
}
case 274: {
tensorflow.Struct.TypeSpecProto.Builder subBuilder = null;
if (kindCase_ == 34) {
subBuilder = ((tensorflow.Struct.TypeSpecProto) kind_).toBuilder();
}
kind_ =
input.readMessage(tensorflow.Struct.TypeSpecProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.Struct.TypeSpecProto) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 34;
break;
}
case 410: {
tensorflow.Struct.ListValue.Builder subBuilder = null;
if (kindCase_ == 51) {
subBuilder = ((tensorflow.Struct.ListValue) kind_).toBuilder();
}
kind_ =
input.readMessage(tensorflow.Struct.ListValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.Struct.ListValue) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 51;
break;
}
case 418: {
tensorflow.Struct.TupleValue.Builder subBuilder = null;
if (kindCase_ == 52) {
subBuilder = ((tensorflow.Struct.TupleValue) kind_).toBuilder();
}
kind_ =
input.readMessage(tensorflow.Struct.TupleValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.Struct.TupleValue) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 52;
break;
}
case 426: {
tensorflow.Struct.DictValue.Builder subBuilder = null;
if (kindCase_ == 53) {
subBuilder = ((tensorflow.Struct.DictValue) kind_).toBuilder();
}
kind_ =
input.readMessage(tensorflow.Struct.DictValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.Struct.DictValue) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 53;
break;
}
case 434: {
tensorflow.Struct.NamedTupleValue.Builder subBuilder = null;
if (kindCase_ == 54) {
subBuilder = ((tensorflow.Struct.NamedTupleValue) kind_).toBuilder();
}
kind_ =
input.readMessage(tensorflow.Struct.NamedTupleValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((tensorflow.Struct.NamedTupleValue) kind_);
kind_ = subBuilder.buildPartial();
}
kindCase_ = 54;
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 tensorflow.Struct.internal_static_tensorflow_StructuredValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_StructuredValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.StructuredValue.class, tensorflow.Struct.StructuredValue.Builder.class);
}
private int kindCase_ = 0;
private java.lang.Object kind_;
public enum KindCase
implements com.google.protobuf.Internal.EnumLite {
NONE_VALUE(1),
FLOAT64_VALUE(11),
INT64_VALUE(12),
STRING_VALUE(13),
BOOL_VALUE(14),
TENSOR_SHAPE_VALUE(31),
TENSOR_DTYPE_VALUE(32),
TENSOR_SPEC_VALUE(33),
TYPE_SPEC_VALUE(34),
LIST_VALUE(51),
TUPLE_VALUE(52),
DICT_VALUE(53),
NAMED_TUPLE_VALUE(54),
KIND_NOT_SET(0);
private final int value;
private KindCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static KindCase valueOf(int value) {
return forNumber(value);
}
public static KindCase forNumber(int value) {
switch (value) {
case 1: return NONE_VALUE;
case 11: return FLOAT64_VALUE;
case 12: return INT64_VALUE;
case 13: return STRING_VALUE;
case 14: return BOOL_VALUE;
case 31: return TENSOR_SHAPE_VALUE;
case 32: return TENSOR_DTYPE_VALUE;
case 33: return TENSOR_SPEC_VALUE;
case 34: return TYPE_SPEC_VALUE;
case 51: return LIST_VALUE;
case 52: return TUPLE_VALUE;
case 53: return DICT_VALUE;
case 54: return NAMED_TUPLE_VALUE;
case 0: return KIND_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public KindCase
getKindCase() {
return KindCase.forNumber(
kindCase_);
}
public static final int NONE_VALUE_FIELD_NUMBER = 1;
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public boolean hasNoneValue() {
return kindCase_ == 1;
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public tensorflow.Struct.NoneValue getNoneValue() {
if (kindCase_ == 1) {
return (tensorflow.Struct.NoneValue) kind_;
}
return tensorflow.Struct.NoneValue.getDefaultInstance();
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public tensorflow.Struct.NoneValueOrBuilder getNoneValueOrBuilder() {
if (kindCase_ == 1) {
return (tensorflow.Struct.NoneValue) kind_;
}
return tensorflow.Struct.NoneValue.getDefaultInstance();
}
public static final int FLOAT64_VALUE_FIELD_NUMBER = 11;
/**
*
* Represents a double-precision floating-point value (a Python `float`).
*
*
* double float64_value = 11;
*/
public double getFloat64Value() {
if (kindCase_ == 11) {
return (java.lang.Double) kind_;
}
return 0D;
}
public static final int INT64_VALUE_FIELD_NUMBER = 12;
/**
*
* Represents a signed integer value, limited to 64 bits.
* Larger values from Python's arbitrary-precision integers are unsupported.
*
*
* sint64 int64_value = 12;
*/
public long getInt64Value() {
if (kindCase_ == 12) {
return (java.lang.Long) kind_;
}
return 0L;
}
public static final int STRING_VALUE_FIELD_NUMBER = 13;
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (kindCase_ == 13) {
ref = kind_;
}
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 (kindCase_ == 13) {
kind_ = s;
}
return s;
}
}
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
public com.google.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = "";
if (kindCase_ == 13) {
ref = kind_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (kindCase_ == 13) {
kind_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BOOL_VALUE_FIELD_NUMBER = 14;
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 14;
*/
public boolean getBoolValue() {
if (kindCase_ == 14) {
return (java.lang.Boolean) kind_;
}
return false;
}
public static final int TENSOR_SHAPE_VALUE_FIELD_NUMBER = 31;
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public boolean hasTensorShapeValue() {
return kindCase_ == 31;
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public org.tensorflow.framework.TensorShapeProto getTensorShapeValue() {
if (kindCase_ == 31) {
return (org.tensorflow.framework.TensorShapeProto) kind_;
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder() {
if (kindCase_ == 31) {
return (org.tensorflow.framework.TensorShapeProto) kind_;
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
public static final int TENSOR_DTYPE_VALUE_FIELD_NUMBER = 32;
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
public int getTensorDtypeValueValue() {
if (kindCase_ == 32) {
return (java.lang.Integer) kind_;
}
return 0;
}
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
public org.tensorflow.framework.DataType getTensorDtypeValue() {
if (kindCase_ == 32) {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(
(java.lang.Integer) kind_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
return org.tensorflow.framework.DataType.DT_INVALID;
}
public static final int TENSOR_SPEC_VALUE_FIELD_NUMBER = 33;
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public boolean hasTensorSpecValue() {
return kindCase_ == 33;
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public tensorflow.Struct.TensorSpecProto getTensorSpecValue() {
if (kindCase_ == 33) {
return (tensorflow.Struct.TensorSpecProto) kind_;
}
return tensorflow.Struct.TensorSpecProto.getDefaultInstance();
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public tensorflow.Struct.TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder() {
if (kindCase_ == 33) {
return (tensorflow.Struct.TensorSpecProto) kind_;
}
return tensorflow.Struct.TensorSpecProto.getDefaultInstance();
}
public static final int TYPE_SPEC_VALUE_FIELD_NUMBER = 34;
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public boolean hasTypeSpecValue() {
return kindCase_ == 34;
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public tensorflow.Struct.TypeSpecProto getTypeSpecValue() {
if (kindCase_ == 34) {
return (tensorflow.Struct.TypeSpecProto) kind_;
}
return tensorflow.Struct.TypeSpecProto.getDefaultInstance();
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public tensorflow.Struct.TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder() {
if (kindCase_ == 34) {
return (tensorflow.Struct.TypeSpecProto) kind_;
}
return tensorflow.Struct.TypeSpecProto.getDefaultInstance();
}
public static final int LIST_VALUE_FIELD_NUMBER = 51;
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public boolean hasListValue() {
return kindCase_ == 51;
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public tensorflow.Struct.ListValue getListValue() {
if (kindCase_ == 51) {
return (tensorflow.Struct.ListValue) kind_;
}
return tensorflow.Struct.ListValue.getDefaultInstance();
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public tensorflow.Struct.ListValueOrBuilder getListValueOrBuilder() {
if (kindCase_ == 51) {
return (tensorflow.Struct.ListValue) kind_;
}
return tensorflow.Struct.ListValue.getDefaultInstance();
}
public static final int TUPLE_VALUE_FIELD_NUMBER = 52;
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public boolean hasTupleValue() {
return kindCase_ == 52;
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public tensorflow.Struct.TupleValue getTupleValue() {
if (kindCase_ == 52) {
return (tensorflow.Struct.TupleValue) kind_;
}
return tensorflow.Struct.TupleValue.getDefaultInstance();
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public tensorflow.Struct.TupleValueOrBuilder getTupleValueOrBuilder() {
if (kindCase_ == 52) {
return (tensorflow.Struct.TupleValue) kind_;
}
return tensorflow.Struct.TupleValue.getDefaultInstance();
}
public static final int DICT_VALUE_FIELD_NUMBER = 53;
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public boolean hasDictValue() {
return kindCase_ == 53;
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public tensorflow.Struct.DictValue getDictValue() {
if (kindCase_ == 53) {
return (tensorflow.Struct.DictValue) kind_;
}
return tensorflow.Struct.DictValue.getDefaultInstance();
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public tensorflow.Struct.DictValueOrBuilder getDictValueOrBuilder() {
if (kindCase_ == 53) {
return (tensorflow.Struct.DictValue) kind_;
}
return tensorflow.Struct.DictValue.getDefaultInstance();
}
public static final int NAMED_TUPLE_VALUE_FIELD_NUMBER = 54;
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public boolean hasNamedTupleValue() {
return kindCase_ == 54;
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public tensorflow.Struct.NamedTupleValue getNamedTupleValue() {
if (kindCase_ == 54) {
return (tensorflow.Struct.NamedTupleValue) kind_;
}
return tensorflow.Struct.NamedTupleValue.getDefaultInstance();
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public tensorflow.Struct.NamedTupleValueOrBuilder getNamedTupleValueOrBuilder() {
if (kindCase_ == 54) {
return (tensorflow.Struct.NamedTupleValue) kind_;
}
return tensorflow.Struct.NamedTupleValue.getDefaultInstance();
}
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 (kindCase_ == 1) {
output.writeMessage(1, (tensorflow.Struct.NoneValue) kind_);
}
if (kindCase_ == 11) {
output.writeDouble(
11, (double)((java.lang.Double) kind_));
}
if (kindCase_ == 12) {
output.writeSInt64(
12, (long)((java.lang.Long) kind_));
}
if (kindCase_ == 13) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, kind_);
}
if (kindCase_ == 14) {
output.writeBool(
14, (boolean)((java.lang.Boolean) kind_));
}
if (kindCase_ == 31) {
output.writeMessage(31, (org.tensorflow.framework.TensorShapeProto) kind_);
}
if (kindCase_ == 32) {
output.writeEnum(32, ((java.lang.Integer) kind_));
}
if (kindCase_ == 33) {
output.writeMessage(33, (tensorflow.Struct.TensorSpecProto) kind_);
}
if (kindCase_ == 34) {
output.writeMessage(34, (tensorflow.Struct.TypeSpecProto) kind_);
}
if (kindCase_ == 51) {
output.writeMessage(51, (tensorflow.Struct.ListValue) kind_);
}
if (kindCase_ == 52) {
output.writeMessage(52, (tensorflow.Struct.TupleValue) kind_);
}
if (kindCase_ == 53) {
output.writeMessage(53, (tensorflow.Struct.DictValue) kind_);
}
if (kindCase_ == 54) {
output.writeMessage(54, (tensorflow.Struct.NamedTupleValue) kind_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (kindCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (tensorflow.Struct.NoneValue) kind_);
}
if (kindCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
11, (double)((java.lang.Double) kind_));
}
if (kindCase_ == 12) {
size += com.google.protobuf.CodedOutputStream
.computeSInt64Size(
12, (long)((java.lang.Long) kind_));
}
if (kindCase_ == 13) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, kind_);
}
if (kindCase_ == 14) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
14, (boolean)((java.lang.Boolean) kind_));
}
if (kindCase_ == 31) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(31, (org.tensorflow.framework.TensorShapeProto) kind_);
}
if (kindCase_ == 32) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(32, ((java.lang.Integer) kind_));
}
if (kindCase_ == 33) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(33, (tensorflow.Struct.TensorSpecProto) kind_);
}
if (kindCase_ == 34) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(34, (tensorflow.Struct.TypeSpecProto) kind_);
}
if (kindCase_ == 51) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(51, (tensorflow.Struct.ListValue) kind_);
}
if (kindCase_ == 52) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(52, (tensorflow.Struct.TupleValue) kind_);
}
if (kindCase_ == 53) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(53, (tensorflow.Struct.DictValue) kind_);
}
if (kindCase_ == 54) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(54, (tensorflow.Struct.NamedTupleValue) kind_);
}
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 tensorflow.Struct.StructuredValue)) {
return super.equals(obj);
}
tensorflow.Struct.StructuredValue other = (tensorflow.Struct.StructuredValue) obj;
boolean result = true;
result = result && getKindCase().equals(
other.getKindCase());
if (!result) return false;
switch (kindCase_) {
case 1:
result = result && getNoneValue()
.equals(other.getNoneValue());
break;
case 11:
result = result && (
java.lang.Double.doubleToLongBits(getFloat64Value())
== java.lang.Double.doubleToLongBits(
other.getFloat64Value()));
break;
case 12:
result = result && (getInt64Value()
== other.getInt64Value());
break;
case 13:
result = result && getStringValue()
.equals(other.getStringValue());
break;
case 14:
result = result && (getBoolValue()
== other.getBoolValue());
break;
case 31:
result = result && getTensorShapeValue()
.equals(other.getTensorShapeValue());
break;
case 32:
result = result && getTensorDtypeValueValue()
== other.getTensorDtypeValueValue();
break;
case 33:
result = result && getTensorSpecValue()
.equals(other.getTensorSpecValue());
break;
case 34:
result = result && getTypeSpecValue()
.equals(other.getTypeSpecValue());
break;
case 51:
result = result && getListValue()
.equals(other.getListValue());
break;
case 52:
result = result && getTupleValue()
.equals(other.getTupleValue());
break;
case 53:
result = result && getDictValue()
.equals(other.getDictValue());
break;
case 54:
result = result && getNamedTupleValue()
.equals(other.getNamedTupleValue());
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 (kindCase_) {
case 1:
hash = (37 * hash) + NONE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getNoneValue().hashCode();
break;
case 11:
hash = (37 * hash) + FLOAT64_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getFloat64Value()));
break;
case 12:
hash = (37 * hash) + INT64_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getInt64Value());
break;
case 13:
hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStringValue().hashCode();
break;
case 14:
hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBoolValue());
break;
case 31:
hash = (37 * hash) + TENSOR_SHAPE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getTensorShapeValue().hashCode();
break;
case 32:
hash = (37 * hash) + TENSOR_DTYPE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getTensorDtypeValueValue();
break;
case 33:
hash = (37 * hash) + TENSOR_SPEC_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getTensorSpecValue().hashCode();
break;
case 34:
hash = (37 * hash) + TYPE_SPEC_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getTypeSpecValue().hashCode();
break;
case 51:
hash = (37 * hash) + LIST_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getListValue().hashCode();
break;
case 52:
hash = (37 * hash) + TUPLE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getTupleValue().hashCode();
break;
case 53:
hash = (37 * hash) + DICT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getDictValue().hashCode();
break;
case 54:
hash = (37 * hash) + NAMED_TUPLE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getNamedTupleValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.StructuredValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.StructuredValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.StructuredValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.StructuredValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.StructuredValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.StructuredValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.StructuredValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.StructuredValue 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 tensorflow.Struct.StructuredValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.StructuredValue 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 tensorflow.Struct.StructuredValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.StructuredValue 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(tensorflow.Struct.StructuredValue 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;
}
/**
*
* `StructuredValue` represents a dynamically typed value representing various
* data structures that are inspired by Python data structures typically used in
* TensorFlow functions as inputs and outputs.
* For example when saving a Layer there may be a `training` argument. If the
* user passes a boolean True/False, that switches between two concrete
* TensorFlow functions. In order to switch between them in the same way after
* loading the SavedModel, we need to represent "True" and "False".
* A more advanced example might be a function which takes a list of
* dictionaries mapping from strings to Tensors. In order to map from
* user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]`
* after load to the right saved TensorFlow function, we need to represent the
* nested structure and the strings, recording that we have a trace for anything
* matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([],
* tf.float64)}]` as an example.
* Likewise functions may return nested structures of Tensors, for example
* returning a dictionary mapping from strings to Tensors. In order for the
* loaded function to return the same structure we need to serialize it.
* This is an ergonomic aid for working with loaded SavedModels, not a promise
* to serialize all possible function signatures. For example we do not expect
* to pickle generic Python objects, and ideally we'd stay language-agnostic.
*
*
* Protobuf type {@code tensorflow.StructuredValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.StructuredValue)
tensorflow.Struct.StructuredValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_StructuredValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_StructuredValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.StructuredValue.class, tensorflow.Struct.StructuredValue.Builder.class);
}
// Construct using tensorflow.Struct.StructuredValue.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();
kindCase_ = 0;
kind_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_StructuredValue_descriptor;
}
public tensorflow.Struct.StructuredValue getDefaultInstanceForType() {
return tensorflow.Struct.StructuredValue.getDefaultInstance();
}
public tensorflow.Struct.StructuredValue build() {
tensorflow.Struct.StructuredValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.StructuredValue buildPartial() {
tensorflow.Struct.StructuredValue result = new tensorflow.Struct.StructuredValue(this);
if (kindCase_ == 1) {
if (noneValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = noneValueBuilder_.build();
}
}
if (kindCase_ == 11) {
result.kind_ = kind_;
}
if (kindCase_ == 12) {
result.kind_ = kind_;
}
if (kindCase_ == 13) {
result.kind_ = kind_;
}
if (kindCase_ == 14) {
result.kind_ = kind_;
}
if (kindCase_ == 31) {
if (tensorShapeValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = tensorShapeValueBuilder_.build();
}
}
if (kindCase_ == 32) {
result.kind_ = kind_;
}
if (kindCase_ == 33) {
if (tensorSpecValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = tensorSpecValueBuilder_.build();
}
}
if (kindCase_ == 34) {
if (typeSpecValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = typeSpecValueBuilder_.build();
}
}
if (kindCase_ == 51) {
if (listValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = listValueBuilder_.build();
}
}
if (kindCase_ == 52) {
if (tupleValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = tupleValueBuilder_.build();
}
}
if (kindCase_ == 53) {
if (dictValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = dictValueBuilder_.build();
}
}
if (kindCase_ == 54) {
if (namedTupleValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = namedTupleValueBuilder_.build();
}
}
result.kindCase_ = kindCase_;
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 tensorflow.Struct.StructuredValue) {
return mergeFrom((tensorflow.Struct.StructuredValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.StructuredValue other) {
if (other == tensorflow.Struct.StructuredValue.getDefaultInstance()) return this;
switch (other.getKindCase()) {
case NONE_VALUE: {
mergeNoneValue(other.getNoneValue());
break;
}
case FLOAT64_VALUE: {
setFloat64Value(other.getFloat64Value());
break;
}
case INT64_VALUE: {
setInt64Value(other.getInt64Value());
break;
}
case STRING_VALUE: {
kindCase_ = 13;
kind_ = other.kind_;
onChanged();
break;
}
case BOOL_VALUE: {
setBoolValue(other.getBoolValue());
break;
}
case TENSOR_SHAPE_VALUE: {
mergeTensorShapeValue(other.getTensorShapeValue());
break;
}
case TENSOR_DTYPE_VALUE: {
setTensorDtypeValueValue(other.getTensorDtypeValueValue());
break;
}
case TENSOR_SPEC_VALUE: {
mergeTensorSpecValue(other.getTensorSpecValue());
break;
}
case TYPE_SPEC_VALUE: {
mergeTypeSpecValue(other.getTypeSpecValue());
break;
}
case LIST_VALUE: {
mergeListValue(other.getListValue());
break;
}
case TUPLE_VALUE: {
mergeTupleValue(other.getTupleValue());
break;
}
case DICT_VALUE: {
mergeDictValue(other.getDictValue());
break;
}
case NAMED_TUPLE_VALUE: {
mergeNamedTupleValue(other.getNamedTupleValue());
break;
}
case KIND_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 {
tensorflow.Struct.StructuredValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.StructuredValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int kindCase_ = 0;
private java.lang.Object kind_;
public KindCase
getKindCase() {
return KindCase.forNumber(
kindCase_);
}
public Builder clearKind() {
kindCase_ = 0;
kind_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.NoneValue, tensorflow.Struct.NoneValue.Builder, tensorflow.Struct.NoneValueOrBuilder> noneValueBuilder_;
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public boolean hasNoneValue() {
return kindCase_ == 1;
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public tensorflow.Struct.NoneValue getNoneValue() {
if (noneValueBuilder_ == null) {
if (kindCase_ == 1) {
return (tensorflow.Struct.NoneValue) kind_;
}
return tensorflow.Struct.NoneValue.getDefaultInstance();
} else {
if (kindCase_ == 1) {
return noneValueBuilder_.getMessage();
}
return tensorflow.Struct.NoneValue.getDefaultInstance();
}
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public Builder setNoneValue(tensorflow.Struct.NoneValue value) {
if (noneValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
noneValueBuilder_.setMessage(value);
}
kindCase_ = 1;
return this;
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public Builder setNoneValue(
tensorflow.Struct.NoneValue.Builder builderForValue) {
if (noneValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
noneValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 1;
return this;
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public Builder mergeNoneValue(tensorflow.Struct.NoneValue value) {
if (noneValueBuilder_ == null) {
if (kindCase_ == 1 &&
kind_ != tensorflow.Struct.NoneValue.getDefaultInstance()) {
kind_ = tensorflow.Struct.NoneValue.newBuilder((tensorflow.Struct.NoneValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 1) {
noneValueBuilder_.mergeFrom(value);
}
noneValueBuilder_.setMessage(value);
}
kindCase_ = 1;
return this;
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public Builder clearNoneValue() {
if (noneValueBuilder_ == null) {
if (kindCase_ == 1) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 1) {
kindCase_ = 0;
kind_ = null;
}
noneValueBuilder_.clear();
}
return this;
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public tensorflow.Struct.NoneValue.Builder getNoneValueBuilder() {
return getNoneValueFieldBuilder().getBuilder();
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
public tensorflow.Struct.NoneValueOrBuilder getNoneValueOrBuilder() {
if ((kindCase_ == 1) && (noneValueBuilder_ != null)) {
return noneValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 1) {
return (tensorflow.Struct.NoneValue) kind_;
}
return tensorflow.Struct.NoneValue.getDefaultInstance();
}
}
/**
*
* Represents None.
*
*
* .tensorflow.NoneValue none_value = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.NoneValue, tensorflow.Struct.NoneValue.Builder, tensorflow.Struct.NoneValueOrBuilder>
getNoneValueFieldBuilder() {
if (noneValueBuilder_ == null) {
if (!(kindCase_ == 1)) {
kind_ = tensorflow.Struct.NoneValue.getDefaultInstance();
}
noneValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.NoneValue, tensorflow.Struct.NoneValue.Builder, tensorflow.Struct.NoneValueOrBuilder>(
(tensorflow.Struct.NoneValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 1;
onChanged();;
return noneValueBuilder_;
}
/**
*
* Represents a double-precision floating-point value (a Python `float`).
*
*
* double float64_value = 11;
*/
public double getFloat64Value() {
if (kindCase_ == 11) {
return (java.lang.Double) kind_;
}
return 0D;
}
/**
*
* Represents a double-precision floating-point value (a Python `float`).
*
*
* double float64_value = 11;
*/
public Builder setFloat64Value(double value) {
kindCase_ = 11;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a double-precision floating-point value (a Python `float`).
*
*
* double float64_value = 11;
*/
public Builder clearFloat64Value() {
if (kindCase_ == 11) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Represents a signed integer value, limited to 64 bits.
* Larger values from Python's arbitrary-precision integers are unsupported.
*
*
* sint64 int64_value = 12;
*/
public long getInt64Value() {
if (kindCase_ == 12) {
return (java.lang.Long) kind_;
}
return 0L;
}
/**
*
* Represents a signed integer value, limited to 64 bits.
* Larger values from Python's arbitrary-precision integers are unsupported.
*
*
* sint64 int64_value = 12;
*/
public Builder setInt64Value(long value) {
kindCase_ = 12;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a signed integer value, limited to 64 bits.
* Larger values from Python's arbitrary-precision integers are unsupported.
*
*
* sint64 int64_value = 12;
*/
public Builder clearInt64Value() {
if (kindCase_ == 12) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (kindCase_ == 13) {
ref = kind_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (kindCase_ == 13) {
kind_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
public com.google.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = "";
if (kindCase_ == 13) {
ref = kind_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (kindCase_ == 13) {
kind_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
public Builder setStringValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kindCase_ = 13;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
public Builder clearStringValue() {
if (kindCase_ == 13) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Represents a string of Unicode characters stored in a Python `str`.
* In Python 3, this is exactly what type `str` is.
* In Python 2, this is the UTF-8 encoding of the characters.
* For strings with ASCII characters only (as often used in TensorFlow code)
* there is effectively no difference between the language versions.
* The obsolescent `unicode` type of Python 2 is not supported here.
*
*
* string string_value = 13;
*/
public Builder setStringValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kindCase_ = 13;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 14;
*/
public boolean getBoolValue() {
if (kindCase_ == 14) {
return (java.lang.Boolean) kind_;
}
return false;
}
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 14;
*/
public Builder setBoolValue(boolean value) {
kindCase_ = 14;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 14;
*/
public Builder clearBoolValue() {
if (kindCase_ == 14) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> tensorShapeValueBuilder_;
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public boolean hasTensorShapeValue() {
return kindCase_ == 31;
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public org.tensorflow.framework.TensorShapeProto getTensorShapeValue() {
if (tensorShapeValueBuilder_ == null) {
if (kindCase_ == 31) {
return (org.tensorflow.framework.TensorShapeProto) kind_;
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
} else {
if (kindCase_ == 31) {
return tensorShapeValueBuilder_.getMessage();
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public Builder setTensorShapeValue(org.tensorflow.framework.TensorShapeProto value) {
if (tensorShapeValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
tensorShapeValueBuilder_.setMessage(value);
}
kindCase_ = 31;
return this;
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public Builder setTensorShapeValue(
org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (tensorShapeValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
tensorShapeValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 31;
return this;
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public Builder mergeTensorShapeValue(org.tensorflow.framework.TensorShapeProto value) {
if (tensorShapeValueBuilder_ == null) {
if (kindCase_ == 31 &&
kind_ != org.tensorflow.framework.TensorShapeProto.getDefaultInstance()) {
kind_ = org.tensorflow.framework.TensorShapeProto.newBuilder((org.tensorflow.framework.TensorShapeProto) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 31) {
tensorShapeValueBuilder_.mergeFrom(value);
}
tensorShapeValueBuilder_.setMessage(value);
}
kindCase_ = 31;
return this;
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public Builder clearTensorShapeValue() {
if (tensorShapeValueBuilder_ == null) {
if (kindCase_ == 31) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 31) {
kindCase_ = 0;
kind_ = null;
}
tensorShapeValueBuilder_.clear();
}
return this;
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public org.tensorflow.framework.TensorShapeProto.Builder getTensorShapeValueBuilder() {
return getTensorShapeValueFieldBuilder().getBuilder();
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder() {
if ((kindCase_ == 31) && (tensorShapeValueBuilder_ != null)) {
return tensorShapeValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 31) {
return (org.tensorflow.framework.TensorShapeProto) kind_;
}
return org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
}
/**
*
* Represents a TensorShape.
*
*
* .tensorflow.TensorShapeProto tensor_shape_value = 31;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>
getTensorShapeValueFieldBuilder() {
if (tensorShapeValueBuilder_ == null) {
if (!(kindCase_ == 31)) {
kind_ = org.tensorflow.framework.TensorShapeProto.getDefaultInstance();
}
tensorShapeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>(
(org.tensorflow.framework.TensorShapeProto) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 31;
onChanged();;
return tensorShapeValueBuilder_;
}
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
public int getTensorDtypeValueValue() {
if (kindCase_ == 32) {
return ((java.lang.Integer) kind_).intValue();
}
return 0;
}
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
public Builder setTensorDtypeValueValue(int value) {
kindCase_ = 32;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
public org.tensorflow.framework.DataType getTensorDtypeValue() {
if (kindCase_ == 32) {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(
(java.lang.Integer) kind_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
return org.tensorflow.framework.DataType.DT_INVALID;
}
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
public Builder setTensorDtypeValue(org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
kindCase_ = 32;
kind_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Represents an enum value for dtype.
*
*
* .tensorflow.DataType tensor_dtype_value = 32;
*/
public Builder clearTensorDtypeValue() {
if (kindCase_ == 32) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TensorSpecProto, tensorflow.Struct.TensorSpecProto.Builder, tensorflow.Struct.TensorSpecProtoOrBuilder> tensorSpecValueBuilder_;
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public boolean hasTensorSpecValue() {
return kindCase_ == 33;
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public tensorflow.Struct.TensorSpecProto getTensorSpecValue() {
if (tensorSpecValueBuilder_ == null) {
if (kindCase_ == 33) {
return (tensorflow.Struct.TensorSpecProto) kind_;
}
return tensorflow.Struct.TensorSpecProto.getDefaultInstance();
} else {
if (kindCase_ == 33) {
return tensorSpecValueBuilder_.getMessage();
}
return tensorflow.Struct.TensorSpecProto.getDefaultInstance();
}
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public Builder setTensorSpecValue(tensorflow.Struct.TensorSpecProto value) {
if (tensorSpecValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
tensorSpecValueBuilder_.setMessage(value);
}
kindCase_ = 33;
return this;
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public Builder setTensorSpecValue(
tensorflow.Struct.TensorSpecProto.Builder builderForValue) {
if (tensorSpecValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
tensorSpecValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 33;
return this;
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public Builder mergeTensorSpecValue(tensorflow.Struct.TensorSpecProto value) {
if (tensorSpecValueBuilder_ == null) {
if (kindCase_ == 33 &&
kind_ != tensorflow.Struct.TensorSpecProto.getDefaultInstance()) {
kind_ = tensorflow.Struct.TensorSpecProto.newBuilder((tensorflow.Struct.TensorSpecProto) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 33) {
tensorSpecValueBuilder_.mergeFrom(value);
}
tensorSpecValueBuilder_.setMessage(value);
}
kindCase_ = 33;
return this;
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public Builder clearTensorSpecValue() {
if (tensorSpecValueBuilder_ == null) {
if (kindCase_ == 33) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 33) {
kindCase_ = 0;
kind_ = null;
}
tensorSpecValueBuilder_.clear();
}
return this;
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public tensorflow.Struct.TensorSpecProto.Builder getTensorSpecValueBuilder() {
return getTensorSpecValueFieldBuilder().getBuilder();
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
public tensorflow.Struct.TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder() {
if ((kindCase_ == 33) && (tensorSpecValueBuilder_ != null)) {
return tensorSpecValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 33) {
return (tensorflow.Struct.TensorSpecProto) kind_;
}
return tensorflow.Struct.TensorSpecProto.getDefaultInstance();
}
}
/**
*
* Represents a value for tf.TensorSpec.
*
*
* .tensorflow.TensorSpecProto tensor_spec_value = 33;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TensorSpecProto, tensorflow.Struct.TensorSpecProto.Builder, tensorflow.Struct.TensorSpecProtoOrBuilder>
getTensorSpecValueFieldBuilder() {
if (tensorSpecValueBuilder_ == null) {
if (!(kindCase_ == 33)) {
kind_ = tensorflow.Struct.TensorSpecProto.getDefaultInstance();
}
tensorSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TensorSpecProto, tensorflow.Struct.TensorSpecProto.Builder, tensorflow.Struct.TensorSpecProtoOrBuilder>(
(tensorflow.Struct.TensorSpecProto) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 33;
onChanged();;
return tensorSpecValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TypeSpecProto, tensorflow.Struct.TypeSpecProto.Builder, tensorflow.Struct.TypeSpecProtoOrBuilder> typeSpecValueBuilder_;
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public boolean hasTypeSpecValue() {
return kindCase_ == 34;
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public tensorflow.Struct.TypeSpecProto getTypeSpecValue() {
if (typeSpecValueBuilder_ == null) {
if (kindCase_ == 34) {
return (tensorflow.Struct.TypeSpecProto) kind_;
}
return tensorflow.Struct.TypeSpecProto.getDefaultInstance();
} else {
if (kindCase_ == 34) {
return typeSpecValueBuilder_.getMessage();
}
return tensorflow.Struct.TypeSpecProto.getDefaultInstance();
}
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public Builder setTypeSpecValue(tensorflow.Struct.TypeSpecProto value) {
if (typeSpecValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
typeSpecValueBuilder_.setMessage(value);
}
kindCase_ = 34;
return this;
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public Builder setTypeSpecValue(
tensorflow.Struct.TypeSpecProto.Builder builderForValue) {
if (typeSpecValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
typeSpecValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 34;
return this;
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public Builder mergeTypeSpecValue(tensorflow.Struct.TypeSpecProto value) {
if (typeSpecValueBuilder_ == null) {
if (kindCase_ == 34 &&
kind_ != tensorflow.Struct.TypeSpecProto.getDefaultInstance()) {
kind_ = tensorflow.Struct.TypeSpecProto.newBuilder((tensorflow.Struct.TypeSpecProto) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 34) {
typeSpecValueBuilder_.mergeFrom(value);
}
typeSpecValueBuilder_.setMessage(value);
}
kindCase_ = 34;
return this;
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public Builder clearTypeSpecValue() {
if (typeSpecValueBuilder_ == null) {
if (kindCase_ == 34) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 34) {
kindCase_ = 0;
kind_ = null;
}
typeSpecValueBuilder_.clear();
}
return this;
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public tensorflow.Struct.TypeSpecProto.Builder getTypeSpecValueBuilder() {
return getTypeSpecValueFieldBuilder().getBuilder();
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
public tensorflow.Struct.TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder() {
if ((kindCase_ == 34) && (typeSpecValueBuilder_ != null)) {
return typeSpecValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 34) {
return (tensorflow.Struct.TypeSpecProto) kind_;
}
return tensorflow.Struct.TypeSpecProto.getDefaultInstance();
}
}
/**
*
* Represents a value for tf.TypeSpec.
*
*
* .tensorflow.TypeSpecProto type_spec_value = 34;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TypeSpecProto, tensorflow.Struct.TypeSpecProto.Builder, tensorflow.Struct.TypeSpecProtoOrBuilder>
getTypeSpecValueFieldBuilder() {
if (typeSpecValueBuilder_ == null) {
if (!(kindCase_ == 34)) {
kind_ = tensorflow.Struct.TypeSpecProto.getDefaultInstance();
}
typeSpecValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TypeSpecProto, tensorflow.Struct.TypeSpecProto.Builder, tensorflow.Struct.TypeSpecProtoOrBuilder>(
(tensorflow.Struct.TypeSpecProto) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 34;
onChanged();;
return typeSpecValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.ListValue, tensorflow.Struct.ListValue.Builder, tensorflow.Struct.ListValueOrBuilder> listValueBuilder_;
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public boolean hasListValue() {
return kindCase_ == 51;
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public tensorflow.Struct.ListValue getListValue() {
if (listValueBuilder_ == null) {
if (kindCase_ == 51) {
return (tensorflow.Struct.ListValue) kind_;
}
return tensorflow.Struct.ListValue.getDefaultInstance();
} else {
if (kindCase_ == 51) {
return listValueBuilder_.getMessage();
}
return tensorflow.Struct.ListValue.getDefaultInstance();
}
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public Builder setListValue(tensorflow.Struct.ListValue value) {
if (listValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
listValueBuilder_.setMessage(value);
}
kindCase_ = 51;
return this;
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public Builder setListValue(
tensorflow.Struct.ListValue.Builder builderForValue) {
if (listValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
listValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 51;
return this;
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public Builder mergeListValue(tensorflow.Struct.ListValue value) {
if (listValueBuilder_ == null) {
if (kindCase_ == 51 &&
kind_ != tensorflow.Struct.ListValue.getDefaultInstance()) {
kind_ = tensorflow.Struct.ListValue.newBuilder((tensorflow.Struct.ListValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 51) {
listValueBuilder_.mergeFrom(value);
}
listValueBuilder_.setMessage(value);
}
kindCase_ = 51;
return this;
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public Builder clearListValue() {
if (listValueBuilder_ == null) {
if (kindCase_ == 51) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 51) {
kindCase_ = 0;
kind_ = null;
}
listValueBuilder_.clear();
}
return this;
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public tensorflow.Struct.ListValue.Builder getListValueBuilder() {
return getListValueFieldBuilder().getBuilder();
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
public tensorflow.Struct.ListValueOrBuilder getListValueOrBuilder() {
if ((kindCase_ == 51) && (listValueBuilder_ != null)) {
return listValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 51) {
return (tensorflow.Struct.ListValue) kind_;
}
return tensorflow.Struct.ListValue.getDefaultInstance();
}
}
/**
*
* Represents a list of `Value`.
*
*
* .tensorflow.ListValue list_value = 51;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.ListValue, tensorflow.Struct.ListValue.Builder, tensorflow.Struct.ListValueOrBuilder>
getListValueFieldBuilder() {
if (listValueBuilder_ == null) {
if (!(kindCase_ == 51)) {
kind_ = tensorflow.Struct.ListValue.getDefaultInstance();
}
listValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.ListValue, tensorflow.Struct.ListValue.Builder, tensorflow.Struct.ListValueOrBuilder>(
(tensorflow.Struct.ListValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 51;
onChanged();;
return listValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TupleValue, tensorflow.Struct.TupleValue.Builder, tensorflow.Struct.TupleValueOrBuilder> tupleValueBuilder_;
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public boolean hasTupleValue() {
return kindCase_ == 52;
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public tensorflow.Struct.TupleValue getTupleValue() {
if (tupleValueBuilder_ == null) {
if (kindCase_ == 52) {
return (tensorflow.Struct.TupleValue) kind_;
}
return tensorflow.Struct.TupleValue.getDefaultInstance();
} else {
if (kindCase_ == 52) {
return tupleValueBuilder_.getMessage();
}
return tensorflow.Struct.TupleValue.getDefaultInstance();
}
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public Builder setTupleValue(tensorflow.Struct.TupleValue value) {
if (tupleValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
tupleValueBuilder_.setMessage(value);
}
kindCase_ = 52;
return this;
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public Builder setTupleValue(
tensorflow.Struct.TupleValue.Builder builderForValue) {
if (tupleValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
tupleValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 52;
return this;
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public Builder mergeTupleValue(tensorflow.Struct.TupleValue value) {
if (tupleValueBuilder_ == null) {
if (kindCase_ == 52 &&
kind_ != tensorflow.Struct.TupleValue.getDefaultInstance()) {
kind_ = tensorflow.Struct.TupleValue.newBuilder((tensorflow.Struct.TupleValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 52) {
tupleValueBuilder_.mergeFrom(value);
}
tupleValueBuilder_.setMessage(value);
}
kindCase_ = 52;
return this;
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public Builder clearTupleValue() {
if (tupleValueBuilder_ == null) {
if (kindCase_ == 52) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 52) {
kindCase_ = 0;
kind_ = null;
}
tupleValueBuilder_.clear();
}
return this;
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public tensorflow.Struct.TupleValue.Builder getTupleValueBuilder() {
return getTupleValueFieldBuilder().getBuilder();
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
public tensorflow.Struct.TupleValueOrBuilder getTupleValueOrBuilder() {
if ((kindCase_ == 52) && (tupleValueBuilder_ != null)) {
return tupleValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 52) {
return (tensorflow.Struct.TupleValue) kind_;
}
return tensorflow.Struct.TupleValue.getDefaultInstance();
}
}
/**
*
* Represents a tuple of `Value`.
*
*
* .tensorflow.TupleValue tuple_value = 52;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TupleValue, tensorflow.Struct.TupleValue.Builder, tensorflow.Struct.TupleValueOrBuilder>
getTupleValueFieldBuilder() {
if (tupleValueBuilder_ == null) {
if (!(kindCase_ == 52)) {
kind_ = tensorflow.Struct.TupleValue.getDefaultInstance();
}
tupleValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.TupleValue, tensorflow.Struct.TupleValue.Builder, tensorflow.Struct.TupleValueOrBuilder>(
(tensorflow.Struct.TupleValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 52;
onChanged();;
return tupleValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.DictValue, tensorflow.Struct.DictValue.Builder, tensorflow.Struct.DictValueOrBuilder> dictValueBuilder_;
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public boolean hasDictValue() {
return kindCase_ == 53;
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public tensorflow.Struct.DictValue getDictValue() {
if (dictValueBuilder_ == null) {
if (kindCase_ == 53) {
return (tensorflow.Struct.DictValue) kind_;
}
return tensorflow.Struct.DictValue.getDefaultInstance();
} else {
if (kindCase_ == 53) {
return dictValueBuilder_.getMessage();
}
return tensorflow.Struct.DictValue.getDefaultInstance();
}
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public Builder setDictValue(tensorflow.Struct.DictValue value) {
if (dictValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
dictValueBuilder_.setMessage(value);
}
kindCase_ = 53;
return this;
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public Builder setDictValue(
tensorflow.Struct.DictValue.Builder builderForValue) {
if (dictValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
dictValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 53;
return this;
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public Builder mergeDictValue(tensorflow.Struct.DictValue value) {
if (dictValueBuilder_ == null) {
if (kindCase_ == 53 &&
kind_ != tensorflow.Struct.DictValue.getDefaultInstance()) {
kind_ = tensorflow.Struct.DictValue.newBuilder((tensorflow.Struct.DictValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 53) {
dictValueBuilder_.mergeFrom(value);
}
dictValueBuilder_.setMessage(value);
}
kindCase_ = 53;
return this;
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public Builder clearDictValue() {
if (dictValueBuilder_ == null) {
if (kindCase_ == 53) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 53) {
kindCase_ = 0;
kind_ = null;
}
dictValueBuilder_.clear();
}
return this;
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public tensorflow.Struct.DictValue.Builder getDictValueBuilder() {
return getDictValueFieldBuilder().getBuilder();
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
public tensorflow.Struct.DictValueOrBuilder getDictValueOrBuilder() {
if ((kindCase_ == 53) && (dictValueBuilder_ != null)) {
return dictValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 53) {
return (tensorflow.Struct.DictValue) kind_;
}
return tensorflow.Struct.DictValue.getDefaultInstance();
}
}
/**
*
* Represents a dict `Value`.
*
*
* .tensorflow.DictValue dict_value = 53;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.DictValue, tensorflow.Struct.DictValue.Builder, tensorflow.Struct.DictValueOrBuilder>
getDictValueFieldBuilder() {
if (dictValueBuilder_ == null) {
if (!(kindCase_ == 53)) {
kind_ = tensorflow.Struct.DictValue.getDefaultInstance();
}
dictValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.DictValue, tensorflow.Struct.DictValue.Builder, tensorflow.Struct.DictValueOrBuilder>(
(tensorflow.Struct.DictValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 53;
onChanged();;
return dictValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.NamedTupleValue, tensorflow.Struct.NamedTupleValue.Builder, tensorflow.Struct.NamedTupleValueOrBuilder> namedTupleValueBuilder_;
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public boolean hasNamedTupleValue() {
return kindCase_ == 54;
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public tensorflow.Struct.NamedTupleValue getNamedTupleValue() {
if (namedTupleValueBuilder_ == null) {
if (kindCase_ == 54) {
return (tensorflow.Struct.NamedTupleValue) kind_;
}
return tensorflow.Struct.NamedTupleValue.getDefaultInstance();
} else {
if (kindCase_ == 54) {
return namedTupleValueBuilder_.getMessage();
}
return tensorflow.Struct.NamedTupleValue.getDefaultInstance();
}
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public Builder setNamedTupleValue(tensorflow.Struct.NamedTupleValue value) {
if (namedTupleValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
namedTupleValueBuilder_.setMessage(value);
}
kindCase_ = 54;
return this;
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public Builder setNamedTupleValue(
tensorflow.Struct.NamedTupleValue.Builder builderForValue) {
if (namedTupleValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
namedTupleValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 54;
return this;
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public Builder mergeNamedTupleValue(tensorflow.Struct.NamedTupleValue value) {
if (namedTupleValueBuilder_ == null) {
if (kindCase_ == 54 &&
kind_ != tensorflow.Struct.NamedTupleValue.getDefaultInstance()) {
kind_ = tensorflow.Struct.NamedTupleValue.newBuilder((tensorflow.Struct.NamedTupleValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 54) {
namedTupleValueBuilder_.mergeFrom(value);
}
namedTupleValueBuilder_.setMessage(value);
}
kindCase_ = 54;
return this;
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public Builder clearNamedTupleValue() {
if (namedTupleValueBuilder_ == null) {
if (kindCase_ == 54) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 54) {
kindCase_ = 0;
kind_ = null;
}
namedTupleValueBuilder_.clear();
}
return this;
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public tensorflow.Struct.NamedTupleValue.Builder getNamedTupleValueBuilder() {
return getNamedTupleValueFieldBuilder().getBuilder();
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
public tensorflow.Struct.NamedTupleValueOrBuilder getNamedTupleValueOrBuilder() {
if ((kindCase_ == 54) && (namedTupleValueBuilder_ != null)) {
return namedTupleValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 54) {
return (tensorflow.Struct.NamedTupleValue) kind_;
}
return tensorflow.Struct.NamedTupleValue.getDefaultInstance();
}
}
/**
*
* Represents Python's namedtuple.
*
*
* .tensorflow.NamedTupleValue named_tuple_value = 54;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.NamedTupleValue, tensorflow.Struct.NamedTupleValue.Builder, tensorflow.Struct.NamedTupleValueOrBuilder>
getNamedTupleValueFieldBuilder() {
if (namedTupleValueBuilder_ == null) {
if (!(kindCase_ == 54)) {
kind_ = tensorflow.Struct.NamedTupleValue.getDefaultInstance();
}
namedTupleValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.NamedTupleValue, tensorflow.Struct.NamedTupleValue.Builder, tensorflow.Struct.NamedTupleValueOrBuilder>(
(tensorflow.Struct.NamedTupleValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 54;
onChanged();;
return namedTupleValueBuilder_;
}
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.StructuredValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.StructuredValue)
private static final tensorflow.Struct.StructuredValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.StructuredValue();
}
public static tensorflow.Struct.StructuredValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public StructuredValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StructuredValue(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public tensorflow.Struct.StructuredValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface NoneValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.NoneValue)
com.google.protobuf.MessageOrBuilder {
}
/**
*
* Represents None.
*
*
* Protobuf type {@code tensorflow.NoneValue}
*/
public static final class NoneValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.NoneValue)
NoneValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use NoneValue.newBuilder() to construct.
private NoneValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NoneValue() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NoneValue(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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;
}
}
}
} 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 tensorflow.Struct.internal_static_tensorflow_NoneValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_NoneValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.NoneValue.class, tensorflow.Struct.NoneValue.Builder.class);
}
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 {
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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 tensorflow.Struct.NoneValue)) {
return super.equals(obj);
}
tensorflow.Struct.NoneValue other = (tensorflow.Struct.NoneValue) obj;
boolean result = true;
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.NoneValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.NoneValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.NoneValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.NoneValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.NoneValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.NoneValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.NoneValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.NoneValue 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 tensorflow.Struct.NoneValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.NoneValue 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 tensorflow.Struct.NoneValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.NoneValue 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(tensorflow.Struct.NoneValue 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;
}
/**
*
* Represents None.
*
*
* Protobuf type {@code tensorflow.NoneValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.NoneValue)
tensorflow.Struct.NoneValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_NoneValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_NoneValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.NoneValue.class, tensorflow.Struct.NoneValue.Builder.class);
}
// Construct using tensorflow.Struct.NoneValue.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();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_NoneValue_descriptor;
}
public tensorflow.Struct.NoneValue getDefaultInstanceForType() {
return tensorflow.Struct.NoneValue.getDefaultInstance();
}
public tensorflow.Struct.NoneValue build() {
tensorflow.Struct.NoneValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.NoneValue buildPartial() {
tensorflow.Struct.NoneValue result = new tensorflow.Struct.NoneValue(this);
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 tensorflow.Struct.NoneValue) {
return mergeFrom((tensorflow.Struct.NoneValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.NoneValue other) {
if (other == tensorflow.Struct.NoneValue.getDefaultInstance()) return this;
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 {
tensorflow.Struct.NoneValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.NoneValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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.NoneValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.NoneValue)
private static final tensorflow.Struct.NoneValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.NoneValue();
}
public static tensorflow.Struct.NoneValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public NoneValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NoneValue(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public tensorflow.Struct.NoneValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ListValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.ListValue)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
java.util.List
getValuesList();
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
tensorflow.Struct.StructuredValue getValues(int index);
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
int getValuesCount();
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
java.util.List extends tensorflow.Struct.StructuredValueOrBuilder>
getValuesOrBuilderList();
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
tensorflow.Struct.StructuredValueOrBuilder getValuesOrBuilder(
int index);
}
/**
*
* Represents a Python list.
*
*
* Protobuf type {@code tensorflow.ListValue}
*/
public static final class ListValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.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() {
values_ = 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 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
values_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
values_.add(
input.readMessage(tensorflow.Struct.StructuredValue.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)) {
values_ = java.util.Collections.unmodifiableList(values_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_ListValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_ListValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.ListValue.class, tensorflow.Struct.ListValue.Builder.class);
}
public static final int VALUES_FIELD_NUMBER = 1;
private java.util.List values_;
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List getValuesList() {
return values_;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List extends tensorflow.Struct.StructuredValueOrBuilder>
getValuesOrBuilderList() {
return values_;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public int getValuesCount() {
return values_.size();
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue getValues(int index) {
return values_.get(index);
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValueOrBuilder getValuesOrBuilder(
int index) {
return values_.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 {
for (int i = 0; i < values_.size(); i++) {
output.writeMessage(1, values_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < values_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, values_.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 tensorflow.Struct.ListValue)) {
return super.equals(obj);
}
tensorflow.Struct.ListValue other = (tensorflow.Struct.ListValue) obj;
boolean result = true;
result = result && getValuesList()
.equals(other.getValuesList());
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 (getValuesCount() > 0) {
hash = (37 * hash) + VALUES_FIELD_NUMBER;
hash = (53 * hash) + getValuesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.ListValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.ListValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.ListValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.ListValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.ListValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.ListValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.ListValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.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 tensorflow.Struct.ListValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.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 tensorflow.Struct.ListValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.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(tensorflow.Struct.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;
}
/**
*
* Represents a Python list.
*
*
* Protobuf type {@code tensorflow.ListValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.ListValue)
tensorflow.Struct.ListValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_ListValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_ListValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.ListValue.class, tensorflow.Struct.ListValue.Builder.class);
}
// Construct using tensorflow.Struct.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) {
getValuesFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (valuesBuilder_ == null) {
values_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
valuesBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_ListValue_descriptor;
}
public tensorflow.Struct.ListValue getDefaultInstanceForType() {
return tensorflow.Struct.ListValue.getDefaultInstance();
}
public tensorflow.Struct.ListValue build() {
tensorflow.Struct.ListValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.ListValue buildPartial() {
tensorflow.Struct.ListValue result = new tensorflow.Struct.ListValue(this);
int from_bitField0_ = bitField0_;
if (valuesBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
values_ = java.util.Collections.unmodifiableList(values_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.values_ = values_;
} else {
result.values_ = valuesBuilder_.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 tensorflow.Struct.ListValue) {
return mergeFrom((tensorflow.Struct.ListValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.ListValue other) {
if (other == tensorflow.Struct.ListValue.getDefaultInstance()) return this;
if (valuesBuilder_ == null) {
if (!other.values_.isEmpty()) {
if (values_.isEmpty()) {
values_ = other.values_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValuesIsMutable();
values_.addAll(other.values_);
}
onChanged();
}
} else {
if (!other.values_.isEmpty()) {
if (valuesBuilder_.isEmpty()) {
valuesBuilder_.dispose();
valuesBuilder_ = null;
values_ = other.values_;
bitField0_ = (bitField0_ & ~0x00000001);
valuesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getValuesFieldBuilder() : null;
} else {
valuesBuilder_.addAllMessages(other.values_);
}
}
}
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 {
tensorflow.Struct.ListValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.ListValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List values_ =
java.util.Collections.emptyList();
private void ensureValuesIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
values_ = new java.util.ArrayList(values_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder> valuesBuilder_;
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List getValuesList() {
if (valuesBuilder_ == null) {
return java.util.Collections.unmodifiableList(values_);
} else {
return valuesBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public int getValuesCount() {
if (valuesBuilder_ == null) {
return values_.size();
} else {
return valuesBuilder_.getCount();
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue getValues(int index) {
if (valuesBuilder_ == null) {
return values_.get(index);
} else {
return valuesBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder setValues(
int index, tensorflow.Struct.StructuredValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.set(index, value);
onChanged();
} else {
valuesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder setValues(
int index, tensorflow.Struct.StructuredValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.set(index, builderForValue.build());
onChanged();
} else {
valuesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addValues(tensorflow.Struct.StructuredValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.add(value);
onChanged();
} else {
valuesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addValues(
int index, tensorflow.Struct.StructuredValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.add(index, value);
onChanged();
} else {
valuesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addValues(
tensorflow.Struct.StructuredValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.add(builderForValue.build());
onChanged();
} else {
valuesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addValues(
int index, tensorflow.Struct.StructuredValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.add(index, builderForValue.build());
onChanged();
} else {
valuesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addAllValues(
java.lang.Iterable extends tensorflow.Struct.StructuredValue> values) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, values_);
onChanged();
} else {
valuesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder clearValues() {
if (valuesBuilder_ == null) {
values_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
valuesBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder removeValues(int index) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.remove(index);
onChanged();
} else {
valuesBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue.Builder getValuesBuilder(
int index) {
return getValuesFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValueOrBuilder getValuesOrBuilder(
int index) {
if (valuesBuilder_ == null) {
return values_.get(index); } else {
return valuesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List extends tensorflow.Struct.StructuredValueOrBuilder>
getValuesOrBuilderList() {
if (valuesBuilder_ != null) {
return valuesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(values_);
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue.Builder addValuesBuilder() {
return getValuesFieldBuilder().addBuilder(
tensorflow.Struct.StructuredValue.getDefaultInstance());
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue.Builder addValuesBuilder(
int index) {
return getValuesFieldBuilder().addBuilder(
index, tensorflow.Struct.StructuredValue.getDefaultInstance());
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List
getValuesBuilderList() {
return getValuesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder>
getValuesFieldBuilder() {
if (valuesBuilder_ == null) {
valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder>(
values_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
values_ = null;
}
return valuesBuilder_;
}
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.ListValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.ListValue)
private static final tensorflow.Struct.ListValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.ListValue();
}
public static tensorflow.Struct.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 tensorflow.Struct.ListValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TupleValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.TupleValue)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
java.util.List
getValuesList();
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
tensorflow.Struct.StructuredValue getValues(int index);
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
int getValuesCount();
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
java.util.List extends tensorflow.Struct.StructuredValueOrBuilder>
getValuesOrBuilderList();
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
tensorflow.Struct.StructuredValueOrBuilder getValuesOrBuilder(
int index);
}
/**
*
* Represents a Python tuple.
*
*
* Protobuf type {@code tensorflow.TupleValue}
*/
public static final class TupleValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.TupleValue)
TupleValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use TupleValue.newBuilder() to construct.
private TupleValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TupleValue() {
values_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TupleValue(
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: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
values_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
values_.add(
input.readMessage(tensorflow.Struct.StructuredValue.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)) {
values_ = java.util.Collections.unmodifiableList(values_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_TupleValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_TupleValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.TupleValue.class, tensorflow.Struct.TupleValue.Builder.class);
}
public static final int VALUES_FIELD_NUMBER = 1;
private java.util.List values_;
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List getValuesList() {
return values_;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List extends tensorflow.Struct.StructuredValueOrBuilder>
getValuesOrBuilderList() {
return values_;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public int getValuesCount() {
return values_.size();
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue getValues(int index) {
return values_.get(index);
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValueOrBuilder getValuesOrBuilder(
int index) {
return values_.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 {
for (int i = 0; i < values_.size(); i++) {
output.writeMessage(1, values_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < values_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, values_.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 tensorflow.Struct.TupleValue)) {
return super.equals(obj);
}
tensorflow.Struct.TupleValue other = (tensorflow.Struct.TupleValue) obj;
boolean result = true;
result = result && getValuesList()
.equals(other.getValuesList());
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 (getValuesCount() > 0) {
hash = (37 * hash) + VALUES_FIELD_NUMBER;
hash = (53 * hash) + getValuesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.TupleValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TupleValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TupleValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TupleValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TupleValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TupleValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TupleValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.TupleValue 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 tensorflow.Struct.TupleValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.TupleValue 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 tensorflow.Struct.TupleValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.TupleValue 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(tensorflow.Struct.TupleValue 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;
}
/**
*
* Represents a Python tuple.
*
*
* Protobuf type {@code tensorflow.TupleValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.TupleValue)
tensorflow.Struct.TupleValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_TupleValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_TupleValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.TupleValue.class, tensorflow.Struct.TupleValue.Builder.class);
}
// Construct using tensorflow.Struct.TupleValue.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getValuesFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (valuesBuilder_ == null) {
values_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
valuesBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_TupleValue_descriptor;
}
public tensorflow.Struct.TupleValue getDefaultInstanceForType() {
return tensorflow.Struct.TupleValue.getDefaultInstance();
}
public tensorflow.Struct.TupleValue build() {
tensorflow.Struct.TupleValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.TupleValue buildPartial() {
tensorflow.Struct.TupleValue result = new tensorflow.Struct.TupleValue(this);
int from_bitField0_ = bitField0_;
if (valuesBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
values_ = java.util.Collections.unmodifiableList(values_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.values_ = values_;
} else {
result.values_ = valuesBuilder_.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 tensorflow.Struct.TupleValue) {
return mergeFrom((tensorflow.Struct.TupleValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.TupleValue other) {
if (other == tensorflow.Struct.TupleValue.getDefaultInstance()) return this;
if (valuesBuilder_ == null) {
if (!other.values_.isEmpty()) {
if (values_.isEmpty()) {
values_ = other.values_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValuesIsMutable();
values_.addAll(other.values_);
}
onChanged();
}
} else {
if (!other.values_.isEmpty()) {
if (valuesBuilder_.isEmpty()) {
valuesBuilder_.dispose();
valuesBuilder_ = null;
values_ = other.values_;
bitField0_ = (bitField0_ & ~0x00000001);
valuesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getValuesFieldBuilder() : null;
} else {
valuesBuilder_.addAllMessages(other.values_);
}
}
}
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 {
tensorflow.Struct.TupleValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.TupleValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List values_ =
java.util.Collections.emptyList();
private void ensureValuesIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
values_ = new java.util.ArrayList(values_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder> valuesBuilder_;
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List getValuesList() {
if (valuesBuilder_ == null) {
return java.util.Collections.unmodifiableList(values_);
} else {
return valuesBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public int getValuesCount() {
if (valuesBuilder_ == null) {
return values_.size();
} else {
return valuesBuilder_.getCount();
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue getValues(int index) {
if (valuesBuilder_ == null) {
return values_.get(index);
} else {
return valuesBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder setValues(
int index, tensorflow.Struct.StructuredValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.set(index, value);
onChanged();
} else {
valuesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder setValues(
int index, tensorflow.Struct.StructuredValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.set(index, builderForValue.build());
onChanged();
} else {
valuesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addValues(tensorflow.Struct.StructuredValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.add(value);
onChanged();
} else {
valuesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addValues(
int index, tensorflow.Struct.StructuredValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.add(index, value);
onChanged();
} else {
valuesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addValues(
tensorflow.Struct.StructuredValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.add(builderForValue.build());
onChanged();
} else {
valuesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addValues(
int index, tensorflow.Struct.StructuredValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.add(index, builderForValue.build());
onChanged();
} else {
valuesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder addAllValues(
java.lang.Iterable extends tensorflow.Struct.StructuredValue> values) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, values_);
onChanged();
} else {
valuesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder clearValues() {
if (valuesBuilder_ == null) {
values_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
valuesBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public Builder removeValues(int index) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.remove(index);
onChanged();
} else {
valuesBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue.Builder getValuesBuilder(
int index) {
return getValuesFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValueOrBuilder getValuesOrBuilder(
int index) {
if (valuesBuilder_ == null) {
return values_.get(index); } else {
return valuesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List extends tensorflow.Struct.StructuredValueOrBuilder>
getValuesOrBuilderList() {
if (valuesBuilder_ != null) {
return valuesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(values_);
}
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue.Builder addValuesBuilder() {
return getValuesFieldBuilder().addBuilder(
tensorflow.Struct.StructuredValue.getDefaultInstance());
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public tensorflow.Struct.StructuredValue.Builder addValuesBuilder(
int index) {
return getValuesFieldBuilder().addBuilder(
index, tensorflow.Struct.StructuredValue.getDefaultInstance());
}
/**
* repeated .tensorflow.StructuredValue values = 1;
*/
public java.util.List
getValuesBuilderList() {
return getValuesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder>
getValuesFieldBuilder() {
if (valuesBuilder_ == null) {
valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder>(
values_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
values_ = null;
}
return valuesBuilder_;
}
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.TupleValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.TupleValue)
private static final tensorflow.Struct.TupleValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.TupleValue();
}
public static tensorflow.Struct.TupleValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TupleValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TupleValue(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public tensorflow.Struct.TupleValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DictValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.DictValue)
com.google.protobuf.MessageOrBuilder {
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
int getFieldsCount();
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
boolean containsFields(
java.lang.String key);
/**
* Use {@link #getFieldsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getFields();
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
java.util.Map
getFieldsMap();
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
tensorflow.Struct.StructuredValue getFieldsOrDefault(
java.lang.String key,
tensorflow.Struct.StructuredValue defaultValue);
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
tensorflow.Struct.StructuredValue getFieldsOrThrow(
java.lang.String key);
}
/**
*
* Represents a Python dict keyed by `str`.
* The comment on Unicode from Value.string_value applies analogously.
*
*
* Protobuf type {@code tensorflow.DictValue}
*/
public static final class DictValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.DictValue)
DictValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use DictValue.newBuilder() to construct.
private DictValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DictValue() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DictValue(
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: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
fields_ = com.google.protobuf.MapField.newMapField(
FieldsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
fields__ = input.readMessage(
FieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
fields_.getMutableMap().put(
fields__.getKey(), fields__.getValue());
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 tensorflow.Struct.internal_static_tensorflow_DictValue_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetFields();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_DictValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.DictValue.class, tensorflow.Struct.DictValue.Builder.class);
}
public static final int FIELDS_FIELD_NUMBER = 1;
private static final class FieldsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, tensorflow.Struct.StructuredValue> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.Struct.internal_static_tensorflow_DictValue_FieldsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
tensorflow.Struct.StructuredValue.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, tensorflow.Struct.StructuredValue> fields_;
private com.google.protobuf.MapField
internalGetFields() {
if (fields_ == null) {
return com.google.protobuf.MapField.emptyMapField(
FieldsDefaultEntryHolder.defaultEntry);
}
return fields_;
}
public int getFieldsCount() {
return internalGetFields().getMap().size();
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public boolean containsFields(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetFields().getMap().containsKey(key);
}
/**
* Use {@link #getFieldsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getFields() {
return getFieldsMap();
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public java.util.Map getFieldsMap() {
return internalGetFields().getMap();
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public tensorflow.Struct.StructuredValue getFieldsOrDefault(
java.lang.String key,
tensorflow.Struct.StructuredValue defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetFields().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public tensorflow.Struct.StructuredValue getFieldsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetFields().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetFields(),
FieldsDefaultEntryHolder.defaultEntry,
1);
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetFields().getMap().entrySet()) {
com.google.protobuf.MapEntry
fields__ = FieldsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, fields__);
}
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 tensorflow.Struct.DictValue)) {
return super.equals(obj);
}
tensorflow.Struct.DictValue other = (tensorflow.Struct.DictValue) obj;
boolean result = true;
result = result && internalGetFields().equals(
other.internalGetFields());
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 (!internalGetFields().getMap().isEmpty()) {
hash = (37 * hash) + FIELDS_FIELD_NUMBER;
hash = (53 * hash) + internalGetFields().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.DictValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.DictValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.DictValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.DictValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.DictValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.DictValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.DictValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.DictValue 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 tensorflow.Struct.DictValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.DictValue 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 tensorflow.Struct.DictValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.DictValue 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(tensorflow.Struct.DictValue 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;
}
/**
*
* Represents a Python dict keyed by `str`.
* The comment on Unicode from Value.string_value applies analogously.
*
*
* Protobuf type {@code tensorflow.DictValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.DictValue)
tensorflow.Struct.DictValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_DictValue_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetFields();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableFields();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_DictValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.DictValue.class, tensorflow.Struct.DictValue.Builder.class);
}
// Construct using tensorflow.Struct.DictValue.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();
internalGetMutableFields().clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_DictValue_descriptor;
}
public tensorflow.Struct.DictValue getDefaultInstanceForType() {
return tensorflow.Struct.DictValue.getDefaultInstance();
}
public tensorflow.Struct.DictValue build() {
tensorflow.Struct.DictValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.DictValue buildPartial() {
tensorflow.Struct.DictValue result = new tensorflow.Struct.DictValue(this);
int from_bitField0_ = bitField0_;
result.fields_ = internalGetFields();
result.fields_.makeImmutable();
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 tensorflow.Struct.DictValue) {
return mergeFrom((tensorflow.Struct.DictValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.DictValue other) {
if (other == tensorflow.Struct.DictValue.getDefaultInstance()) return this;
internalGetMutableFields().mergeFrom(
other.internalGetFields());
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 {
tensorflow.Struct.DictValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.DictValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, tensorflow.Struct.StructuredValue> fields_;
private com.google.protobuf.MapField
internalGetFields() {
if (fields_ == null) {
return com.google.protobuf.MapField.emptyMapField(
FieldsDefaultEntryHolder.defaultEntry);
}
return fields_;
}
private com.google.protobuf.MapField
internalGetMutableFields() {
onChanged();;
if (fields_ == null) {
fields_ = com.google.protobuf.MapField.newMapField(
FieldsDefaultEntryHolder.defaultEntry);
}
if (!fields_.isMutable()) {
fields_ = fields_.copy();
}
return fields_;
}
public int getFieldsCount() {
return internalGetFields().getMap().size();
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public boolean containsFields(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetFields().getMap().containsKey(key);
}
/**
* Use {@link #getFieldsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getFields() {
return getFieldsMap();
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public java.util.Map getFieldsMap() {
return internalGetFields().getMap();
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public tensorflow.Struct.StructuredValue getFieldsOrDefault(
java.lang.String key,
tensorflow.Struct.StructuredValue defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetFields().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public tensorflow.Struct.StructuredValue getFieldsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetFields().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearFields() {
internalGetMutableFields().getMutableMap()
.clear();
return this;
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public Builder removeFields(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableFields().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableFields() {
return internalGetMutableFields().getMutableMap();
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public Builder putFields(
java.lang.String key,
tensorflow.Struct.StructuredValue value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableFields().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, .tensorflow.StructuredValue> fields = 1;
*/
public Builder putAllFields(
java.util.Map values) {
internalGetMutableFields().getMutableMap()
.putAll(values);
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.DictValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.DictValue)
private static final tensorflow.Struct.DictValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.DictValue();
}
public static tensorflow.Struct.DictValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public DictValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DictValue(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public tensorflow.Struct.DictValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PairValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.PairValue)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
*/
java.lang.String getKey();
/**
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* .tensorflow.StructuredValue value = 2;
*/
boolean hasValue();
/**
* .tensorflow.StructuredValue value = 2;
*/
tensorflow.Struct.StructuredValue getValue();
/**
* .tensorflow.StructuredValue value = 2;
*/
tensorflow.Struct.StructuredValueOrBuilder getValueOrBuilder();
}
/**
*
* Represents a (key, value) pair.
*
*
* Protobuf type {@code tensorflow.PairValue}
*/
public static final class PairValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.PairValue)
PairValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use PairValue.newBuilder() to construct.
private PairValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PairValue() {
key_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PairValue(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 18: {
tensorflow.Struct.StructuredValue.Builder subBuilder = null;
if (value_ != null) {
subBuilder = value_.toBuilder();
}
value_ = input.readMessage(tensorflow.Struct.StructuredValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(value_);
value_ = subBuilder.buildPartial();
}
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 tensorflow.Struct.internal_static_tensorflow_PairValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_PairValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.PairValue.class, tensorflow.Struct.PairValue.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
* string key = 1;
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
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();
key_ = s;
return s;
}
}
/**
* string key = 1;
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private tensorflow.Struct.StructuredValue value_;
/**
* .tensorflow.StructuredValue value = 2;
*/
public boolean hasValue() {
return value_ != null;
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public tensorflow.Struct.StructuredValue getValue() {
return value_ == null ? tensorflow.Struct.StructuredValue.getDefaultInstance() : value_;
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public tensorflow.Struct.StructuredValueOrBuilder getValueOrBuilder() {
return getValue();
}
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 (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (value_ != null) {
output.writeMessage(2, getValue());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (value_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getValue());
}
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 tensorflow.Struct.PairValue)) {
return super.equals(obj);
}
tensorflow.Struct.PairValue other = (tensorflow.Struct.PairValue) obj;
boolean result = true;
result = result && getKey()
.equals(other.getKey());
result = result && (hasValue() == other.hasValue());
if (hasValue()) {
result = result && getValue()
.equals(other.getValue());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
if (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.PairValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.PairValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.PairValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.PairValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.PairValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.PairValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.PairValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.PairValue 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 tensorflow.Struct.PairValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.PairValue 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 tensorflow.Struct.PairValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.PairValue 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(tensorflow.Struct.PairValue 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;
}
/**
*
* Represents a (key, value) pair.
*
*
* Protobuf type {@code tensorflow.PairValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.PairValue)
tensorflow.Struct.PairValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_PairValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_PairValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.PairValue.class, tensorflow.Struct.PairValue.Builder.class);
}
// Construct using tensorflow.Struct.PairValue.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();
key_ = "";
if (valueBuilder_ == null) {
value_ = null;
} else {
value_ = null;
valueBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_PairValue_descriptor;
}
public tensorflow.Struct.PairValue getDefaultInstanceForType() {
return tensorflow.Struct.PairValue.getDefaultInstance();
}
public tensorflow.Struct.PairValue build() {
tensorflow.Struct.PairValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.PairValue buildPartial() {
tensorflow.Struct.PairValue result = new tensorflow.Struct.PairValue(this);
result.key_ = key_;
if (valueBuilder_ == null) {
result.value_ = value_;
} else {
result.value_ = valueBuilder_.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 tensorflow.Struct.PairValue) {
return mergeFrom((tensorflow.Struct.PairValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.PairValue other) {
if (other == tensorflow.Struct.PairValue.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (other.hasValue()) {
mergeValue(other.getValue());
}
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 {
tensorflow.Struct.PairValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.PairValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object key_ = "";
/**
* string key = 1;
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string key = 1;
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
private tensorflow.Struct.StructuredValue value_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder> valueBuilder_;
/**
* .tensorflow.StructuredValue value = 2;
*/
public boolean hasValue() {
return valueBuilder_ != null || value_ != null;
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public tensorflow.Struct.StructuredValue getValue() {
if (valueBuilder_ == null) {
return value_ == null ? tensorflow.Struct.StructuredValue.getDefaultInstance() : value_;
} else {
return valueBuilder_.getMessage();
}
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public Builder setValue(tensorflow.Struct.StructuredValue value) {
if (valueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
valueBuilder_.setMessage(value);
}
return this;
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public Builder setValue(
tensorflow.Struct.StructuredValue.Builder builderForValue) {
if (valueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
valueBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public Builder mergeValue(tensorflow.Struct.StructuredValue value) {
if (valueBuilder_ == null) {
if (value_ != null) {
value_ =
tensorflow.Struct.StructuredValue.newBuilder(value_).mergeFrom(value).buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
valueBuilder_.mergeFrom(value);
}
return this;
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public Builder clearValue() {
if (valueBuilder_ == null) {
value_ = null;
onChanged();
} else {
value_ = null;
valueBuilder_ = null;
}
return this;
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public tensorflow.Struct.StructuredValue.Builder getValueBuilder() {
onChanged();
return getValueFieldBuilder().getBuilder();
}
/**
* .tensorflow.StructuredValue value = 2;
*/
public tensorflow.Struct.StructuredValueOrBuilder getValueOrBuilder() {
if (valueBuilder_ != null) {
return valueBuilder_.getMessageOrBuilder();
} else {
return value_ == null ?
tensorflow.Struct.StructuredValue.getDefaultInstance() : value_;
}
}
/**
* .tensorflow.StructuredValue value = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder>
getValueFieldBuilder() {
if (valueBuilder_ == null) {
valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder>(
getValue(),
getParentForChildren(),
isClean());
value_ = null;
}
return valueBuilder_;
}
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.PairValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.PairValue)
private static final tensorflow.Struct.PairValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.PairValue();
}
public static tensorflow.Struct.PairValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public PairValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PairValue(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public tensorflow.Struct.PairValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface NamedTupleValueOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.NamedTupleValue)
com.google.protobuf.MessageOrBuilder {
/**
* string name = 1;
*/
java.lang.String getName();
/**
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* repeated .tensorflow.PairValue values = 2;
*/
java.util.List
getValuesList();
/**
* repeated .tensorflow.PairValue values = 2;
*/
tensorflow.Struct.PairValue getValues(int index);
/**
* repeated .tensorflow.PairValue values = 2;
*/
int getValuesCount();
/**
* repeated .tensorflow.PairValue values = 2;
*/
java.util.List extends tensorflow.Struct.PairValueOrBuilder>
getValuesOrBuilderList();
/**
* repeated .tensorflow.PairValue values = 2;
*/
tensorflow.Struct.PairValueOrBuilder getValuesOrBuilder(
int index);
}
/**
*
* Represents Python's namedtuple.
*
*
* Protobuf type {@code tensorflow.NamedTupleValue}
*/
public static final class NamedTupleValue extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.NamedTupleValue)
NamedTupleValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use NamedTupleValue.newBuilder() to construct.
private NamedTupleValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NamedTupleValue() {
name_ = "";
values_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NamedTupleValue(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
values_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
values_.add(
input.readMessage(tensorflow.Struct.PairValue.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_ & 0x00000002) == 0x00000002)) {
values_ = java.util.Collections.unmodifiableList(values_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_NamedTupleValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_NamedTupleValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.NamedTupleValue.class, tensorflow.Struct.NamedTupleValue.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUES_FIELD_NUMBER = 2;
private java.util.List values_;
/**
* repeated .tensorflow.PairValue values = 2;
*/
public java.util.List getValuesList() {
return values_;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public java.util.List extends tensorflow.Struct.PairValueOrBuilder>
getValuesOrBuilderList() {
return values_;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public int getValuesCount() {
return values_.size();
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public tensorflow.Struct.PairValue getValues(int index) {
return values_.get(index);
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public tensorflow.Struct.PairValueOrBuilder getValuesOrBuilder(
int index) {
return values_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < values_.size(); i++) {
output.writeMessage(2, values_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
for (int i = 0; i < values_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, values_.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 tensorflow.Struct.NamedTupleValue)) {
return super.equals(obj);
}
tensorflow.Struct.NamedTupleValue other = (tensorflow.Struct.NamedTupleValue) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getValuesList()
.equals(other.getValuesList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (getValuesCount() > 0) {
hash = (37 * hash) + VALUES_FIELD_NUMBER;
hash = (53 * hash) + getValuesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.NamedTupleValue parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.NamedTupleValue parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.NamedTupleValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.NamedTupleValue parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.NamedTupleValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.NamedTupleValue parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.NamedTupleValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.NamedTupleValue 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 tensorflow.Struct.NamedTupleValue parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.NamedTupleValue 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 tensorflow.Struct.NamedTupleValue parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.NamedTupleValue 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(tensorflow.Struct.NamedTupleValue 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;
}
/**
*
* Represents Python's namedtuple.
*
*
* Protobuf type {@code tensorflow.NamedTupleValue}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.NamedTupleValue)
tensorflow.Struct.NamedTupleValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_NamedTupleValue_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_NamedTupleValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.NamedTupleValue.class, tensorflow.Struct.NamedTupleValue.Builder.class);
}
// Construct using tensorflow.Struct.NamedTupleValue.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getValuesFieldBuilder();
}
}
public Builder clear() {
super.clear();
name_ = "";
if (valuesBuilder_ == null) {
values_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
valuesBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_NamedTupleValue_descriptor;
}
public tensorflow.Struct.NamedTupleValue getDefaultInstanceForType() {
return tensorflow.Struct.NamedTupleValue.getDefaultInstance();
}
public tensorflow.Struct.NamedTupleValue build() {
tensorflow.Struct.NamedTupleValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.NamedTupleValue buildPartial() {
tensorflow.Struct.NamedTupleValue result = new tensorflow.Struct.NamedTupleValue(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
if (valuesBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
values_ = java.util.Collections.unmodifiableList(values_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.values_ = values_;
} else {
result.values_ = valuesBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.Struct.NamedTupleValue) {
return mergeFrom((tensorflow.Struct.NamedTupleValue)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.NamedTupleValue other) {
if (other == tensorflow.Struct.NamedTupleValue.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (valuesBuilder_ == null) {
if (!other.values_.isEmpty()) {
if (values_.isEmpty()) {
values_ = other.values_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureValuesIsMutable();
values_.addAll(other.values_);
}
onChanged();
}
} else {
if (!other.values_.isEmpty()) {
if (valuesBuilder_.isEmpty()) {
valuesBuilder_.dispose();
valuesBuilder_ = null;
values_ = other.values_;
bitField0_ = (bitField0_ & ~0x00000002);
valuesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getValuesFieldBuilder() : null;
} else {
valuesBuilder_.addAllMessages(other.values_);
}
}
}
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 {
tensorflow.Struct.NamedTupleValue parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.NamedTupleValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.util.List values_ =
java.util.Collections.emptyList();
private void ensureValuesIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
values_ = new java.util.ArrayList(values_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.PairValue, tensorflow.Struct.PairValue.Builder, tensorflow.Struct.PairValueOrBuilder> valuesBuilder_;
/**
* repeated .tensorflow.PairValue values = 2;
*/
public java.util.List getValuesList() {
if (valuesBuilder_ == null) {
return java.util.Collections.unmodifiableList(values_);
} else {
return valuesBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public int getValuesCount() {
if (valuesBuilder_ == null) {
return values_.size();
} else {
return valuesBuilder_.getCount();
}
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public tensorflow.Struct.PairValue getValues(int index) {
if (valuesBuilder_ == null) {
return values_.get(index);
} else {
return valuesBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder setValues(
int index, tensorflow.Struct.PairValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.set(index, value);
onChanged();
} else {
valuesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder setValues(
int index, tensorflow.Struct.PairValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.set(index, builderForValue.build());
onChanged();
} else {
valuesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder addValues(tensorflow.Struct.PairValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.add(value);
onChanged();
} else {
valuesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder addValues(
int index, tensorflow.Struct.PairValue value) {
if (valuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.add(index, value);
onChanged();
} else {
valuesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder addValues(
tensorflow.Struct.PairValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.add(builderForValue.build());
onChanged();
} else {
valuesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder addValues(
int index, tensorflow.Struct.PairValue.Builder builderForValue) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.add(index, builderForValue.build());
onChanged();
} else {
valuesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder addAllValues(
java.lang.Iterable extends tensorflow.Struct.PairValue> values) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, values_);
onChanged();
} else {
valuesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder clearValues() {
if (valuesBuilder_ == null) {
values_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
valuesBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public Builder removeValues(int index) {
if (valuesBuilder_ == null) {
ensureValuesIsMutable();
values_.remove(index);
onChanged();
} else {
valuesBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public tensorflow.Struct.PairValue.Builder getValuesBuilder(
int index) {
return getValuesFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public tensorflow.Struct.PairValueOrBuilder getValuesOrBuilder(
int index) {
if (valuesBuilder_ == null) {
return values_.get(index); } else {
return valuesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public java.util.List extends tensorflow.Struct.PairValueOrBuilder>
getValuesOrBuilderList() {
if (valuesBuilder_ != null) {
return valuesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(values_);
}
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public tensorflow.Struct.PairValue.Builder addValuesBuilder() {
return getValuesFieldBuilder().addBuilder(
tensorflow.Struct.PairValue.getDefaultInstance());
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public tensorflow.Struct.PairValue.Builder addValuesBuilder(
int index) {
return getValuesFieldBuilder().addBuilder(
index, tensorflow.Struct.PairValue.getDefaultInstance());
}
/**
* repeated .tensorflow.PairValue values = 2;
*/
public java.util.List
getValuesBuilderList() {
return getValuesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.PairValue, tensorflow.Struct.PairValue.Builder, tensorflow.Struct.PairValueOrBuilder>
getValuesFieldBuilder() {
if (valuesBuilder_ == null) {
valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.Struct.PairValue, tensorflow.Struct.PairValue.Builder, tensorflow.Struct.PairValueOrBuilder>(
values_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
values_ = null;
}
return valuesBuilder_;
}
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.NamedTupleValue)
}
// @@protoc_insertion_point(class_scope:tensorflow.NamedTupleValue)
private static final tensorflow.Struct.NamedTupleValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.NamedTupleValue();
}
public static tensorflow.Struct.NamedTupleValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public NamedTupleValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NamedTupleValue(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public tensorflow.Struct.NamedTupleValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TensorSpecProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.TensorSpecProto)
com.google.protobuf.MessageOrBuilder {
/**
* string name = 1;
*/
java.lang.String getName();
/**
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
boolean hasShape();
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
org.tensorflow.framework.TensorShapeProto getShape();
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder();
/**
* .tensorflow.DataType dtype = 3;
*/
int getDtypeValue();
/**
* .tensorflow.DataType dtype = 3;
*/
org.tensorflow.framework.DataType getDtype();
}
/**
*
* A protobuf to tf.TensorSpec.
*
*
* Protobuf type {@code tensorflow.TensorSpecProto}
*/
public static final class TensorSpecProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.TensorSpecProto)
TensorSpecProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use TensorSpecProto.newBuilder() to construct.
private TensorSpecProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TensorSpecProto() {
name_ = "";
dtype_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TensorSpecProto(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null;
if (shape_ != null) {
subBuilder = shape_.toBuilder();
}
shape_ = input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(shape_);
shape_ = subBuilder.buildPartial();
}
break;
}
case 24: {
int rawValue = input.readEnum();
dtype_ = rawValue;
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 tensorflow.Struct.internal_static_tensorflow_TensorSpecProto_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_TensorSpecProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.TensorSpecProto.class, tensorflow.Struct.TensorSpecProto.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHAPE_FIELD_NUMBER = 2;
private org.tensorflow.framework.TensorShapeProto shape_;
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public boolean hasShape() {
return shape_ != null;
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto getShape() {
return shape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
return getShape();
}
public static final int DTYPE_FIELD_NUMBER = 3;
private int dtype_;
/**
* .tensorflow.DataType dtype = 3;
*/
public int getDtypeValue() {
return dtype_;
}
/**
* .tensorflow.DataType dtype = 3;
*/
public org.tensorflow.framework.DataType getDtype() {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (shape_ != null) {
output.writeMessage(2, getShape());
}
if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) {
output.writeEnum(3, dtype_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (shape_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getShape());
}
if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, dtype_);
}
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 tensorflow.Struct.TensorSpecProto)) {
return super.equals(obj);
}
tensorflow.Struct.TensorSpecProto other = (tensorflow.Struct.TensorSpecProto) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && (hasShape() == other.hasShape());
if (hasShape()) {
result = result && getShape()
.equals(other.getShape());
}
result = result && dtype_ == other.dtype_;
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasShape()) {
hash = (37 * hash) + SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getShape().hashCode();
}
hash = (37 * hash) + DTYPE_FIELD_NUMBER;
hash = (53 * hash) + dtype_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.TensorSpecProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TensorSpecProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TensorSpecProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TensorSpecProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TensorSpecProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TensorSpecProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TensorSpecProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.TensorSpecProto 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 tensorflow.Struct.TensorSpecProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.TensorSpecProto 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 tensorflow.Struct.TensorSpecProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.TensorSpecProto 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(tensorflow.Struct.TensorSpecProto 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;
}
/**
*
* A protobuf to tf.TensorSpec.
*
*
* Protobuf type {@code tensorflow.TensorSpecProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.TensorSpecProto)
tensorflow.Struct.TensorSpecProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_TensorSpecProto_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_TensorSpecProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.TensorSpecProto.class, tensorflow.Struct.TensorSpecProto.Builder.class);
}
// Construct using tensorflow.Struct.TensorSpecProto.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();
name_ = "";
if (shapeBuilder_ == null) {
shape_ = null;
} else {
shape_ = null;
shapeBuilder_ = null;
}
dtype_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_TensorSpecProto_descriptor;
}
public tensorflow.Struct.TensorSpecProto getDefaultInstanceForType() {
return tensorflow.Struct.TensorSpecProto.getDefaultInstance();
}
public tensorflow.Struct.TensorSpecProto build() {
tensorflow.Struct.TensorSpecProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.TensorSpecProto buildPartial() {
tensorflow.Struct.TensorSpecProto result = new tensorflow.Struct.TensorSpecProto(this);
result.name_ = name_;
if (shapeBuilder_ == null) {
result.shape_ = shape_;
} else {
result.shape_ = shapeBuilder_.build();
}
result.dtype_ = dtype_;
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 tensorflow.Struct.TensorSpecProto) {
return mergeFrom((tensorflow.Struct.TensorSpecProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.TensorSpecProto other) {
if (other == tensorflow.Struct.TensorSpecProto.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasShape()) {
mergeShape(other.getShape());
}
if (other.dtype_ != 0) {
setDtypeValue(other.getDtypeValue());
}
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 {
tensorflow.Struct.TensorSpecProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.TensorSpecProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private org.tensorflow.framework.TensorShapeProto shape_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> shapeBuilder_;
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public boolean hasShape() {
return shapeBuilder_ != null || shape_ != null;
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto getShape() {
if (shapeBuilder_ == null) {
return shape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
} else {
return shapeBuilder_.getMessage();
}
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public Builder setShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
shape_ = value;
onChanged();
} else {
shapeBuilder_.setMessage(value);
}
return this;
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public Builder setShape(
org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (shapeBuilder_ == null) {
shape_ = builderForValue.build();
onChanged();
} else {
shapeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public Builder mergeShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (shape_ != null) {
shape_ =
org.tensorflow.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
} else {
shape_ = value;
}
onChanged();
} else {
shapeBuilder_.mergeFrom(value);
}
return this;
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public Builder clearShape() {
if (shapeBuilder_ == null) {
shape_ = null;
onChanged();
} else {
shape_ = null;
shapeBuilder_ = null;
}
return this;
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProto.Builder getShapeBuilder() {
onChanged();
return getShapeFieldBuilder().getBuilder();
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
if (shapeBuilder_ != null) {
return shapeBuilder_.getMessageOrBuilder();
} else {
return shape_ == null ?
org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
}
}
/**
* .tensorflow.TensorShapeProto shape = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>
getShapeFieldBuilder() {
if (shapeBuilder_ == null) {
shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>(
getShape(),
getParentForChildren(),
isClean());
shape_ = null;
}
return shapeBuilder_;
}
private int dtype_ = 0;
/**
* .tensorflow.DataType dtype = 3;
*/
public int getDtypeValue() {
return dtype_;
}
/**
* .tensorflow.DataType dtype = 3;
*/
public Builder setDtypeValue(int value) {
dtype_ = value;
onChanged();
return this;
}
/**
* .tensorflow.DataType dtype = 3;
*/
public org.tensorflow.framework.DataType getDtype() {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
/**
* .tensorflow.DataType dtype = 3;
*/
public Builder setDtype(org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
dtype_ = value.getNumber();
onChanged();
return this;
}
/**
* .tensorflow.DataType dtype = 3;
*/
public Builder clearDtype() {
dtype_ = 0;
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.TensorSpecProto)
}
// @@protoc_insertion_point(class_scope:tensorflow.TensorSpecProto)
private static final tensorflow.Struct.TensorSpecProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.TensorSpecProto();
}
public static tensorflow.Struct.TensorSpecProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TensorSpecProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TensorSpecProto(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public tensorflow.Struct.TensorSpecProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TypeSpecProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.TypeSpecProto)
com.google.protobuf.MessageOrBuilder {
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
int getTypeSpecClassValue();
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
tensorflow.Struct.TypeSpecProto.TypeSpecClass getTypeSpecClass();
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
boolean hasTypeState();
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
tensorflow.Struct.StructuredValue getTypeState();
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
tensorflow.Struct.StructuredValueOrBuilder getTypeStateOrBuilder();
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
java.lang.String getTypeSpecClassName();
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
com.google.protobuf.ByteString
getTypeSpecClassNameBytes();
}
/**
*
* Represents a tf.TypeSpec
*
*
* Protobuf type {@code tensorflow.TypeSpecProto}
*/
public static final class TypeSpecProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.TypeSpecProto)
TypeSpecProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use TypeSpecProto.newBuilder() to construct.
private TypeSpecProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TypeSpecProto() {
typeSpecClass_ = 0;
typeSpecClassName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TypeSpecProto(
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 8: {
int rawValue = input.readEnum();
typeSpecClass_ = rawValue;
break;
}
case 18: {
tensorflow.Struct.StructuredValue.Builder subBuilder = null;
if (typeState_ != null) {
subBuilder = typeState_.toBuilder();
}
typeState_ = input.readMessage(tensorflow.Struct.StructuredValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(typeState_);
typeState_ = subBuilder.buildPartial();
}
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
typeSpecClassName_ = s;
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 tensorflow.Struct.internal_static_tensorflow_TypeSpecProto_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_TypeSpecProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.TypeSpecProto.class, tensorflow.Struct.TypeSpecProto.Builder.class);
}
/**
* Protobuf enum {@code tensorflow.TypeSpecProto.TypeSpecClass}
*/
public enum TypeSpecClass
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
*
* tf.SparseTensorSpec
*
*
* SPARSE_TENSOR_SPEC = 1;
*/
SPARSE_TENSOR_SPEC(1),
/**
*
* tf.IndexedSlicesSpec
*
*
* INDEXED_SLICES_SPEC = 2;
*/
INDEXED_SLICES_SPEC(2),
/**
*
* tf.RaggedTensorSpec
*
*
* RAGGED_TENSOR_SPEC = 3;
*/
RAGGED_TENSOR_SPEC(3),
/**
*
* tf.TensorArraySpec
*
*
* TENSOR_ARRAY_SPEC = 4;
*/
TENSOR_ARRAY_SPEC(4),
/**
*
* tf.data.DatasetSpec
*
*
* DATA_DATASET_SPEC = 5;
*/
DATA_DATASET_SPEC(5),
/**
*
* IteratorSpec from data/ops/iterator_ops.py
*
*
* DATA_ITERATOR_SPEC = 6;
*/
DATA_ITERATOR_SPEC(6),
/**
*
* tf.OptionalSpec
*
*
* OPTIONAL_SPEC = 7;
*/
OPTIONAL_SPEC(7),
/**
*
* PerReplicaSpec from distribute/values.py
*
*
* PER_REPLICA_SPEC = 8;
*/
PER_REPLICA_SPEC(8),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
*
* tf.SparseTensorSpec
*
*
* SPARSE_TENSOR_SPEC = 1;
*/
public static final int SPARSE_TENSOR_SPEC_VALUE = 1;
/**
*
* tf.IndexedSlicesSpec
*
*
* INDEXED_SLICES_SPEC = 2;
*/
public static final int INDEXED_SLICES_SPEC_VALUE = 2;
/**
*
* tf.RaggedTensorSpec
*
*
* RAGGED_TENSOR_SPEC = 3;
*/
public static final int RAGGED_TENSOR_SPEC_VALUE = 3;
/**
*
* tf.TensorArraySpec
*
*
* TENSOR_ARRAY_SPEC = 4;
*/
public static final int TENSOR_ARRAY_SPEC_VALUE = 4;
/**
*
* tf.data.DatasetSpec
*
*
* DATA_DATASET_SPEC = 5;
*/
public static final int DATA_DATASET_SPEC_VALUE = 5;
/**
*
* IteratorSpec from data/ops/iterator_ops.py
*
*
* DATA_ITERATOR_SPEC = 6;
*/
public static final int DATA_ITERATOR_SPEC_VALUE = 6;
/**
*
* tf.OptionalSpec
*
*
* OPTIONAL_SPEC = 7;
*/
public static final int OPTIONAL_SPEC_VALUE = 7;
/**
*
* PerReplicaSpec from distribute/values.py
*
*
* PER_REPLICA_SPEC = 8;
*/
public static final int PER_REPLICA_SPEC_VALUE = 8;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TypeSpecClass valueOf(int value) {
return forNumber(value);
}
public static TypeSpecClass forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return SPARSE_TENSOR_SPEC;
case 2: return INDEXED_SLICES_SPEC;
case 3: return RAGGED_TENSOR_SPEC;
case 4: return TENSOR_ARRAY_SPEC;
case 5: return DATA_DATASET_SPEC;
case 6: return DATA_ITERATOR_SPEC;
case 7: return OPTIONAL_SPEC;
case 8: return PER_REPLICA_SPEC;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TypeSpecClass> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TypeSpecClass findValueByNumber(int number) {
return TypeSpecClass.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return tensorflow.Struct.TypeSpecProto.getDescriptor().getEnumTypes().get(0);
}
private static final TypeSpecClass[] VALUES = values();
public static TypeSpecClass valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private TypeSpecClass(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:tensorflow.TypeSpecProto.TypeSpecClass)
}
public static final int TYPE_SPEC_CLASS_FIELD_NUMBER = 1;
private int typeSpecClass_;
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
public int getTypeSpecClassValue() {
return typeSpecClass_;
}
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
public tensorflow.Struct.TypeSpecProto.TypeSpecClass getTypeSpecClass() {
tensorflow.Struct.TypeSpecProto.TypeSpecClass result = tensorflow.Struct.TypeSpecProto.TypeSpecClass.valueOf(typeSpecClass_);
return result == null ? tensorflow.Struct.TypeSpecProto.TypeSpecClass.UNRECOGNIZED : result;
}
public static final int TYPE_STATE_FIELD_NUMBER = 2;
private tensorflow.Struct.StructuredValue typeState_;
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public boolean hasTypeState() {
return typeState_ != null;
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public tensorflow.Struct.StructuredValue getTypeState() {
return typeState_ == null ? tensorflow.Struct.StructuredValue.getDefaultInstance() : typeState_;
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public tensorflow.Struct.StructuredValueOrBuilder getTypeStateOrBuilder() {
return getTypeState();
}
public static final int TYPE_SPEC_CLASS_NAME_FIELD_NUMBER = 3;
private volatile java.lang.Object typeSpecClassName_;
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
public java.lang.String getTypeSpecClassName() {
java.lang.Object ref = typeSpecClassName_;
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();
typeSpecClassName_ = s;
return s;
}
}
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
public com.google.protobuf.ByteString
getTypeSpecClassNameBytes() {
java.lang.Object ref = typeSpecClassName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
typeSpecClassName_ = 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 (typeSpecClass_ != tensorflow.Struct.TypeSpecProto.TypeSpecClass.UNKNOWN.getNumber()) {
output.writeEnum(1, typeSpecClass_);
}
if (typeState_ != null) {
output.writeMessage(2, getTypeState());
}
if (!getTypeSpecClassNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, typeSpecClassName_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (typeSpecClass_ != tensorflow.Struct.TypeSpecProto.TypeSpecClass.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, typeSpecClass_);
}
if (typeState_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTypeState());
}
if (!getTypeSpecClassNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, typeSpecClassName_);
}
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 tensorflow.Struct.TypeSpecProto)) {
return super.equals(obj);
}
tensorflow.Struct.TypeSpecProto other = (tensorflow.Struct.TypeSpecProto) obj;
boolean result = true;
result = result && typeSpecClass_ == other.typeSpecClass_;
result = result && (hasTypeState() == other.hasTypeState());
if (hasTypeState()) {
result = result && getTypeState()
.equals(other.getTypeState());
}
result = result && getTypeSpecClassName()
.equals(other.getTypeSpecClassName());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_SPEC_CLASS_FIELD_NUMBER;
hash = (53 * hash) + typeSpecClass_;
if (hasTypeState()) {
hash = (37 * hash) + TYPE_STATE_FIELD_NUMBER;
hash = (53 * hash) + getTypeState().hashCode();
}
hash = (37 * hash) + TYPE_SPEC_CLASS_NAME_FIELD_NUMBER;
hash = (53 * hash) + getTypeSpecClassName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.Struct.TypeSpecProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TypeSpecProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TypeSpecProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TypeSpecProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TypeSpecProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.Struct.TypeSpecProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.Struct.TypeSpecProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.TypeSpecProto 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 tensorflow.Struct.TypeSpecProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.Struct.TypeSpecProto 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 tensorflow.Struct.TypeSpecProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.Struct.TypeSpecProto 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(tensorflow.Struct.TypeSpecProto 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;
}
/**
*
* Represents a tf.TypeSpec
*
*
* Protobuf type {@code tensorflow.TypeSpecProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.TypeSpecProto)
tensorflow.Struct.TypeSpecProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.Struct.internal_static_tensorflow_TypeSpecProto_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.Struct.internal_static_tensorflow_TypeSpecProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.Struct.TypeSpecProto.class, tensorflow.Struct.TypeSpecProto.Builder.class);
}
// Construct using tensorflow.Struct.TypeSpecProto.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();
typeSpecClass_ = 0;
if (typeStateBuilder_ == null) {
typeState_ = null;
} else {
typeState_ = null;
typeStateBuilder_ = null;
}
typeSpecClassName_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.Struct.internal_static_tensorflow_TypeSpecProto_descriptor;
}
public tensorflow.Struct.TypeSpecProto getDefaultInstanceForType() {
return tensorflow.Struct.TypeSpecProto.getDefaultInstance();
}
public tensorflow.Struct.TypeSpecProto build() {
tensorflow.Struct.TypeSpecProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public tensorflow.Struct.TypeSpecProto buildPartial() {
tensorflow.Struct.TypeSpecProto result = new tensorflow.Struct.TypeSpecProto(this);
result.typeSpecClass_ = typeSpecClass_;
if (typeStateBuilder_ == null) {
result.typeState_ = typeState_;
} else {
result.typeState_ = typeStateBuilder_.build();
}
result.typeSpecClassName_ = typeSpecClassName_;
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 tensorflow.Struct.TypeSpecProto) {
return mergeFrom((tensorflow.Struct.TypeSpecProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.Struct.TypeSpecProto other) {
if (other == tensorflow.Struct.TypeSpecProto.getDefaultInstance()) return this;
if (other.typeSpecClass_ != 0) {
setTypeSpecClassValue(other.getTypeSpecClassValue());
}
if (other.hasTypeState()) {
mergeTypeState(other.getTypeState());
}
if (!other.getTypeSpecClassName().isEmpty()) {
typeSpecClassName_ = other.typeSpecClassName_;
onChanged();
}
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 {
tensorflow.Struct.TypeSpecProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.Struct.TypeSpecProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int typeSpecClass_ = 0;
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
public int getTypeSpecClassValue() {
return typeSpecClass_;
}
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
public Builder setTypeSpecClassValue(int value) {
typeSpecClass_ = value;
onChanged();
return this;
}
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
public tensorflow.Struct.TypeSpecProto.TypeSpecClass getTypeSpecClass() {
tensorflow.Struct.TypeSpecProto.TypeSpecClass result = tensorflow.Struct.TypeSpecProto.TypeSpecClass.valueOf(typeSpecClass_);
return result == null ? tensorflow.Struct.TypeSpecProto.TypeSpecClass.UNRECOGNIZED : result;
}
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
public Builder setTypeSpecClass(tensorflow.Struct.TypeSpecProto.TypeSpecClass value) {
if (value == null) {
throw new NullPointerException();
}
typeSpecClass_ = value.getNumber();
onChanged();
return this;
}
/**
* .tensorflow.TypeSpecProto.TypeSpecClass type_spec_class = 1;
*/
public Builder clearTypeSpecClass() {
typeSpecClass_ = 0;
onChanged();
return this;
}
private tensorflow.Struct.StructuredValue typeState_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder> typeStateBuilder_;
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public boolean hasTypeState() {
return typeStateBuilder_ != null || typeState_ != null;
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public tensorflow.Struct.StructuredValue getTypeState() {
if (typeStateBuilder_ == null) {
return typeState_ == null ? tensorflow.Struct.StructuredValue.getDefaultInstance() : typeState_;
} else {
return typeStateBuilder_.getMessage();
}
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public Builder setTypeState(tensorflow.Struct.StructuredValue value) {
if (typeStateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
typeState_ = value;
onChanged();
} else {
typeStateBuilder_.setMessage(value);
}
return this;
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public Builder setTypeState(
tensorflow.Struct.StructuredValue.Builder builderForValue) {
if (typeStateBuilder_ == null) {
typeState_ = builderForValue.build();
onChanged();
} else {
typeStateBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public Builder mergeTypeState(tensorflow.Struct.StructuredValue value) {
if (typeStateBuilder_ == null) {
if (typeState_ != null) {
typeState_ =
tensorflow.Struct.StructuredValue.newBuilder(typeState_).mergeFrom(value).buildPartial();
} else {
typeState_ = value;
}
onChanged();
} else {
typeStateBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public Builder clearTypeState() {
if (typeStateBuilder_ == null) {
typeState_ = null;
onChanged();
} else {
typeState_ = null;
typeStateBuilder_ = null;
}
return this;
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public tensorflow.Struct.StructuredValue.Builder getTypeStateBuilder() {
onChanged();
return getTypeStateFieldBuilder().getBuilder();
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
public tensorflow.Struct.StructuredValueOrBuilder getTypeStateOrBuilder() {
if (typeStateBuilder_ != null) {
return typeStateBuilder_.getMessageOrBuilder();
} else {
return typeState_ == null ?
tensorflow.Struct.StructuredValue.getDefaultInstance() : typeState_;
}
}
/**
*
* The value returned by TypeSpec._serialize().
*
*
* .tensorflow.StructuredValue type_state = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder>
getTypeStateFieldBuilder() {
if (typeStateBuilder_ == null) {
typeStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.Struct.StructuredValue, tensorflow.Struct.StructuredValue.Builder, tensorflow.Struct.StructuredValueOrBuilder>(
getTypeState(),
getParentForChildren(),
isClean());
typeState_ = null;
}
return typeStateBuilder_;
}
private java.lang.Object typeSpecClassName_ = "";
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
public java.lang.String getTypeSpecClassName() {
java.lang.Object ref = typeSpecClassName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
typeSpecClassName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
public com.google.protobuf.ByteString
getTypeSpecClassNameBytes() {
java.lang.Object ref = typeSpecClassName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
typeSpecClassName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
public Builder setTypeSpecClassName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
typeSpecClassName_ = value;
onChanged();
return this;
}
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
public Builder clearTypeSpecClassName() {
typeSpecClassName_ = getDefaultInstance().getTypeSpecClassName();
onChanged();
return this;
}
/**
*
* This is currently redundant with the type_spec_class enum, and is only
* used for error reporting. In particular, if you use an older binary to
* load a newer model, and the model uses a TypeSpecClass that the older
* binary doesn't support, then this lets us display a useful error message.
*
*
* string type_spec_class_name = 3;
*/
public Builder setTypeSpecClassNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
typeSpecClassName_ = 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.TypeSpecProto)
}
// @@protoc_insertion_point(class_scope:tensorflow.TypeSpecProto)
private static final tensorflow.Struct.TypeSpecProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.Struct.TypeSpecProto();
}
public static tensorflow.Struct.TypeSpecProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TypeSpecProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TypeSpecProto(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public tensorflow.Struct.TypeSpecProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_StructuredValue_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_StructuredValue_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_NoneValue_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_NoneValue_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_ListValue_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_ListValue_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_TupleValue_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_TupleValue_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_DictValue_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_DictValue_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_DictValue_FieldsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_DictValue_FieldsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_PairValue_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_PairValue_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_NamedTupleValue_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_NamedTupleValue_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_TensorSpecProto_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_TensorSpecProto_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_tensorflow_TypeSpecProto_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_tensorflow_TypeSpecProto_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n%tensorflow/core/protobuf/struct.proto\022" +
"\ntensorflow\032,tensorflow/core/framework/t" +
"ensor_shape.proto\032%tensorflow/core/frame" +
"work/types.proto\"\307\004\n\017StructuredValue\022+\n\n" +
"none_value\030\001 \001(\0132\025.tensorflow.NoneValueH" +
"\000\022\027\n\rfloat64_value\030\013 \001(\001H\000\022\025\n\013int64_valu" +
"e\030\014 \001(\022H\000\022\026\n\014string_value\030\r \001(\tH\000\022\024\n\nboo" +
"l_value\030\016 \001(\010H\000\022:\n\022tensor_shape_value\030\037 " +
"\001(\0132\034.tensorflow.TensorShapeProtoH\000\0222\n\022t" +
"ensor_dtype_value\030 \001(\0162\024.tensorflow.Dat" +
"aTypeH\000\0228\n\021tensor_spec_value\030! \001(\0132\033.ten" +
"sorflow.TensorSpecProtoH\000\0224\n\017type_spec_v" +
"alue\030\" \001(\0132\031.tensorflow.TypeSpecProtoH\000\022" +
"+\n\nlist_value\0303 \001(\0132\025.tensorflow.ListVal" +
"ueH\000\022-\n\013tuple_value\0304 \001(\0132\026.tensorflow.T" +
"upleValueH\000\022+\n\ndict_value\0305 \001(\0132\025.tensor" +
"flow.DictValueH\000\0228\n\021named_tuple_value\0306 " +
"\001(\0132\033.tensorflow.NamedTupleValueH\000B\006\n\004ki" +
"nd\"\013\n\tNoneValue\"8\n\tListValue\022+\n\006values\030\001" +
" \003(\0132\033.tensorflow.StructuredValue\"9\n\nTup" +
"leValue\022+\n\006values\030\001 \003(\0132\033.tensorflow.Str" +
"ucturedValue\"\212\001\n\tDictValue\0221\n\006fields\030\001 \003" +
"(\0132!.tensorflow.DictValue.FieldsEntry\032J\n" +
"\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022*\n\005value\030\002 \001(\013" +
"2\033.tensorflow.StructuredValue:\0028\001\"D\n\tPai" +
"rValue\022\013\n\003key\030\001 \001(\t\022*\n\005value\030\002 \001(\0132\033.ten" +
"sorflow.StructuredValue\"F\n\017NamedTupleVal" +
"ue\022\014\n\004name\030\001 \001(\t\022%\n\006values\030\002 \003(\0132\025.tenso" +
"rflow.PairValue\"q\n\017TensorSpecProto\022\014\n\004na" +
"me\030\001 \001(\t\022+\n\005shape\030\002 \001(\0132\034.tensorflow.Ten" +
"sorShapeProto\022#\n\005dtype\030\003 \001(\0162\024.tensorflo" +
"w.DataType\"\367\002\n\rTypeSpecProto\022@\n\017type_spe" +
"c_class\030\001 \001(\0162\'.tensorflow.TypeSpecProto" +
".TypeSpecClass\022/\n\ntype_state\030\002 \001(\0132\033.ten" +
"sorflow.StructuredValue\022\034\n\024type_spec_cla" +
"ss_name\030\003 \001(\t\"\324\001\n\rTypeSpecClass\022\013\n\007UNKNO" +
"WN\020\000\022\026\n\022SPARSE_TENSOR_SPEC\020\001\022\027\n\023INDEXED_" +
"SLICES_SPEC\020\002\022\026\n\022RAGGED_TENSOR_SPEC\020\003\022\025\n" +
"\021TENSOR_ARRAY_SPEC\020\004\022\025\n\021DATA_DATASET_SPE" +
"C\020\005\022\026\n\022DATA_ITERATOR_SPEC\020\006\022\021\n\rOPTIONAL_" +
"SPEC\020\007\022\024\n\020PER_REPLICA_SPEC\020\010b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
org.tensorflow.framework.TensorShapeProtos.getDescriptor(),
org.tensorflow.framework.TypesProtos.getDescriptor(),
}, assigner);
internal_static_tensorflow_StructuredValue_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_tensorflow_StructuredValue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_StructuredValue_descriptor,
new java.lang.String[] { "NoneValue", "Float64Value", "Int64Value", "StringValue", "BoolValue", "TensorShapeValue", "TensorDtypeValue", "TensorSpecValue", "TypeSpecValue", "ListValue", "TupleValue", "DictValue", "NamedTupleValue", "Kind", });
internal_static_tensorflow_NoneValue_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_tensorflow_NoneValue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_NoneValue_descriptor,
new java.lang.String[] { });
internal_static_tensorflow_ListValue_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_tensorflow_ListValue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_ListValue_descriptor,
new java.lang.String[] { "Values", });
internal_static_tensorflow_TupleValue_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_tensorflow_TupleValue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_TupleValue_descriptor,
new java.lang.String[] { "Values", });
internal_static_tensorflow_DictValue_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_tensorflow_DictValue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_DictValue_descriptor,
new java.lang.String[] { "Fields", });
internal_static_tensorflow_DictValue_FieldsEntry_descriptor =
internal_static_tensorflow_DictValue_descriptor.getNestedTypes().get(0);
internal_static_tensorflow_DictValue_FieldsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_DictValue_FieldsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_tensorflow_PairValue_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_tensorflow_PairValue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_PairValue_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_tensorflow_NamedTupleValue_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_tensorflow_NamedTupleValue_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_NamedTupleValue_descriptor,
new java.lang.String[] { "Name", "Values", });
internal_static_tensorflow_TensorSpecProto_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_tensorflow_TensorSpecProto_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_TensorSpecProto_descriptor,
new java.lang.String[] { "Name", "Shape", "Dtype", });
internal_static_tensorflow_TypeSpecProto_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_tensorflow_TypeSpecProto_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_tensorflow_TypeSpecProto_descriptor,
new java.lang.String[] { "TypeSpecClass", "TypeState", "TypeSpecClassName", });
org.tensorflow.framework.TensorShapeProtos.getDescriptor();
org.tensorflow.framework.TypesProtos.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy