Class Tensor.Builder (1.0.0)

publicstaticfinalclass Tensor.BuilderextendsGeneratedMessageV3.Builder<Tensor.Builder>implementsTensorOrBuilder

A tensor value type.

Protobuf type google.cloud.vertexai.v1.Tensor

Implements

TensorOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllBoolVal(Iterable<? extends Boolean> values)

publicTensor.BuilderaddAllBoolVal(Iterable<?extendsBoolean>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
Name Description
values Iterable<? extends java.lang.Boolean>

The boolVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllBytesVal(Iterable<? extends ByteString> values)

publicTensor.BuilderaddAllBytesVal(Iterable<?extendsByteString>values)
STRING

repeated bytes bytes_val = 15;

Parameter
Name Description
values Iterable<? extends com.google.protobuf.ByteString>

The bytesVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllDoubleVal(Iterable<? extends Double> values)

publicTensor.BuilderaddAllDoubleVal(Iterable<?extendsDouble>values)
DOUBLE

repeated double double_val = 6;

Parameter
Name Description
values Iterable<? extends java.lang.Double>

The doubleVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllFloatVal(Iterable<? extends Float> values)

publicTensor.BuilderaddAllFloatVal(Iterable<?extendsFloat>values)
FLOAT

repeated float float_val = 5;

Parameter
Name Description
values Iterable<? extends java.lang.Float>

The floatVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllInt64Val(Iterable<? extends Long> values)

publicTensor.BuilderaddAllInt64Val(Iterable<?extendsLong>values)
INT64

repeated int64 int64_val = 8;

Parameter
Name Description
values Iterable<? extends java.lang.Long>

The int64Val to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllIntVal(Iterable<? extends Integer> values)

publicTensor.BuilderaddAllIntVal(Iterable<?extendsInteger>values)
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The intVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllListVal(Iterable<? extends Tensor> values)

publicTensor.BuilderaddAllListVal(Iterable<?extendsTensor>values)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameter
Name Description
values Iterable<? extends com.google.cloud.vertexai.api.Tensor>
Returns
Type Description
Tensor.Builder

addAllShape(Iterable<? extends Long> values)

publicTensor.BuilderaddAllShape(Iterable<?extendsLong>values)

Shape of the tensor.

repeated int64 shape = 2;

Parameter
Name Description
values Iterable<? extends java.lang.Long>

The shape to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllStringVal(Iterable<String> values)

publicTensor.BuilderaddAllStringVal(Iterable<String>values)
STRING

repeated string string_val = 14;

Parameter
Name Description
values Iterable<String>

The stringVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllUint64Val(Iterable<? extends Long> values)

publicTensor.BuilderaddAllUint64Val(Iterable<?extendsLong>values)
UINT64

repeated uint64 uint64_val = 10;

Parameter
Name Description
values Iterable<? extends java.lang.Long>

The uint64Val to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addAllUintVal(Iterable<? extends Integer> values)

publicTensor.BuilderaddAllUintVal(Iterable<?extendsInteger>values)
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The uintVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addBoolVal(boolean value)

publicTensor.BuilderaddBoolVal(booleanvalue)

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
Name Description
value boolean

The boolVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addBytesVal(ByteString value)

publicTensor.BuilderaddBytesVal(ByteStringvalue)
STRING

repeated bytes bytes_val = 15;

Parameter
Name Description
value ByteString

The bytesVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addDoubleVal(double value)

publicTensor.BuilderaddDoubleVal(doublevalue)
DOUBLE

repeated double double_val = 6;

Parameter
Name Description
value double

The doubleVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addFloatVal(float value)

publicTensor.BuilderaddFloatVal(floatvalue)
FLOAT

repeated float float_val = 5;

Parameter
Name Description
value float

The floatVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addInt64Val(long value)

publicTensor.BuilderaddInt64Val(longvalue)
INT64

repeated int64 int64_val = 8;

Parameter
Name Description
value long

The int64Val to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addIntVal(int value)

publicTensor.BuilderaddIntVal(intvalue)
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Parameter
Name Description
value int

The intVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addListVal(Tensor value)

publicTensor.BuilderaddListVal(Tensorvalue)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameter
Name Description
value Tensor
Returns
Type Description
Tensor.Builder

addListVal(Tensor.Builder builderForValue)

publicTensor.BuilderaddListVal(Tensor.BuilderbuilderForValue)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameter
Name Description
builderForValue Tensor.Builder
Returns
Type Description
Tensor.Builder

addListVal(int index, Tensor value)

publicTensor.BuilderaddListVal(intindex,Tensorvalue)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameters
Name Description
index int
value Tensor
Returns
Type Description
Tensor.Builder

addListVal(int index, Tensor.Builder builderForValue)

publicTensor.BuilderaddListVal(intindex,Tensor.BuilderbuilderForValue)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameters
Name Description
index int
builderForValue Tensor.Builder
Returns
Type Description
Tensor.Builder

addListValBuilder()

publicTensor.BuilderaddListValBuilder()

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Returns
Type Description
Tensor.Builder

addListValBuilder(int index)

publicTensor.BuilderaddListValBuilder(intindex)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameter
Name Description
index int
Returns
Type Description
Tensor.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicTensor.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Tensor.Builder
Overrides

addShape(long value)

publicTensor.BuilderaddShape(longvalue)

Shape of the tensor.

repeated int64 shape = 2;

Parameter
Name Description
value long

The shape to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addStringVal(String value)

publicTensor.BuilderaddStringVal(Stringvalue)
STRING

repeated string string_val = 14;

Parameter
Name Description
value String

The stringVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addStringValBytes(ByteString value)

publicTensor.BuilderaddStringValBytes(ByteStringvalue)
STRING

repeated string string_val = 14;

Parameter
Name Description
value ByteString

The bytes of the stringVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addUint64Val(long value)

publicTensor.BuilderaddUint64Val(longvalue)
UINT64

repeated uint64 uint64_val = 10;

Parameter
Name Description
value long

The uint64Val to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

addUintVal(int value)

publicTensor.BuilderaddUintVal(intvalue)
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Parameter
Name Description
value int

The uintVal to add.

Returns
Type Description
Tensor.Builder

This builder for chaining.

build()

publicTensorbuild()
Returns
Type Description
Tensor

buildPartial()

publicTensorbuildPartial()
Returns
Type Description
Tensor

clear()

publicTensor.Builderclear()
Returns
Type Description
Tensor.Builder
Overrides

clearBoolVal()

publicTensor.BuilderclearBoolVal()

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
Type Description
Tensor.Builder

This builder for chaining.

clearBytesVal()

publicTensor.BuilderclearBytesVal()
STRING

repeated bytes bytes_val = 15;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearDoubleVal()

publicTensor.BuilderclearDoubleVal()
DOUBLE

repeated double double_val = 6;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearDtype()

publicTensor.BuilderclearDtype()

The data type of tensor.

.google.cloud.vertexai.v1.Tensor.DataType dtype = 1;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicTensor.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Tensor.Builder
Overrides

clearFloatVal()

publicTensor.BuilderclearFloatVal()
FLOAT

repeated float float_val = 5;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearInt64Val()

publicTensor.BuilderclearInt64Val()
INT64

repeated int64 int64_val = 8;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearIntVal()

publicTensor.BuilderclearIntVal()
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearListVal()

publicTensor.BuilderclearListVal()

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Returns
Type Description
Tensor.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicTensor.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Tensor.Builder
Overrides

clearShape()

publicTensor.BuilderclearShape()

Shape of the tensor.

repeated int64 shape = 2;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearStringVal()

publicTensor.BuilderclearStringVal()
STRING

repeated string string_val = 14;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearStructVal()

publicTensor.BuilderclearStructVal()
Returns
Type Description
Tensor.Builder

clearTensorVal()

publicTensor.BuilderclearTensorVal()

Serialized raw tensor content.

bytes tensor_val = 13;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearUint64Val()

publicTensor.BuilderclearUint64Val()
UINT64

repeated uint64 uint64_val = 10;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clearUintVal()

publicTensor.BuilderclearUintVal()
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Returns
Type Description
Tensor.Builder

This builder for chaining.

clone()

publicTensor.Builderclone()
Returns
Type Description
Tensor.Builder
Overrides

containsStructVal(String key)

publicbooleancontainsStructVal(Stringkey)

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Parameter
Name Description
key String
Returns
Type Description
boolean

getBoolVal(int index)

publicbooleangetBoolVal(intindex)

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
Name Description
index int

The index of the element to return.

Returns
Type Description
boolean

The boolVal at the given index.

getBoolValCount()

publicintgetBoolValCount()

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
Type Description
int

The count of boolVal.

getBoolValList()

publicList<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
Type Description
List<Boolean>

A list containing the boolVal.

getBytesVal(int index)

publicByteStringgetBytesVal(intindex)
STRING

repeated bytes bytes_val = 15;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
ByteString

The bytesVal at the given index.

getBytesValCount()

publicintgetBytesValCount()
STRING

repeated bytes bytes_val = 15;

Returns
Type Description
int

The count of bytesVal.

getBytesValList()

publicList<ByteString>getBytesValList()
STRING

repeated bytes bytes_val = 15;

Returns
Type Description
List<ByteString>

A list containing the bytesVal.

getDefaultInstanceForType()

publicTensorgetDefaultInstanceForType()
Returns
Type Description
Tensor

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDoubleVal(int index)

publicdoublegetDoubleVal(intindex)
DOUBLE

repeated double double_val = 6;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
double

The doubleVal at the given index.

getDoubleValCount()

publicintgetDoubleValCount()
DOUBLE

repeated double double_val = 6;

Returns
Type Description
int

The count of doubleVal.

getDoubleValList()

publicList<Double>getDoubleValList()
DOUBLE

repeated double double_val = 6;

Returns
Type Description
List<Double>

A list containing the doubleVal.

getDtype()

publicTensor.DataTypegetDtype()

The data type of tensor.

.google.cloud.vertexai.v1.Tensor.DataType dtype = 1;

Returns
Type Description
Tensor.DataType

The dtype.

getDtypeValue()

publicintgetDtypeValue()

The data type of tensor.

.google.cloud.vertexai.v1.Tensor.DataType dtype = 1;

Returns
Type Description
int

The enum numeric value on the wire for dtype.

getFloatVal(int index)

publicfloatgetFloatVal(intindex)
FLOAT

repeated float float_val = 5;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
float

The floatVal at the given index.

getFloatValCount()

publicintgetFloatValCount()
FLOAT

repeated float float_val = 5;

Returns
Type Description
int

The count of floatVal.

getFloatValList()

publicList<Float>getFloatValList()
FLOAT

repeated float float_val = 5;

Returns
Type Description
List<Float>

A list containing the floatVal.

getInt64Val(int index)

publiclonggetInt64Val(intindex)
INT64

repeated int64 int64_val = 8;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
long

The int64Val at the given index.

getInt64ValCount()

publicintgetInt64ValCount()
INT64

repeated int64 int64_val = 8;

Returns
Type Description
int

The count of int64Val.

getInt64ValList()

publicList<Long>getInt64ValList()
INT64

repeated int64 int64_val = 8;

Returns
Type Description
List<Long>

A list containing the int64Val.

getIntVal(int index)

publicintgetIntVal(intindex)
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The intVal at the given index.

getIntValCount()

publicintgetIntValCount()
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Returns
Type Description
int

The count of intVal.

getIntValList()

publicList<Integer>getIntValList()
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Returns
Type Description
List<Integer>

A list containing the intVal.

getListVal(int index)

publicTensorgetListVal(intindex)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameter
Name Description
index int
Returns
Type Description
Tensor

getListValBuilder(int index)

publicTensor.BuildergetListValBuilder(intindex)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameter
Name Description
index int
Returns
Type Description
Tensor.Builder

getListValBuilderList()

publicList<Tensor.Builder>getListValBuilderList()

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Returns
Type Description
List<Builder>

getListValCount()

publicintgetListValCount()

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Returns
Type Description
int

getListValList()

publicList<Tensor>getListValList()

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Returns
Type Description
List<Tensor>

getListValOrBuilder(int index)

publicTensorOrBuildergetListValOrBuilder(intindex)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameter
Name Description
index int
Returns
Type Description
TensorOrBuilder

getListValOrBuilderList()

publicList<?extendsTensorOrBuilder>getListValOrBuilderList()

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Returns
Type Description
List<? extends com.google.cloud.vertexai.api.TensorOrBuilder>

getMutableStructVal() (deprecated)

publicMap<String,Tensor>getMutableStructVal()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Tensor>

getShape(int index)

publiclonggetShape(intindex)

Shape of the tensor.

repeated int64 shape = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
long

The shape at the given index.

getShapeCount()

publicintgetShapeCount()

Shape of the tensor.

repeated int64 shape = 2;

Returns
Type Description
int

The count of shape.

getShapeList()

publicList<Long>getShapeList()

Shape of the tensor.

repeated int64 shape = 2;

Returns
Type Description
List<Long>

A list containing the shape.

getStringVal(int index)

publicStringgetStringVal(intindex)
STRING

repeated string string_val = 14;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The stringVal at the given index.

getStringValBytes(int index)

publicByteStringgetStringValBytes(intindex)
STRING

repeated string string_val = 14;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the stringVal at the given index.

getStringValCount()

publicintgetStringValCount()
STRING

repeated string string_val = 14;

Returns
Type Description
int

The count of stringVal.

getStringValList()

publicProtocolStringListgetStringValList()
STRING

repeated string string_val = 14;

Returns
Type Description
ProtocolStringList

A list containing the stringVal.

getStructVal() (deprecated)

publicMap<String,Tensor>getStructVal()

Use #getStructValMap() instead.

Returns
Type Description
Map<String,Tensor>

getStructValCount()

publicintgetStructValCount()

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Returns
Type Description
int

getStructValMap()

publicMap<String,Tensor>getStructValMap()

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Returns
Type Description
Map<String,Tensor>

getStructValOrDefault(String key, Tensor defaultValue)

publicTensorgetStructValOrDefault(Stringkey,TensordefaultValue)

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Parameters
Name Description
key String
defaultValue Tensor
Returns
Type Description
Tensor

getStructValOrThrow(String key)

publicTensorgetStructValOrThrow(Stringkey)

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Parameter
Name Description
key String
Returns
Type Description
Tensor

getTensorVal()

publicByteStringgetTensorVal()

Serialized raw tensor content.

bytes tensor_val = 13;

Returns
Type Description
ByteString

The tensorVal.

getUint64Val(int index)

publiclonggetUint64Val(intindex)
UINT64

repeated uint64 uint64_val = 10;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
long

The uint64Val at the given index.

getUint64ValCount()

publicintgetUint64ValCount()
UINT64

repeated uint64 uint64_val = 10;

Returns
Type Description
int

The count of uint64Val.

getUint64ValList()

publicList<Long>getUint64ValList()
UINT64

repeated uint64 uint64_val = 10;

Returns
Type Description
List<Long>

A list containing the uint64Val.

getUintVal(int index)

publicintgetUintVal(intindex)
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The uintVal at the given index.

getUintValCount()

publicintgetUintValCount()
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Returns
Type Description
int

The count of uintVal.

getUintValList()

publicList<Integer>getUintValList()
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Returns
Type Description
List<Integer>

A list containing the uintVal.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Tensor other)

publicTensor.BuildermergeFrom(Tensorother)
Parameter
Name Description
other Tensor
Returns
Type Description
Tensor.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicTensor.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tensor.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicTensor.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Tensor.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalTensor.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Tensor.Builder
Overrides

putAllStructVal(Map<String,Tensor> values)

publicTensor.BuilderputAllStructVal(Map<String,Tensor>values)

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Parameter
Name Description
values Map<String,Tensor>
Returns
Type Description
Tensor.Builder

putStructVal(String key, Tensor value)

publicTensor.BuilderputStructVal(Stringkey,Tensorvalue)

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Parameters
Name Description
key String
value Tensor
Returns
Type Description
Tensor.Builder

putStructValBuilderIfAbsent(String key)

publicTensor.BuilderputStructValBuilderIfAbsent(Stringkey)

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Parameter
Name Description
key String
Returns
Type Description
Tensor.Builder

removeListVal(int index)

publicTensor.BuilderremoveListVal(intindex)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameter
Name Description
index int
Returns
Type Description
Tensor.Builder

removeStructVal(String key)

publicTensor.BuilderremoveStructVal(Stringkey)

A map of string to tensor.

map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12;

Parameter
Name Description
key String
Returns
Type Description
Tensor.Builder

setBoolVal(int index, boolean value)

publicTensor.BuildersetBoolVal(intindex,booleanvalue)

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
Name Description
index int

The index to set the value at.

value boolean

The boolVal to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setBytesVal(int index, ByteString value)

publicTensor.BuildersetBytesVal(intindex,ByteStringvalue)
STRING

repeated bytes bytes_val = 15;

Parameters
Name Description
index int

The index to set the value at.

value ByteString

The bytesVal to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setDoubleVal(int index, double value)

publicTensor.BuildersetDoubleVal(intindex,doublevalue)
DOUBLE

repeated double double_val = 6;

Parameters
Name Description
index int

The index to set the value at.

value double

The doubleVal to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setDtype(Tensor.DataType value)

publicTensor.BuildersetDtype(Tensor.DataTypevalue)

The data type of tensor.

.google.cloud.vertexai.v1.Tensor.DataType dtype = 1;

Parameter
Name Description
value Tensor.DataType

The dtype to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setDtypeValue(int value)

publicTensor.BuildersetDtypeValue(intvalue)

The data type of tensor.

.google.cloud.vertexai.v1.Tensor.DataType dtype = 1;

Parameter
Name Description
value int

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

Returns
Type Description
Tensor.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicTensor.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Tensor.Builder
Overrides

setFloatVal(int index, float value)

publicTensor.BuildersetFloatVal(intindex,floatvalue)
FLOAT

repeated float float_val = 5;

Parameters
Name Description
index int

The index to set the value at.

value float

The floatVal to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setInt64Val(int index, long value)

publicTensor.BuildersetInt64Val(intindex,longvalue)
INT64

repeated int64 int64_val = 8;

Parameters
Name Description
index int

The index to set the value at.

value long

The int64Val to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setIntVal(int index, int value)

publicTensor.BuildersetIntVal(intindex,intvalue)
INT_8 INT_16 INT_32

repeated int32 int_val = 7;

Parameters
Name Description
index int

The index to set the value at.

value int

The intVal to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setListVal(int index, Tensor value)

publicTensor.BuildersetListVal(intindex,Tensorvalue)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameters
Name Description
index int
value Tensor
Returns
Type Description
Tensor.Builder

setListVal(int index, Tensor.Builder builderForValue)

publicTensor.BuildersetListVal(intindex,Tensor.BuilderbuilderForValue)

A list of tensor values.

repeated .google.cloud.vertexai.v1.Tensor list_val = 11;

Parameters
Name Description
index int
builderForValue Tensor.Builder
Returns
Type Description
Tensor.Builder

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

publicTensor.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Tensor.Builder
Overrides

setShape(int index, long value)

publicTensor.BuildersetShape(intindex,longvalue)

Shape of the tensor.

repeated int64 shape = 2;

Parameters
Name Description
index int

The index to set the value at.

value long

The shape to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setStringVal(int index, String value)

publicTensor.BuildersetStringVal(intindex,Stringvalue)
STRING

repeated string string_val = 14;

Parameters
Name Description
index int

The index to set the value at.

value String

The stringVal to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setTensorVal(ByteString value)

publicTensor.BuildersetTensorVal(ByteStringvalue)

Serialized raw tensor content.

bytes tensor_val = 13;

Parameter
Name Description
value ByteString

The tensorVal to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setUint64Val(int index, long value)

publicTensor.BuildersetUint64Val(intindex,longvalue)
UINT64

repeated uint64 uint64_val = 10;

Parameters
Name Description
index int

The index to set the value at.

value long

The uint64Val to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setUintVal(int index, int value)

publicTensor.BuildersetUintVal(intindex,intvalue)
UINT8 UINT16 UINT32

repeated uint32 uint_val = 9;

Parameters
Name Description
index int

The index to set the value at.

value int

The uintVal to set.

Returns
Type Description
Tensor.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalTensor.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Tensor.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.