public final class Content extends GeneratedMessage implements ContentOrBuilder
The base structured datatype containing multi-part content of a message.
A Content includes a role field designating the producer of the Content
and a parts field containing multi-part data that contains the content of
the message turn.
Protobuf type google.cloud.aiplatform.v1beta1.Content
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
PARTS_FIELD_NUMBER
public static final int PARTS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
ROLE_FIELD_NUMBER
public static final int ROLE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Content getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Content.Builder newBuilder()
newBuilder(Content prototype)
public static Content.Builder newBuilder(Content prototype)
| Parameter |
| Name |
Description |
prototype |
Content
|
parseDelimitedFrom(InputStream input)
public static Content parseDelimitedFrom(InputStream input)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Content parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Content parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Content parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Content parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Content parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
parseFrom(CodedInputStream input)
public static Content parseFrom(CodedInputStream input)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Content parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(InputStream input)
public static Content parseFrom(InputStream input)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Content parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Content parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Content parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Content> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public Content getDefaultInstanceForType()
getParserForType()
public Parser<Content> getParserForType()
Overrides
getParts(int index)
public Part getParts(int index)
Required. Ordered Parts that constitute a single message. Parts may have
different IANA MIME types.
repeated .google.cloud.aiplatform.v1beta1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter |
| Name |
Description |
index |
int
|
| Returns |
| Type |
Description |
Part |
|
getPartsCount()
public int getPartsCount()
Required. Ordered Parts that constitute a single message. Parts may have
different IANA MIME types.
repeated .google.cloud.aiplatform.v1beta1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
int |
|
getPartsList()
public List<Part> getPartsList()
Required. Ordered Parts that constitute a single message. Parts may have
different IANA MIME types.
repeated .google.cloud.aiplatform.v1beta1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];
getPartsOrBuilder(int index)
public PartOrBuilder getPartsOrBuilder(int index)
Required. Ordered Parts that constitute a single message. Parts may have
different IANA MIME types.
repeated .google.cloud.aiplatform.v1beta1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter |
| Name |
Description |
index |
int
|
getPartsOrBuilderList()
public List<? extends PartOrBuilder> getPartsOrBuilderList()
Required. Ordered Parts that constitute a single message. Parts may have
different IANA MIME types.
repeated .google.cloud.aiplatform.v1beta1.Part parts = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.aiplatform.v1beta1.PartOrBuilder> |
|
getRole()
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()
public ByteString getRoleBytes()
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.
|
getSerializedSize()
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Content.Builder newBuilderForType()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected Content.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
toBuilder()
public Content.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides