Class Part.Builder (3.41.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.aiplatform.v1.Part

Implements

PartOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Part build()
Returns
TypeDescription
Part

buildPartial()

public Part buildPartial()
Returns
TypeDescription
Part

clear()

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

clearData()

public Part.Builder clearData()
Returns
TypeDescription
Part.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearFileData()

public Part.Builder clearFileData()

Optional. URI based data.

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

Returns
TypeDescription
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.aiplatform.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Part.Builder

clearInlineData()

public Part.Builder clearInlineData()

Optional. Inlined bytes data.

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

Returns
TypeDescription
Part.Builder

clearMetadata()

public Part.Builder clearMetadata()
Returns
TypeDescription
Part.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearText()

public Part.Builder clearText()

Optional. Text part (can be code).

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

Returns
TypeDescription
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.aiplatform.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Part.Builder

clone()

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

getDataCase()

public Part.DataCase getDataCase()
Returns
TypeDescription
Part.DataCase

getDefaultInstanceForType()

public Part getDefaultInstanceForType()
Returns
TypeDescription
Part

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFileData()

public FileData getFileData()

Optional. URI based data.

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

Returns
TypeDescription
FileData

The fileData.

getFileDataBuilder()

public FileData.Builder getFileDataBuilder()

Optional. URI based data.

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

Returns
TypeDescription
FileData.Builder

getFileDataOrBuilder()

public FileDataOrBuilder getFileDataOrBuilder()

Optional. URI based data.

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

Returns
TypeDescription
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.aiplatform.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
FunctionResponseOrBuilder

getInlineData()

public Blob getInlineData()

Optional. Inlined bytes data.

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

Returns
TypeDescription
Blob

The inlineData.

getInlineDataBuilder()

public Blob.Builder getInlineDataBuilder()

Optional. Inlined bytes data.

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

Returns
TypeDescription
Blob.Builder

getInlineDataOrBuilder()

public BlobOrBuilder getInlineDataOrBuilder()

Optional. Inlined bytes data.

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

Returns
TypeDescription
BlobOrBuilder

getMetadataCase()

public Part.MetadataCase getMetadataCase()
Returns
TypeDescription
Part.MetadataCase

getText()

public String getText()

Optional. Text part (can be code).

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

Returns
TypeDescription
String

The text.

getTextBytes()

public ByteString getTextBytes()

Optional. Text part (can be code).

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

Returns
TypeDescription
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.aiplatform.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
VideoMetadataOrBuilder

hasFileData()

public boolean hasFileData()

Optional. URI based data.

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

Returns
TypeDescription
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.aiplatform.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.aiplatform.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the functionResponse field is set.

hasInlineData()

public boolean hasInlineData()

Optional. Inlined bytes data.

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

Returns
TypeDescription
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
TypeDescription
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.aiplatform.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the videoMetadata field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFileData(FileData value)

public Part.Builder mergeFileData(FileData value)

Optional. URI based data.

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

Parameter
NameDescription
valueFileData
Returns
TypeDescription
Part.Builder

mergeFrom(Part other)

public Part.Builder mergeFrom(Part other)
Parameter
NameDescription
otherPart
Returns
TypeDescription
Part.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Part.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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.aiplatform.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFunctionCall
Returns
TypeDescription
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.aiplatform.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFunctionResponse
Returns
TypeDescription
Part.Builder

mergeInlineData(Blob value)

public Part.Builder mergeInlineData(Blob value)

Optional. Inlined bytes data.

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

Parameter
NameDescription
valueBlob
Returns
TypeDescription
Part.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Part.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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.aiplatform.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueVideoMetadata
Returns
TypeDescription
Part.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFileData(FileData value)

public Part.Builder setFileData(FileData value)

Optional. URI based data.

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

Parameter
NameDescription
valueFileData
Returns
TypeDescription
Part.Builder

setFileData(FileData.Builder builderForValue)

public Part.Builder setFileData(FileData.Builder builderForValue)

Optional. URI based data.

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

Parameter
NameDescription
builderForValueFileData.Builder
Returns
TypeDescription
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.aiplatform.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFunctionCall
Returns
TypeDescription
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.aiplatform.v1.FunctionCall function_call = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueFunctionCall.Builder
Returns
TypeDescription
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.aiplatform.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFunctionResponse
Returns
TypeDescription
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.aiplatform.v1.FunctionResponse function_response = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueFunctionResponse.Builder
Returns
TypeDescription
Part.Builder

setInlineData(Blob value)

public Part.Builder setInlineData(Blob value)

Optional. Inlined bytes data.

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

Parameter
NameDescription
valueBlob
Returns
TypeDescription
Part.Builder

setInlineData(Blob.Builder builderForValue)

public Part.Builder setInlineData(Blob.Builder builderForValue)

Optional. Inlined bytes data.

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

Parameter
NameDescription
builderForValueBlob.Builder
Returns
TypeDescription
Part.Builder

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

public Part.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The text to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for text to set.

Returns
TypeDescription
Part.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Part.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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.aiplatform.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueVideoMetadata
Returns
TypeDescription
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.aiplatform.v1.VideoMetadata video_metadata = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueVideoMetadata.Builder
Returns
TypeDescription
Part.Builder