Class Part.Builder (0.6.0)

publicstaticfinalclass Part.BuilderextendsGeneratedMessageV3.Builder<Part.Builder>implementsPartOrBuilder

A datatype containing media that is part of a multi-part Content message.

A Part consists of data which has an associated datatype. A Part can only contain one of the accepted types in Part.data.

A Part must have a fixed IANA MIME type identifying the type and subtype of the media if inline_data or file_data field is filled with raw bytes.

Protobuf type google.cloud.vertexai.v1.Part

Implements

PartOrBuilder

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

publicPartbuild()
Returns
Type Description
Part

buildPartial()

publicPartbuildPartial()
Returns
Type Description
Part

clear()

publicPart.Builderclear()
Returns
Type Description
Part.Builder
Overrides

clearData()

publicPart.BuilderclearData()
Returns
Type Description
Part.Builder

clearField(Descriptors.FieldDescriptor field)

publicPart.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Part.Builder
Overrides

clearFileData()

publicPart.BuilderclearFileData()

Optional. URI based data.

.google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Part.Builder

clearFunctionCall()

publicPart.BuilderclearFunctionCall()

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

.google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Part.Builder

clearFunctionResponse()

publicPart.BuilderclearFunctionResponse()

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

.google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Part.Builder

clearInlineData()

publicPart.BuilderclearInlineData()

Optional. Inlined bytes data.

.google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Part.Builder

clearMetadata()

publicPart.BuilderclearMetadata()
Returns
Type Description
Part.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicPart.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Part.Builder
Overrides

clearText()

publicPart.BuilderclearText()

Optional. Text part (can be code).

string text = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Part.Builder

This builder for chaining.

clearVideoMetadata()

publicPart.BuilderclearVideoMetadata()

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

.google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Part.Builder

clone()

publicPart.Builderclone()
Returns
Type Description
Part.Builder
Overrides

getDataCase()

publicPart.DataCasegetDataCase()
Returns
Type Description
Part.DataCase

getDefaultInstanceForType()

publicPartgetDefaultInstanceForType()
Returns
Type Description
Part

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFileData()

publicFileDatagetFileData()

Optional. URI based data.

.google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FileData

The fileData.

getFileDataBuilder()

publicFileData.BuildergetFileDataBuilder()

Optional. URI based data.

.google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FileData.Builder

getFileDataOrBuilder()

publicFileDataOrBuildergetFileDataOrBuilder()

Optional. URI based data.

.google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FileDataOrBuilder

getFunctionCall()

publicFunctionCallgetFunctionCall()

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

.google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FunctionCall

The functionCall.

getFunctionCallBuilder()

publicFunctionCall.BuildergetFunctionCallBuilder()

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

.google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FunctionCall.Builder

getFunctionCallOrBuilder()

publicFunctionCallOrBuildergetFunctionCallOrBuilder()

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

.google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FunctionCallOrBuilder

getFunctionResponse()

publicFunctionResponsegetFunctionResponse()

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

.google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FunctionResponse

The functionResponse.

getFunctionResponseBuilder()

publicFunctionResponse.BuildergetFunctionResponseBuilder()

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

.google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FunctionResponse.Builder

getFunctionResponseOrBuilder()

publicFunctionResponseOrBuildergetFunctionResponseOrBuilder()

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

.google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FunctionResponseOrBuilder

getInlineData()

publicBlobgetInlineData()

Optional. Inlined bytes data.

.google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Blob

The inlineData.

getInlineDataBuilder()

publicBlob.BuildergetInlineDataBuilder()

Optional. Inlined bytes data.

.google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Blob.Builder

getInlineDataOrBuilder()

publicBlobOrBuildergetInlineDataOrBuilder()

Optional. Inlined bytes data.

.google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BlobOrBuilder

getMetadataCase()

publicPart.MetadataCasegetMetadataCase()
Returns
Type Description
Part.MetadataCase

getText()

publicStringgetText()

Optional. Text part (can be code).

string text = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The text.

getTextBytes()

publicByteStringgetTextBytes()

Optional. Text part (can be code).

string text = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for text.

getVideoMetadata()

publicVideoMetadatagetVideoMetadata()

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

.google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VideoMetadata

The videoMetadata.

getVideoMetadataBuilder()

publicVideoMetadata.BuildergetVideoMetadataBuilder()

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

.google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VideoMetadata.Builder

getVideoMetadataOrBuilder()

publicVideoMetadataOrBuildergetVideoMetadataOrBuilder()

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

.google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VideoMetadataOrBuilder

hasFileData()

publicbooleanhasFileData()

Optional. URI based data.

.google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the fileData field is set.

hasFunctionCall()

publicbooleanhasFunctionCall()

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

.google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the functionCall field is set.

hasFunctionResponse()

publicbooleanhasFunctionResponse()

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

.google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the functionResponse field is set.

hasInlineData()

publicbooleanhasInlineData()

Optional. Inlined bytes data.

.google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the inlineData field is set.

hasText()

publicbooleanhasText()

Optional. Text part (can be code).

string text = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the text field is set.

hasVideoMetadata()

publicbooleanhasVideoMetadata()

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

.google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the videoMetadata field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFileData(FileData value)

publicPart.BuildermergeFileData(FileDatavalue)

Optional. URI based data.

.google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FileData
Returns
Type Description
Part.Builder

mergeFrom(Part other)

publicPart.BuildermergeFrom(Partother)
Parameter
Name Description
other Part
Returns
Type Description
Part.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

publicPart.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Part.Builder
Overrides

mergeFunctionCall(FunctionCall value)

publicPart.BuildermergeFunctionCall(FunctionCallvalue)

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

.google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FunctionCall
Returns
Type Description
Part.Builder

mergeFunctionResponse(FunctionResponse value)

publicPart.BuildermergeFunctionResponse(FunctionResponsevalue)

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

.google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FunctionResponse
Returns
Type Description
Part.Builder

mergeInlineData(Blob value)

publicPart.BuildermergeInlineData(Blobvalue)

Optional. Inlined bytes data.

.google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Blob
Returns
Type Description
Part.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalPart.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Part.Builder
Overrides

mergeVideoMetadata(VideoMetadata value)

publicPart.BuildermergeVideoMetadata(VideoMetadatavalue)

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

.google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value VideoMetadata
Returns
Type Description
Part.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFileData(FileData value)

publicPart.BuildersetFileData(FileDatavalue)

Optional. URI based data.

.google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FileData
Returns
Type Description
Part.Builder

setFileData(FileData.Builder builderForValue)

publicPart.BuildersetFileData(FileData.BuilderbuilderForValue)

Optional. URI based data.

.google.cloud.vertexai.v1.FileData file_data = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue FileData.Builder
Returns
Type Description
Part.Builder

setFunctionCall(FunctionCall value)

publicPart.BuildersetFunctionCall(FunctionCallvalue)

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

.google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FunctionCall
Returns
Type Description
Part.Builder

setFunctionCall(FunctionCall.Builder builderForValue)

publicPart.BuildersetFunctionCall(FunctionCall.BuilderbuilderForValue)

Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.

.google.cloud.vertexai.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue FunctionCall.Builder
Returns
Type Description
Part.Builder

setFunctionResponse(FunctionResponse value)

publicPart.BuildersetFunctionResponse(FunctionResponsevalue)

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

.google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FunctionResponse
Returns
Type Description
Part.Builder

setFunctionResponse(FunctionResponse.Builder builderForValue)

publicPart.BuildersetFunctionResponse(FunctionResponse.BuilderbuilderForValue)

Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

.google.cloud.vertexai.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue FunctionResponse.Builder
Returns
Type Description
Part.Builder

setInlineData(Blob value)

publicPart.BuildersetInlineData(Blobvalue)

Optional. Inlined bytes data.

.google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Blob
Returns
Type Description
Part.Builder

setInlineData(Blob.Builder builderForValue)

publicPart.BuildersetInlineData(Blob.BuilderbuilderForValue)

Optional. Inlined bytes data.

.google.cloud.vertexai.v1.Blob inline_data = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Blob.Builder
Returns
Type Description
Part.Builder

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

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

setText(String value)

publicPart.BuildersetText(Stringvalue)

Optional. Text part (can be code).

string text = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The text to set.

Returns
Type Description
Part.Builder

This builder for chaining.

setTextBytes(ByteString value)

publicPart.BuildersetTextBytes(ByteStringvalue)

Optional. Text part (can be code).

string text = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for text to set.

Returns
Type Description
Part.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalPart.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Part.Builder
Overrides

setVideoMetadata(VideoMetadata value)

publicPart.BuildersetVideoMetadata(VideoMetadatavalue)

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

.google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value VideoMetadata
Returns
Type Description
Part.Builder

setVideoMetadata(VideoMetadata.Builder builderForValue)

publicPart.BuildersetVideoMetadata(VideoMetadata.BuilderbuilderForValue)

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.

.google.cloud.vertexai.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue VideoMetadata.Builder
Returns
Type Description
Part.Builder

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.