Class Part.Builder (1.13.0)

public static final class Part.Builder extends GeneratedMessageV3.Builder<Part.Builder> implements PartOrBuilder

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Part.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Part.Builder
Overrides

build()

public Part build()
Returns
Type Description
Part

buildPartial()

public Part buildPartial()
Returns
Type Description
Part

clear()

public Part.Builder clear()
Returns
Type Description
Part.Builder
Overrides

clearData()

public Part.Builder clearData()
Returns
Type Description
Part.Builder

clearField(Descriptors.FieldDescriptor field)

public Part.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Part.Builder
Overrides

clearFileData()

public Part.Builder clearFileData()

Optional. URI based data.

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

Returns
Type Description
Part.Builder

clearFunctionCall()

public Part.Builder clearFunctionCall()

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()

public Part.Builder clearFunctionResponse()

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()

public Part.Builder clearInlineData()

Optional. Inlined bytes data.

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

Returns
Type Description
Part.Builder

clearMetadata()

public Part.Builder clearMetadata()
Returns
Type Description
Part.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Part.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Part.Builder
Overrides

clearText()

public Part.Builder clearText()

Optional. Text part (can be code).

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

Returns
Type Description
Part.Builder

This builder for chaining.

clearVideoMetadata()

public Part.Builder clearVideoMetadata()

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()

public Part.Builder clone()
Returns
Type Description
Part.Builder
Overrides

getDataCase()

public Part.DataCase getDataCase()
Returns
Type Description
Part.DataCase

getDefaultInstanceForType()

public Part getDefaultInstanceForType()
Returns
Type Description
Part

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFileData()

public FileData getFileData()

Optional. URI based data.

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

Returns
Type Description
FileData

The fileData.

getFileDataBuilder()

public FileData.Builder getFileDataBuilder()

Optional. URI based data.

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

Returns
Type Description
FileData.Builder

getFileDataOrBuilder()

public FileDataOrBuilder getFileDataOrBuilder()

Optional. URI based data.

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

Returns
Type Description
FileDataOrBuilder

getFunctionCall()

public FunctionCall getFunctionCall()

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()

public FunctionCall.Builder getFunctionCallBuilder()

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()

public FunctionCallOrBuilder getFunctionCallOrBuilder()

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()

public FunctionResponse getFunctionResponse()

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()

public FunctionResponse.Builder getFunctionResponseBuilder()

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()

public FunctionResponseOrBuilder getFunctionResponseOrBuilder()

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()

public Blob getInlineData()

Optional. Inlined bytes data.

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

Returns
Type Description
Blob

The inlineData.

getInlineDataBuilder()

public Blob.Builder getInlineDataBuilder()

Optional. Inlined bytes data.

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

Returns
Type Description
Blob.Builder

getInlineDataOrBuilder()

public BlobOrBuilder getInlineDataOrBuilder()

Optional. Inlined bytes data.

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

Returns
Type Description
BlobOrBuilder

getMetadataCase()

public Part.MetadataCase getMetadataCase()
Returns
Type Description
Part.MetadataCase

getText()

public String getText()

Optional. Text part (can be code).

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

Returns
Type Description
String

The text.

getTextBytes()

public ByteString getTextBytes()

Optional. Text part (can be code).

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

Returns
Type Description
ByteString

The bytes for text.

getVideoMetadata()

public VideoMetadata getVideoMetadata()

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()

public VideoMetadata.Builder getVideoMetadataBuilder()

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()

public VideoMetadataOrBuilder getVideoMetadataOrBuilder()

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()

public boolean hasFileData()

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()

public boolean hasFunctionCall()

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()

public boolean hasFunctionResponse()

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()

public boolean hasInlineData()

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()

public boolean hasText()

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()

public boolean hasVideoMetadata()

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()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFileData(FileData value)

public Part.Builder mergeFileData(FileData value)

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)

public Part.Builder mergeFrom(Part other)
Parameter
Name Description
other Part
Returns
Type Description
Part.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Part.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Part.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Part.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Part.Builder
Overrides

mergeFunctionCall(FunctionCall value)

public Part.Builder mergeFunctionCall(FunctionCall value)

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)

public Part.Builder mergeFunctionResponse(FunctionResponse value)

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)

public Part.Builder mergeInlineData(Blob value)

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)

public final Part.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Part.Builder
Overrides

mergeVideoMetadata(VideoMetadata value)

public Part.Builder mergeVideoMetadata(VideoMetadata value)

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)

public Part.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Part.Builder
Overrides

setFileData(FileData value)

public Part.Builder setFileData(FileData value)

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)

public Part.Builder setFileData(FileData.Builder builderForValue)

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)

public Part.Builder setFunctionCall(FunctionCall value)

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)

public Part.Builder setFunctionCall(FunctionCall.Builder builderForValue)

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)

public Part.Builder setFunctionResponse(FunctionResponse value)

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)

public Part.Builder setFunctionResponse(FunctionResponse.Builder builderForValue)

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)

public Part.Builder setInlineData(Blob value)

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)

public Part.Builder setInlineData(Blob.Builder builderForValue)

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)

public Part.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Part.Builder
Overrides

setText(String value)

public Part.Builder setText(String value)

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)

public Part.Builder setTextBytes(ByteString value)

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)

public final Part.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Part.Builder
Overrides

setVideoMetadata(VideoMetadata value)

public Part.Builder setVideoMetadata(VideoMetadata value)

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)

public Part.Builder setVideoMetadata(VideoMetadata.Builder builderForValue)

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