Class Part (3.37.0)

public final class Part extends GeneratedMessageV3 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 Fields

FILE_DATA_FIELD_NUMBER

public static final int FILE_DATA_FIELD_NUMBER
Field Value
TypeDescription
int

FUNCTION_CALL_FIELD_NUMBER

public static final int FUNCTION_CALL_FIELD_NUMBER
Field Value
TypeDescription
int

FUNCTION_RESPONSE_FIELD_NUMBER

public static final int FUNCTION_RESPONSE_FIELD_NUMBER
Field Value
TypeDescription
int

INLINE_DATA_FIELD_NUMBER

public static final int INLINE_DATA_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_FIELD_NUMBER

public static final int TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

VIDEO_METADATA_FIELD_NUMBER

public static final int VIDEO_METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Part getDefaultInstance()
Returns
TypeDescription
Part

getDescriptor()

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

newBuilder()

public static Part.Builder newBuilder()
Returns
TypeDescription
Part.Builder

newBuilder(Part prototype)

public static Part.Builder newBuilder(Part prototype)
Parameter
NameDescription
prototypePart
Returns
TypeDescription
Part.Builder

parseDelimitedFrom(InputStream input)

public static Part parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Part
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Part parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Part
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Part parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Part
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Part parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Part
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Part parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Part
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Part parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Part
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Part parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Part
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Part parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Part
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Part parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Part
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Part parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Part
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Part parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Part
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Part parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Part
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Part> parser()
Returns
TypeDescription
Parser<Part>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDataCase()

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

getDefaultInstanceForType()

public Part getDefaultInstanceForType()
Returns
TypeDescription
Part

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.

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.

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.

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.

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

getParserForType()

public Parser<Part> getParserForType()
Returns
TypeDescription
Parser<Part>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Part.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Part.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException