Interface ContentOrBuilder (1.0.0)

publicinterface ContentOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getParts(int index)

publicabstractPartgetParts(intindex)

Required. Ordered Parts that constitute a single message. Parts may have different IANA MIME types.

repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Part

getPartsCount()

publicabstractintgetPartsCount()

Required. Ordered Parts that constitute a single message. Parts may have different IANA MIME types.

repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getPartsList()

publicabstractList<Part>getPartsList()

Required. Ordered Parts that constitute a single message. Parts may have different IANA MIME types.

repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Part>

getPartsOrBuilder(int index)

publicabstractPartOrBuildergetPartsOrBuilder(intindex)

Required. Ordered Parts that constitute a single message. Parts may have different IANA MIME types.

repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
PartOrBuilder

getPartsOrBuilderList()

publicabstractList<?extendsPartOrBuilder>getPartsOrBuilderList()

Required. Ordered Parts that constitute a single message. Parts may have different IANA MIME types.

repeated .google.cloud.vertexai.v1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.cloud.vertexai.api.PartOrBuilder>

getRole()

publicabstractStringgetRole()

Optional. The producer of the content. Must be either 'user' or 'model'.

Useful to set for multi-turn conversations, otherwise can be left blank or unset.

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

Returns
Type Description
String

The role.

getRoleBytes()

publicabstractByteStringgetRoleBytes()

Optional. The producer of the content. Must be either 'user' or 'model'.

Useful to set for multi-turn conversations, otherwise can be left blank or unset.

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

Returns
Type Description
ByteString

The bytes for role.

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.