Class Tensor.Builder (3.40.0)

public static final class Tensor.Builder extends GeneratedMessageV3.Builder<Tensor.Builder> implements TensorOrBuilder

A tensor value type.

Protobuf type google.cloud.aiplatform.v1beta1.Tensor

Implements

TensorOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllBoolVal(Iterable<? extends Boolean> values)

public Tensor.Builder addAllBoolVal(Iterable<? extends Boolean> values)

Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order.

BOOL

repeated bool bool_val = 3;

Parameter
NameDescription
valuesIterable<? extends java.lang.Boolean>

The boolVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllBytesVal(Iterable<? extends ByteString> values)

public Tensor.Builder addAllBytesVal(Iterable<? extends ByteString> values)
STRING

repeated bytes bytes_val = 15;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.ByteString>

The bytesVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllDoubleVal(Iterable<? extends Double> values)

public Tensor.Builder addAllDoubleVal(Iterable<? extends Double> values)
DOUBLE

repeated double double_val = 6;

Parameter
NameDescription
valuesIterable<? extends java.lang.Double>

The doubleVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllFloatVal(Iterable<? extends Float> values)

public Tensor.Builder addAllFloatVal(Iterable<? extends Float> values)
FLOAT

repeated float float_val = 5;

Parameter
NameDescription
valuesIterable<? extends java.lang.Float>

The floatVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllInt64Val(Iterable<? extends Long> values)

public Tensor.Builder addAllInt64Val(Iterable<? extends Long> values)
INT64

repeated int64 int64_val = 8;

Parameter
NameDescription
valuesIterable<? extends java.lang.Long>

The int64Val to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllIntVal(Iterable<? extends Integer> values)

public Tensor.Builder addAllIntVal(Iterable<? extends Integer> values)
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Parameter
NameDescription
valuesIterable<? extends java.lang.Integer>

The intVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllListVal(Iterable<? extends Tensor> values)

public Tensor.Builder addAllListVal(Iterable<? extends Tensor> values)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.aiplatform.v1beta1.Tensor>
Returns
TypeDescription
Tensor.Builder

addAllShape(Iterable<? extends Long> values)

public Tensor.Builder addAllShape(Iterable<? extends Long> values)

Shape of the tensor.

repeated int64 shape = 2;

Parameter
NameDescription
valuesIterable<? extends java.lang.Long>

The shape to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllStringVal(Iterable<String> values)

public Tensor.Builder addAllStringVal(Iterable<String> values)
STRING

repeated string string_val = 14;

Parameter
NameDescription
valuesIterable<String>

The stringVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllUint64Val(Iterable<? extends Long> values)

public Tensor.Builder addAllUint64Val(Iterable<? extends Long> values)
UINT64

repeated uint64 uint64_val = 10;

Parameter
NameDescription
valuesIterable<? extends java.lang.Long>

The uint64Val to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addAllUintVal(Iterable<? extends Integer> values)

public Tensor.Builder addAllUintVal(Iterable<? extends Integer> values)
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Parameter
NameDescription
valuesIterable<? extends java.lang.Integer>

The uintVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addBoolVal(boolean value)

public Tensor.Builder addBoolVal(boolean value)

Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order.

BOOL

repeated bool bool_val = 3;

Parameter
NameDescription
valueboolean

The boolVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addBytesVal(ByteString value)

public Tensor.Builder addBytesVal(ByteString value)
STRING

repeated bytes bytes_val = 15;

Parameter
NameDescription
valueByteString

The bytesVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addDoubleVal(double value)

public Tensor.Builder addDoubleVal(double value)
DOUBLE

repeated double double_val = 6;

Parameter
NameDescription
valuedouble

The doubleVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addFloatVal(float value)

public Tensor.Builder addFloatVal(float value)
FLOAT

repeated float float_val = 5;

Parameter
NameDescription
valuefloat

The floatVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addInt64Val(long value)

public Tensor.Builder addInt64Val(long value)
INT64

repeated int64 int64_val = 8;

Parameter
NameDescription
valuelong

The int64Val to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addIntVal(int value)

public Tensor.Builder addIntVal(int value)
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Parameter
NameDescription
valueint

The intVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addListVal(Tensor value)

public Tensor.Builder addListVal(Tensor value)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameter
NameDescription
valueTensor
Returns
TypeDescription
Tensor.Builder

addListVal(Tensor.Builder builderForValue)

public Tensor.Builder addListVal(Tensor.Builder builderForValue)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameter
NameDescription
builderForValueTensor.Builder
Returns
TypeDescription
Tensor.Builder

addListVal(int index, Tensor value)

public Tensor.Builder addListVal(int index, Tensor value)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameters
NameDescription
indexint
valueTensor
Returns
TypeDescription
Tensor.Builder

addListVal(int index, Tensor.Builder builderForValue)

public Tensor.Builder addListVal(int index, Tensor.Builder builderForValue)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameters
NameDescription
indexint
builderForValueTensor.Builder
Returns
TypeDescription
Tensor.Builder

addListValBuilder()

public Tensor.Builder addListValBuilder()

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Returns
TypeDescription
Tensor.Builder

addListValBuilder(int index)

public Tensor.Builder addListValBuilder(int index)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Tensor.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Tensor.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Tensor.Builder
Overrides

addShape(long value)

public Tensor.Builder addShape(long value)

Shape of the tensor.

repeated int64 shape = 2;

Parameter
NameDescription
valuelong

The shape to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addStringVal(String value)

public Tensor.Builder addStringVal(String value)
STRING

repeated string string_val = 14;

Parameter
NameDescription
valueString

The stringVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addStringValBytes(ByteString value)

public Tensor.Builder addStringValBytes(ByteString value)
STRING

repeated string string_val = 14;

Parameter
NameDescription
valueByteString

The bytes of the stringVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addUint64Val(long value)

public Tensor.Builder addUint64Val(long value)
UINT64

repeated uint64 uint64_val = 10;

Parameter
NameDescription
valuelong

The uint64Val to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

addUintVal(int value)

public Tensor.Builder addUintVal(int value)
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Parameter
NameDescription
valueint

The uintVal to add.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

build()

public Tensor build()
Returns
TypeDescription
Tensor

buildPartial()

public Tensor buildPartial()
Returns
TypeDescription
Tensor

clear()

public Tensor.Builder clear()
Returns
TypeDescription
Tensor.Builder
Overrides

clearBoolVal()

public Tensor.Builder clearBoolVal()

Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order.

BOOL

repeated bool bool_val = 3;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearBytesVal()

public Tensor.Builder clearBytesVal()
STRING

repeated bytes bytes_val = 15;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearDoubleVal()

public Tensor.Builder clearDoubleVal()
DOUBLE

repeated double double_val = 6;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearDtype()

public Tensor.Builder clearDtype()

The data type of tensor.

.google.cloud.aiplatform.v1beta1.Tensor.DataType dtype = 1;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Tensor.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Tensor.Builder
Overrides

clearFloatVal()

public Tensor.Builder clearFloatVal()
FLOAT

repeated float float_val = 5;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearInt64Val()

public Tensor.Builder clearInt64Val()
INT64

repeated int64 int64_val = 8;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearIntVal()

public Tensor.Builder clearIntVal()
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearListVal()

public Tensor.Builder clearListVal()

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Returns
TypeDescription
Tensor.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Tensor.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Tensor.Builder
Overrides

clearShape()

public Tensor.Builder clearShape()

Shape of the tensor.

repeated int64 shape = 2;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearStringVal()

public Tensor.Builder clearStringVal()
STRING

repeated string string_val = 14;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearStructVal()

public Tensor.Builder clearStructVal()
Returns
TypeDescription
Tensor.Builder

clearTensorVal()

public Tensor.Builder clearTensorVal()

Serialized raw tensor content.

bytes tensor_val = 13;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearUint64Val()

public Tensor.Builder clearUint64Val()
UINT64

repeated uint64 uint64_val = 10;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clearUintVal()

public Tensor.Builder clearUintVal()
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

clone()

public Tensor.Builder clone()
Returns
TypeDescription
Tensor.Builder
Overrides

containsStructVal(String key)

public boolean containsStructVal(String key)

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getBoolVal(int index)

public boolean getBoolVal(int index)

Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order.

BOOL

repeated bool bool_val = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
boolean

The boolVal at the given index.

getBoolValCount()

public int getBoolValCount()

Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order.

BOOL

repeated bool bool_val = 3;

Returns
TypeDescription
int

The count of boolVal.

getBoolValList()

public List<Boolean> getBoolValList()

Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order.

BOOL

repeated bool bool_val = 3;

Returns
TypeDescription
List<Boolean>

A list containing the boolVal.

getBytesVal(int index)

public ByteString getBytesVal(int index)
STRING

repeated bytes bytes_val = 15;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
ByteString

The bytesVal at the given index.

getBytesValCount()

public int getBytesValCount()
STRING

repeated bytes bytes_val = 15;

Returns
TypeDescription
int

The count of bytesVal.

getBytesValList()

public List<ByteString> getBytesValList()
STRING

repeated bytes bytes_val = 15;

Returns
TypeDescription
List<ByteString>

A list containing the bytesVal.

getDefaultInstanceForType()

public Tensor getDefaultInstanceForType()
Returns
TypeDescription
Tensor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDoubleVal(int index)

public double getDoubleVal(int index)
DOUBLE

repeated double double_val = 6;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
double

The doubleVal at the given index.

getDoubleValCount()

public int getDoubleValCount()
DOUBLE

repeated double double_val = 6;

Returns
TypeDescription
int

The count of doubleVal.

getDoubleValList()

public List<Double> getDoubleValList()
DOUBLE

repeated double double_val = 6;

Returns
TypeDescription
List<Double>

A list containing the doubleVal.

getDtype()

public Tensor.DataType getDtype()

The data type of tensor.

.google.cloud.aiplatform.v1beta1.Tensor.DataType dtype = 1;

Returns
TypeDescription
Tensor.DataType

The dtype.

getDtypeValue()

public int getDtypeValue()

The data type of tensor.

.google.cloud.aiplatform.v1beta1.Tensor.DataType dtype = 1;

Returns
TypeDescription
int

The enum numeric value on the wire for dtype.

getFloatVal(int index)

public float getFloatVal(int index)
FLOAT

repeated float float_val = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
float

The floatVal at the given index.

getFloatValCount()

public int getFloatValCount()
FLOAT

repeated float float_val = 5;

Returns
TypeDescription
int

The count of floatVal.

getFloatValList()

public List<Float> getFloatValList()
FLOAT

repeated float float_val = 5;

Returns
TypeDescription
List<Float>

A list containing the floatVal.

getInt64Val(int index)

public long getInt64Val(int index)
INT64

repeated int64 int64_val = 8;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
long

The int64Val at the given index.

getInt64ValCount()

public int getInt64ValCount()
INT64

repeated int64 int64_val = 8;

Returns
TypeDescription
int

The count of int64Val.

getInt64ValList()

public List<Long> getInt64ValList()
INT64

repeated int64 int64_val = 8;

Returns
TypeDescription
List<Long>

A list containing the int64Val.

getIntVal(int index)

public int getIntVal(int index)
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
int

The intVal at the given index.

getIntValCount()

public int getIntValCount()
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Returns
TypeDescription
int

The count of intVal.

getIntValList()

public List<Integer> getIntValList()
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Returns
TypeDescription
List<Integer>

A list containing the intVal.

getListVal(int index)

public Tensor getListVal(int index)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Tensor

getListValBuilder(int index)

public Tensor.Builder getListValBuilder(int index)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Tensor.Builder

getListValBuilderList()

public List<Tensor.Builder> getListValBuilderList()

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Returns
TypeDescription
List<Builder>

getListValCount()

public int getListValCount()

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Returns
TypeDescription
int

getListValList()

public List<Tensor> getListValList()

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Returns
TypeDescription
List<Tensor>

getListValOrBuilder(int index)

public TensorOrBuilder getListValOrBuilder(int index)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
TensorOrBuilder

getListValOrBuilderList()

public List<? extends TensorOrBuilder> getListValOrBuilderList()

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Returns
TypeDescription
List<? extends com.google.cloud.aiplatform.v1beta1.TensorOrBuilder>

getMutableStructVal() (deprecated)

public Map<String,Tensor> getMutableStructVal()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Tensor>

getShape(int index)

public long getShape(int index)

Shape of the tensor.

repeated int64 shape = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
long

The shape at the given index.

getShapeCount()

public int getShapeCount()

Shape of the tensor.

repeated int64 shape = 2;

Returns
TypeDescription
int

The count of shape.

getShapeList()

public List<Long> getShapeList()

Shape of the tensor.

repeated int64 shape = 2;

Returns
TypeDescription
List<Long>

A list containing the shape.

getStringVal(int index)

public String getStringVal(int index)
STRING

repeated string string_val = 14;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The stringVal at the given index.

getStringValBytes(int index)

public ByteString getStringValBytes(int index)
STRING

repeated string string_val = 14;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the stringVal at the given index.

getStringValCount()

public int getStringValCount()
STRING

repeated string string_val = 14;

Returns
TypeDescription
int

The count of stringVal.

getStringValList()

public ProtocolStringList getStringValList()
STRING

repeated string string_val = 14;

Returns
TypeDescription
ProtocolStringList

A list containing the stringVal.

getStructVal() (deprecated)

public Map<String,Tensor> getStructVal()

Use #getStructValMap() instead.

Returns
TypeDescription
Map<String,Tensor>

getStructValCount()

public int getStructValCount()

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Returns
TypeDescription
int

getStructValMap()

public Map<String,Tensor> getStructValMap()

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Returns
TypeDescription
Map<String,Tensor>

getStructValOrDefault(String key, Tensor defaultValue)

public Tensor getStructValOrDefault(String key, Tensor defaultValue)

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Parameters
NameDescription
keyString
defaultValueTensor
Returns
TypeDescription
Tensor

getStructValOrThrow(String key)

public Tensor getStructValOrThrow(String key)

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
Tensor

getTensorVal()

public ByteString getTensorVal()

Serialized raw tensor content.

bytes tensor_val = 13;

Returns
TypeDescription
ByteString

The tensorVal.

getUint64Val(int index)

public long getUint64Val(int index)
UINT64

repeated uint64 uint64_val = 10;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
long

The uint64Val at the given index.

getUint64ValCount()

public int getUint64ValCount()
UINT64

repeated uint64 uint64_val = 10;

Returns
TypeDescription
int

The count of uint64Val.

getUint64ValList()

public List<Long> getUint64ValList()
UINT64

repeated uint64 uint64_val = 10;

Returns
TypeDescription
List<Long>

A list containing the uint64Val.

getUintVal(int index)

public int getUintVal(int index)
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
int

The uintVal at the given index.

getUintValCount()

public int getUintValCount()
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Returns
TypeDescription
int

The count of uintVal.

getUintValList()

public List<Integer> getUintValList()
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Returns
TypeDescription
List<Integer>

A list containing the uintVal.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Tensor other)

public Tensor.Builder mergeFrom(Tensor other)
Parameter
NameDescription
otherTensor
Returns
TypeDescription
Tensor.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Tensor.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Tensor.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Tensor.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Tensor.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Tensor.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Tensor.Builder
Overrides

putAllStructVal(Map<String,Tensor> values)

public Tensor.Builder putAllStructVal(Map<String,Tensor> values)

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Parameter
NameDescription
valuesMap<String,Tensor>
Returns
TypeDescription
Tensor.Builder

putStructVal(String key, Tensor value)

public Tensor.Builder putStructVal(String key, Tensor value)

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Parameters
NameDescription
keyString
valueTensor
Returns
TypeDescription
Tensor.Builder

putStructValBuilderIfAbsent(String key)

public Tensor.Builder putStructValBuilderIfAbsent(String key)

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
Tensor.Builder

removeListVal(int index)

public Tensor.Builder removeListVal(int index)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Tensor.Builder

removeStructVal(String key)

public Tensor.Builder removeStructVal(String key)

A map of string to tensor.

map<string, .google.cloud.aiplatform.v1beta1.Tensor> struct_val = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
Tensor.Builder

setBoolVal(int index, boolean value)

public Tensor.Builder setBoolVal(int index, boolean value)

Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order.

BOOL

repeated bool bool_val = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueboolean

The boolVal to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setBytesVal(int index, ByteString value)

public Tensor.Builder setBytesVal(int index, ByteString value)
STRING

repeated bytes bytes_val = 15;

Parameters
NameDescription
indexint

The index to set the value at.

valueByteString

The bytesVal to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setDoubleVal(int index, double value)

public Tensor.Builder setDoubleVal(int index, double value)
DOUBLE

repeated double double_val = 6;

Parameters
NameDescription
indexint

The index to set the value at.

valuedouble

The doubleVal to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setDtype(Tensor.DataType value)

public Tensor.Builder setDtype(Tensor.DataType value)

The data type of tensor.

.google.cloud.aiplatform.v1beta1.Tensor.DataType dtype = 1;

Parameter
NameDescription
valueTensor.DataType

The dtype to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setDtypeValue(int value)

public Tensor.Builder setDtypeValue(int value)

The data type of tensor.

.google.cloud.aiplatform.v1beta1.Tensor.DataType dtype = 1;

Parameter
NameDescription
valueint

The enum numeric value on the wire for dtype to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Tensor.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Tensor.Builder
Overrides

setFloatVal(int index, float value)

public Tensor.Builder setFloatVal(int index, float value)
FLOAT

repeated float float_val = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valuefloat

The floatVal to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setInt64Val(int index, long value)

public Tensor.Builder setInt64Val(int index, long value)
INT64

repeated int64 int64_val = 8;

Parameters
NameDescription
indexint

The index to set the value at.

valuelong

The int64Val to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setIntVal(int index, int value)

public Tensor.Builder setIntVal(int index, int value)
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

The intVal to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setListVal(int index, Tensor value)

public Tensor.Builder setListVal(int index, Tensor value)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameters
NameDescription
indexint
valueTensor
Returns
TypeDescription
Tensor.Builder

setListVal(int index, Tensor.Builder builderForValue)

public Tensor.Builder setListVal(int index, Tensor.Builder builderForValue)

A list of tensor values.

repeated .google.cloud.aiplatform.v1beta1.Tensor list_val = 11;

Parameters
NameDescription
indexint
builderForValueTensor.Builder
Returns
TypeDescription
Tensor.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Tensor.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Tensor.Builder
Overrides

setShape(int index, long value)

public Tensor.Builder setShape(int index, long value)

Shape of the tensor.

repeated int64 shape = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valuelong

The shape to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setStringVal(int index, String value)

public Tensor.Builder setStringVal(int index, String value)
STRING

repeated string string_val = 14;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The stringVal to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setTensorVal(ByteString value)

public Tensor.Builder setTensorVal(ByteString value)

Serialized raw tensor content.

bytes tensor_val = 13;

Parameter
NameDescription
valueByteString

The tensorVal to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setUint64Val(int index, long value)

public Tensor.Builder setUint64Val(int index, long value)
UINT64

repeated uint64 uint64_val = 10;

Parameters
NameDescription
indexint

The index to set the value at.

valuelong

The uint64Val to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setUintVal(int index, int value)

public Tensor.Builder setUintVal(int index, int value)
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

The uintVal to set.

Returns
TypeDescription
Tensor.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Tensor.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Tensor.Builder
Overrides