public static final class Struct.StructuredValue.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder> implements Struct.StructuredValueOrBuilder
`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 tensorflow.StructuredValuegetAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Struct.StructuredValue build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Struct.StructuredValue buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Struct.StructuredValue.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder mergeFrom(Struct.StructuredValue other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public Struct.StructuredValue.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Struct.StructuredValue.Builder>java.io.IOExceptionpublic Struct.StructuredValue.KindCase getKindCase()
getKindCase in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder clearKind()
public boolean hasNoneValue()
Represents None.
.tensorflow.NoneValue none_value = 1;hasNoneValue in interface Struct.StructuredValueOrBuilderpublic Struct.NoneValue getNoneValue()
Represents None.
.tensorflow.NoneValue none_value = 1;getNoneValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setNoneValue(Struct.NoneValue value)
Represents None.
.tensorflow.NoneValue none_value = 1;public Struct.StructuredValue.Builder setNoneValue(Struct.NoneValue.Builder builderForValue)
Represents None.
.tensorflow.NoneValue none_value = 1;public Struct.StructuredValue.Builder mergeNoneValue(Struct.NoneValue value)
Represents None.
.tensorflow.NoneValue none_value = 1;public Struct.StructuredValue.Builder clearNoneValue()
Represents None.
.tensorflow.NoneValue none_value = 1;public Struct.NoneValue.Builder getNoneValueBuilder()
Represents None.
.tensorflow.NoneValue none_value = 1;public Struct.NoneValueOrBuilder getNoneValueOrBuilder()
Represents None.
.tensorflow.NoneValue none_value = 1;getNoneValueOrBuilder in interface Struct.StructuredValueOrBuilderpublic double getFloat64Value()
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;getFloat64Value in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setFloat64Value(double value)
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;value - The float64Value to set.public Struct.StructuredValue.Builder clearFloat64Value()
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;public long getInt64Value()
Represents a signed integer value, limited to 64 bits. Larger values from Python's arbitrary-precision integers are unsupported.
sint64 int64_value = 12;getInt64Value in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setInt64Value(long value)
Represents a signed integer value, limited to 64 bits. Larger values from Python's arbitrary-precision integers are unsupported.
sint64 int64_value = 12;value - The int64Value to set.public Struct.StructuredValue.Builder clearInt64Value()
Represents a signed integer value, limited to 64 bits. Larger values from Python's arbitrary-precision integers are unsupported.
sint64 int64_value = 12;public 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;getStringValue in interface Struct.StructuredValueOrBuilderpublic com.google.protobuf.ByteString getStringValueBytes()
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;getStringValueBytes in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setStringValue(java.lang.String value)
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;value - The stringValue to set.public Struct.StructuredValue.Builder clearStringValue()
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 Struct.StructuredValue.Builder setStringValueBytes(com.google.protobuf.ByteString value)
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;value - The bytes for stringValue to set.public boolean getBoolValue()
Represents a boolean value.
bool bool_value = 14;getBoolValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setBoolValue(boolean value)
Represents a boolean value.
bool bool_value = 14;value - The boolValue to set.public Struct.StructuredValue.Builder clearBoolValue()
Represents a boolean value.
bool bool_value = 14;public boolean hasTensorShapeValue()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;hasTensorShapeValue in interface Struct.StructuredValueOrBuilderpublic TensorShapeProto getTensorShapeValue()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;getTensorShapeValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setTensorShapeValue(TensorShapeProto value)
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;public Struct.StructuredValue.Builder setTensorShapeValue(TensorShapeProto.Builder builderForValue)
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;public Struct.StructuredValue.Builder mergeTensorShapeValue(TensorShapeProto value)
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;public Struct.StructuredValue.Builder clearTensorShapeValue()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;public TensorShapeProto.Builder getTensorShapeValueBuilder()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;public TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;getTensorShapeValueOrBuilder in interface Struct.StructuredValueOrBuilderpublic int getTensorDtypeValueValue()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;getTensorDtypeValueValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setTensorDtypeValueValue(int value)
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;value - The enum numeric value on the wire for tensorDtypeValue to set.public DataType getTensorDtypeValue()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;getTensorDtypeValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setTensorDtypeValue(DataType value)
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;value - The tensorDtypeValue to set.public Struct.StructuredValue.Builder clearTensorDtypeValue()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;public boolean hasTensorSpecValue()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;hasTensorSpecValue in interface Struct.StructuredValueOrBuilderpublic Struct.TensorSpecProto getTensorSpecValue()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;getTensorSpecValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setTensorSpecValue(Struct.TensorSpecProto value)
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;public Struct.StructuredValue.Builder setTensorSpecValue(Struct.TensorSpecProto.Builder builderForValue)
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;public Struct.StructuredValue.Builder mergeTensorSpecValue(Struct.TensorSpecProto value)
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;public Struct.StructuredValue.Builder clearTensorSpecValue()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;public Struct.TensorSpecProto.Builder getTensorSpecValueBuilder()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;public Struct.TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;getTensorSpecValueOrBuilder in interface Struct.StructuredValueOrBuilderpublic boolean hasTypeSpecValue()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;hasTypeSpecValue in interface Struct.StructuredValueOrBuilderpublic Struct.TypeSpecProto getTypeSpecValue()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;getTypeSpecValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setTypeSpecValue(Struct.TypeSpecProto value)
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;public Struct.StructuredValue.Builder setTypeSpecValue(Struct.TypeSpecProto.Builder builderForValue)
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;public Struct.StructuredValue.Builder mergeTypeSpecValue(Struct.TypeSpecProto value)
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;public Struct.StructuredValue.Builder clearTypeSpecValue()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;public Struct.TypeSpecProto.Builder getTypeSpecValueBuilder()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;public Struct.TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;getTypeSpecValueOrBuilder in interface Struct.StructuredValueOrBuilderpublic boolean hasListValue()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;hasListValue in interface Struct.StructuredValueOrBuilderpublic Struct.ListValue getListValue()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;getListValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setListValue(Struct.ListValue value)
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;public Struct.StructuredValue.Builder setListValue(Struct.ListValue.Builder builderForValue)
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;public Struct.StructuredValue.Builder mergeListValue(Struct.ListValue value)
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;public Struct.StructuredValue.Builder clearListValue()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;public Struct.ListValue.Builder getListValueBuilder()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;public Struct.ListValueOrBuilder getListValueOrBuilder()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;getListValueOrBuilder in interface Struct.StructuredValueOrBuilderpublic boolean hasTupleValue()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;hasTupleValue in interface Struct.StructuredValueOrBuilderpublic Struct.TupleValue getTupleValue()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;getTupleValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setTupleValue(Struct.TupleValue value)
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;public Struct.StructuredValue.Builder setTupleValue(Struct.TupleValue.Builder builderForValue)
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;public Struct.StructuredValue.Builder mergeTupleValue(Struct.TupleValue value)
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;public Struct.StructuredValue.Builder clearTupleValue()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;public Struct.TupleValue.Builder getTupleValueBuilder()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;public Struct.TupleValueOrBuilder getTupleValueOrBuilder()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;getTupleValueOrBuilder in interface Struct.StructuredValueOrBuilderpublic boolean hasDictValue()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;hasDictValue in interface Struct.StructuredValueOrBuilderpublic Struct.DictValue getDictValue()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;getDictValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setDictValue(Struct.DictValue value)
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;public Struct.StructuredValue.Builder setDictValue(Struct.DictValue.Builder builderForValue)
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;public Struct.StructuredValue.Builder mergeDictValue(Struct.DictValue value)
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;public Struct.StructuredValue.Builder clearDictValue()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;public Struct.DictValue.Builder getDictValueBuilder()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;public Struct.DictValueOrBuilder getDictValueOrBuilder()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;getDictValueOrBuilder in interface Struct.StructuredValueOrBuilderpublic boolean hasNamedTupleValue()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;hasNamedTupleValue in interface Struct.StructuredValueOrBuilderpublic Struct.NamedTupleValue getNamedTupleValue()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;getNamedTupleValue in interface Struct.StructuredValueOrBuilderpublic Struct.StructuredValue.Builder setNamedTupleValue(Struct.NamedTupleValue value)
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;public Struct.StructuredValue.Builder setNamedTupleValue(Struct.NamedTupleValue.Builder builderForValue)
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;public Struct.StructuredValue.Builder mergeNamedTupleValue(Struct.NamedTupleValue value)
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;public Struct.StructuredValue.Builder clearNamedTupleValue()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;public Struct.NamedTupleValue.Builder getNamedTupleValueBuilder()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;public Struct.NamedTupleValueOrBuilder getNamedTupleValueOrBuilder()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;getNamedTupleValueOrBuilder in interface Struct.StructuredValueOrBuilderpublic final Struct.StructuredValue.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>public final Struct.StructuredValue.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>