Class GenerateGroundedContentRequest (0.50.0)

public final class GenerateGroundedContentRequest extends GeneratedMessageV3 implements GenerateGroundedContentRequestOrBuilder

Top-level message sent by the client for the GenerateGroundedContent method.

Protobuf type google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > GenerateGroundedContentRequest

Static Fields

CONTENTS_FIELD_NUMBER

public static final int CONTENTS_FIELD_NUMBER
Field Value
Type Description
int

GENERATION_SPEC_FIELD_NUMBER

public static final int GENERATION_SPEC_FIELD_NUMBER
Field Value
Type Description
int

GROUNDING_SPEC_FIELD_NUMBER

public static final int GROUNDING_SPEC_FIELD_NUMBER
Field Value
Type Description
int

LOCATION_FIELD_NUMBER

public static final int LOCATION_FIELD_NUMBER
Field Value
Type Description
int

SYSTEM_INSTRUCTION_FIELD_NUMBER

public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER
Field Value
Type Description
int

USER_LABELS_FIELD_NUMBER

public static final int USER_LABELS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static GenerateGroundedContentRequest getDefaultInstance()
Returns
Type Description
GenerateGroundedContentRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static GenerateGroundedContentRequest.Builder newBuilder()
Returns
Type Description
GenerateGroundedContentRequest.Builder

newBuilder(GenerateGroundedContentRequest prototype)

public static GenerateGroundedContentRequest.Builder newBuilder(GenerateGroundedContentRequest prototype)
Parameter
Name Description
prototype GenerateGroundedContentRequest
Returns
Type Description
GenerateGroundedContentRequest.Builder

parseDelimitedFrom(InputStream input)

public static GenerateGroundedContentRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static GenerateGroundedContentRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static GenerateGroundedContentRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static GenerateGroundedContentRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static GenerateGroundedContentRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static GenerateGroundedContentRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static GenerateGroundedContentRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<GenerateGroundedContentRequest> parser()
Returns
Type Description
Parser<GenerateGroundedContentRequest>

Methods

containsUserLabels(String key)

public boolean containsUserLabels(String key)

The user labels applied to a resource must meet the following requirements:

  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.
  • Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

    See Google Cloud Document for more details.

map<string, string> user_labels = 6;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getContents(int index)

public GroundedGenerationContent getContents(int index)

Content of the current conversation with the model.

For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;

Parameter
Name Description
index int
Returns
Type Description
GroundedGenerationContent

getContentsCount()

public int getContentsCount()

Content of the current conversation with the model.

For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;

Returns
Type Description
int

getContentsList()

public List<GroundedGenerationContent> getContentsList()

Content of the current conversation with the model.

For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;

Returns
Type Description
List<GroundedGenerationContent>

getContentsOrBuilder(int index)

public GroundedGenerationContentOrBuilder getContentsOrBuilder(int index)

Content of the current conversation with the model.

For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;

Parameter
Name Description
index int
Returns
Type Description
GroundedGenerationContentOrBuilder

getContentsOrBuilderList()

public List<? extends GroundedGenerationContentOrBuilder> getContentsOrBuilderList()

Content of the current conversation with the model.

For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent contents = 2;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.GroundedGenerationContentOrBuilder>

getDefaultInstanceForType()

public GenerateGroundedContentRequest getDefaultInstanceForType()
Returns
Type Description
GenerateGroundedContentRequest

getGenerationSpec()

public GenerateGroundedContentRequest.GenerationSpec getGenerationSpec()

Content generation specification.

.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec generation_spec = 3;

Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec

The generationSpec.

getGenerationSpecOrBuilder()

public GenerateGroundedContentRequest.GenerationSpecOrBuilder getGenerationSpecOrBuilder()

Content generation specification.

.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec generation_spec = 3;

Returns
Type Description
GenerateGroundedContentRequest.GenerationSpecOrBuilder

getGroundingSpec()

public GenerateGroundedContentRequest.GroundingSpec getGroundingSpec()

Grounding specification.

.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSpec grounding_spec = 4;

Returns
Type Description
GenerateGroundedContentRequest.GroundingSpec

The groundingSpec.

getGroundingSpecOrBuilder()

public GenerateGroundedContentRequest.GroundingSpecOrBuilder getGroundingSpecOrBuilder()

Grounding specification.

.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSpec grounding_spec = 4;

Returns
Type Description
GenerateGroundedContentRequest.GroundingSpecOrBuilder

getLocation()

public String getLocation()

Required. Location resource.

Format: projects/{project}/locations/{location}.

string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The location.

getLocationBytes()

public ByteString getLocationBytes()

Required. Location resource.

Format: projects/{project}/locations/{location}.

string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for location.

getParserForType()

public Parser<GenerateGroundedContentRequest> getParserForType()
Returns
Type Description
Parser<GenerateGroundedContentRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSystemInstruction()

public GroundedGenerationContent getSystemInstruction()

Content of the system instruction for the current API.

These instructions will take priority over any other prompt instructions if the selected model is supporting them.

.google.cloud.discoveryengine.v1beta.GroundedGenerationContent system_instruction = 5;

Returns
Type Description
GroundedGenerationContent

The systemInstruction.

getSystemInstructionOrBuilder()

public GroundedGenerationContentOrBuilder getSystemInstructionOrBuilder()

Content of the system instruction for the current API.

These instructions will take priority over any other prompt instructions if the selected model is supporting them.

.google.cloud.discoveryengine.v1beta.GroundedGenerationContent system_instruction = 5;

Returns
Type Description
GroundedGenerationContentOrBuilder

getUserLabels() (deprecated)

public Map<String,String> getUserLabels()

Use #getUserLabelsMap() instead.

Returns
Type Description
Map<String,String>

getUserLabelsCount()

public int getUserLabelsCount()

The user labels applied to a resource must meet the following requirements:

  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.
  • Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

    See Google Cloud Document for more details.

map<string, string> user_labels = 6;

Returns
Type Description
int

getUserLabelsMap()

public Map<String,String> getUserLabelsMap()

The user labels applied to a resource must meet the following requirements:

  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.
  • Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

    See Google Cloud Document for more details.

map<string, string> user_labels = 6;

Returns
Type Description
Map<String,String>

getUserLabelsOrDefault(String key, String defaultValue)

public String getUserLabelsOrDefault(String key, String defaultValue)

The user labels applied to a resource must meet the following requirements:

  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.
  • Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

    See Google Cloud Document for more details.

map<string, string> user_labels = 6;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getUserLabelsOrThrow(String key)

public String getUserLabelsOrThrow(String key)

The user labels applied to a resource must meet the following requirements:

  • Each resource can have multiple labels, up to a maximum of 64.
  • Each label must be a key-value pair.
  • Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
  • Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
  • The key portion of a label must be unique. However, you can use the same key with multiple resources.
  • Keys must start with a lowercase letter or international character.

    See Google Cloud Document for more details.

map<string, string> user_labels = 6;

Parameter
Name Description
key String
Returns
Type Description
String

hasGenerationSpec()

public boolean hasGenerationSpec()

Content generation specification.

.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec generation_spec = 3;

Returns
Type Description
boolean

Whether the generationSpec field is set.

hasGroundingSpec()

public boolean hasGroundingSpec()

Grounding specification.

.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSpec grounding_spec = 4;

Returns
Type Description
boolean

Whether the groundingSpec field is set.

hasSystemInstruction()

public boolean hasSystemInstruction()

Content of the system instruction for the current API.

These instructions will take priority over any other prompt instructions if the selected model is supporting them.

.google.cloud.discoveryengine.v1beta.GroundedGenerationContent system_instruction = 5;

Returns
Type Description
boolean

Whether the systemInstruction field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public GenerateGroundedContentRequest.Builder newBuilderForType()
Returns
Type Description
GenerateGroundedContentRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected GenerateGroundedContentRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public GenerateGroundedContentRequest.Builder toBuilder()
Returns
Type Description
GenerateGroundedContentRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException