Class Part (1.1.0)

publicfinalclass PartextendsGeneratedMessageV3implementsPartOrBuilder

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.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

FILE_DATA_FIELD_NUMBER

publicstaticfinalintFILE_DATA_FIELD_NUMBER
Field Value
Type Description
int

FUNCTION_CALL_FIELD_NUMBER

publicstaticfinalintFUNCTION_CALL_FIELD_NUMBER
Field Value
Type Description
int

FUNCTION_RESPONSE_FIELD_NUMBER

publicstaticfinalintFUNCTION_RESPONSE_FIELD_NUMBER
Field Value
Type Description
int

INLINE_DATA_FIELD_NUMBER

publicstaticfinalintINLINE_DATA_FIELD_NUMBER
Field Value
Type Description
int

TEXT_FIELD_NUMBER

publicstaticfinalintTEXT_FIELD_NUMBER
Field Value
Type Description
int

VIDEO_METADATA_FIELD_NUMBER

publicstaticfinalintVIDEO_METADATA_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticPartgetDefaultInstance()
Returns
Type Description
Part

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticPart.BuildernewBuilder()
Returns
Type Description
Part.Builder

newBuilder(Part prototype)

publicstaticPart.BuildernewBuilder(Partprototype)
Parameter
Name Description
prototype Part
Returns
Type Description
Part.Builder

parseDelimitedFrom(InputStream input)

publicstaticPartparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Part
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPartparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Part
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticPartparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Part
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticPartparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Part
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticPartparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Part
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticPartparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Part
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticPartparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Part
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPartparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Part
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticPartparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Part
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPartparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Part
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticPartparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Part
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticPartparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Part
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<Part>parser()
Returns
Type Description
Parser<Part>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDataCase()

publicPart.DataCasegetDataCase()
Returns
Type Description
Part.DataCase

getDefaultInstanceForType()

publicPartgetDefaultInstanceForType()
Returns
Type Description
Part

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.

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.

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.

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.

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

getParserForType()

publicParser<Part>getParserForType()
Returns
Type Description
Parser<Part>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicPart.BuildernewBuilderForType()
Returns
Type Description
Part.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedPart.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Part.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicPart.BuildertoBuilder()
Returns
Type Description
Part.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.