Class GenerateGroundedContentRequest.Builder (0.51.0)

public static final class GenerateGroundedContentRequest.Builder extends GeneratedMessageV3.Builder<GenerateGroundedContentRequest.Builder> implements GenerateGroundedContentRequestOrBuilder

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

Protobuf type google.cloud.discoveryengine.v1.GenerateGroundedContentRequest

Static Methods

getDescriptor()

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

Methods

addAllContents(Iterable<? extends GroundedGenerationContent> values)

public GenerateGroundedContentRequest.Builder addAllContents(Iterable<? extends GroundedGenerationContent> values)

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.

Only a single-turn query is supported currently.

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

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1.GroundedGenerationContent>
Returns
Type Description
GenerateGroundedContentRequest.Builder

addContents(GroundedGenerationContent value)

public GenerateGroundedContentRequest.Builder addContents(GroundedGenerationContent value)

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.

Only a single-turn query is supported currently.

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

Parameter
Name Description
value GroundedGenerationContent
Returns
Type Description
GenerateGroundedContentRequest.Builder

addContents(GroundedGenerationContent.Builder builderForValue)

public GenerateGroundedContentRequest.Builder addContents(GroundedGenerationContent.Builder builderForValue)

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.

Only a single-turn query is supported currently.

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

Parameter
Name Description
builderForValue GroundedGenerationContent.Builder
Returns
Type Description
GenerateGroundedContentRequest.Builder

addContents(int index, GroundedGenerationContent value)

public GenerateGroundedContentRequest.Builder addContents(int index, GroundedGenerationContent value)

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.

Only a single-turn query is supported currently.

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

Parameters
Name Description
index int
value GroundedGenerationContent
Returns
Type Description
GenerateGroundedContentRequest.Builder

addContents(int index, GroundedGenerationContent.Builder builderForValue)

public GenerateGroundedContentRequest.Builder addContents(int index, GroundedGenerationContent.Builder builderForValue)

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.

Only a single-turn query is supported currently.

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

Parameters
Name Description
index int
builderForValue GroundedGenerationContent.Builder
Returns
Type Description
GenerateGroundedContentRequest.Builder

addContentsBuilder()

public GroundedGenerationContent.Builder addContentsBuilder()

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.

Only a single-turn query is supported currently.

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

Returns
Type Description
GroundedGenerationContent.Builder

addContentsBuilder(int index)

public GroundedGenerationContent.Builder addContentsBuilder(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.

Only a single-turn query is supported currently.

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

Parameter
Name Description
index int
Returns
Type Description
GroundedGenerationContent.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GenerateGroundedContentRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

build()

public GenerateGroundedContentRequest build()
Returns
Type Description
GenerateGroundedContentRequest

buildPartial()

public GenerateGroundedContentRequest buildPartial()
Returns
Type Description
GenerateGroundedContentRequest

clear()

public GenerateGroundedContentRequest.Builder clear()
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

clearContents()

public GenerateGroundedContentRequest.Builder clearContents()

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.

Only a single-turn query is supported currently.

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

Returns
Type Description
GenerateGroundedContentRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public GenerateGroundedContentRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

clearGenerationSpec()

public GenerateGroundedContentRequest.Builder clearGenerationSpec()

Content generation specification.

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

Returns
Type Description
GenerateGroundedContentRequest.Builder

clearGroundingSpec()

public GenerateGroundedContentRequest.Builder clearGroundingSpec()

Grounding specification.

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

Returns
Type Description
GenerateGroundedContentRequest.Builder

clearLocation()

public GenerateGroundedContentRequest.Builder clearLocation()

Required. Location resource.

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

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

Returns
Type Description
GenerateGroundedContentRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public GenerateGroundedContentRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

clearSystemInstruction()

public GenerateGroundedContentRequest.Builder clearSystemInstruction()

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.v1.GroundedGenerationContent system_instruction = 5;

Returns
Type Description
GenerateGroundedContentRequest.Builder

clearUserLabels()

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

clone()

public GenerateGroundedContentRequest.Builder clone()
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

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

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.

Only a single-turn query is supported currently.

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

Parameter
Name Description
index int
Returns
Type Description
GroundedGenerationContent

getContentsBuilder(int index)

public GroundedGenerationContent.Builder getContentsBuilder(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.

Only a single-turn query is supported currently.

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

Parameter
Name Description
index int
Returns
Type Description
GroundedGenerationContent.Builder

getContentsBuilderList()

public List<GroundedGenerationContent.Builder> getContentsBuilderList()

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.

Only a single-turn query is supported currently.

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

Returns
Type Description
List<Builder>

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.

Only a single-turn query is supported currently.

repeated .google.cloud.discoveryengine.v1.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.

Only a single-turn query is supported currently.

repeated .google.cloud.discoveryengine.v1.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.

Only a single-turn query is supported currently.

repeated .google.cloud.discoveryengine.v1.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.

Only a single-turn query is supported currently.

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

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

getDefaultInstanceForType()

public GenerateGroundedContentRequest getDefaultInstanceForType()
Returns
Type Description
GenerateGroundedContentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getGenerationSpec()

public GenerateGroundedContentRequest.GenerationSpec getGenerationSpec()

Content generation specification.

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

Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec

The generationSpec.

getGenerationSpecBuilder()

public GenerateGroundedContentRequest.GenerationSpec.Builder getGenerationSpecBuilder()

Content generation specification.

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

Returns
Type Description
GenerateGroundedContentRequest.GenerationSpec.Builder

getGenerationSpecOrBuilder()

public GenerateGroundedContentRequest.GenerationSpecOrBuilder getGenerationSpecOrBuilder()

Content generation specification.

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

Returns
Type Description
GenerateGroundedContentRequest.GenerationSpecOrBuilder

getGroundingSpec()

public GenerateGroundedContentRequest.GroundingSpec getGroundingSpec()

Grounding specification.

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

Returns
Type Description
GenerateGroundedContentRequest.GroundingSpec

The groundingSpec.

getGroundingSpecBuilder()

public GenerateGroundedContentRequest.GroundingSpec.Builder getGroundingSpecBuilder()

Grounding specification.

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

Returns
Type Description
GenerateGroundedContentRequest.GroundingSpec.Builder

getGroundingSpecOrBuilder()

public GenerateGroundedContentRequest.GroundingSpecOrBuilder getGroundingSpecOrBuilder()

Grounding specification.

.google.cloud.discoveryengine.v1.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.

getMutableUserLabels() (deprecated)

public Map<String,String> getMutableUserLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

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.v1.GroundedGenerationContent system_instruction = 5;

Returns
Type Description
GroundedGenerationContent

The systemInstruction.

getSystemInstructionBuilder()

public GroundedGenerationContent.Builder getSystemInstructionBuilder()

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.v1.GroundedGenerationContent system_instruction = 5;

Returns
Type Description
GroundedGenerationContent.Builder

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.v1.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.v1.GenerateGroundedContentRequest.GenerationSpec generation_spec = 3;

Returns
Type Description
boolean

Whether the generationSpec field is set.

hasGroundingSpec()

public boolean hasGroundingSpec()

Grounding specification.

.google.cloud.discoveryengine.v1.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.v1.GroundedGenerationContent system_instruction = 5;

Returns
Type Description
boolean

Whether the systemInstruction field is set.

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.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GenerateGroundedContentRequest other)

public GenerateGroundedContentRequest.Builder mergeFrom(GenerateGroundedContentRequest other)
Parameter
Name Description
other GenerateGroundedContentRequest
Returns
Type Description
GenerateGroundedContentRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GenerateGroundedContentRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public GenerateGroundedContentRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

mergeGenerationSpec(GenerateGroundedContentRequest.GenerationSpec value)

public GenerateGroundedContentRequest.Builder mergeGenerationSpec(GenerateGroundedContentRequest.GenerationSpec value)

Content generation specification.

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

Parameter
Name Description
value GenerateGroundedContentRequest.GenerationSpec
Returns
Type Description
GenerateGroundedContentRequest.Builder

mergeGroundingSpec(GenerateGroundedContentRequest.GroundingSpec value)

public GenerateGroundedContentRequest.Builder mergeGroundingSpec(GenerateGroundedContentRequest.GroundingSpec value)

Grounding specification.

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

Parameter
Name Description
value GenerateGroundedContentRequest.GroundingSpec
Returns
Type Description
GenerateGroundedContentRequest.Builder

mergeSystemInstruction(GroundedGenerationContent value)

public GenerateGroundedContentRequest.Builder mergeSystemInstruction(GroundedGenerationContent value)

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.v1.GroundedGenerationContent system_instruction = 5;

Parameter
Name Description
value GroundedGenerationContent
Returns
Type Description
GenerateGroundedContentRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GenerateGroundedContentRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

putAllUserLabels(Map<String,String> values)

public GenerateGroundedContentRequest.Builder putAllUserLabels(Map<String,String> values)

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
values Map<String,String>
Returns
Type Description
GenerateGroundedContentRequest.Builder

putUserLabels(String key, String value)

public GenerateGroundedContentRequest.Builder putUserLabels(String key, String value)

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
value String
Returns
Type Description
GenerateGroundedContentRequest.Builder

removeContents(int index)

public GenerateGroundedContentRequest.Builder removeContents(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.

Only a single-turn query is supported currently.

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

Parameter
Name Description
index int
Returns
Type Description
GenerateGroundedContentRequest.Builder

removeUserLabels(String key)

public GenerateGroundedContentRequest.Builder removeUserLabels(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
GenerateGroundedContentRequest.Builder

setContents(int index, GroundedGenerationContent value)

public GenerateGroundedContentRequest.Builder setContents(int index, GroundedGenerationContent value)

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.

Only a single-turn query is supported currently.

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

Parameters
Name Description
index int
value GroundedGenerationContent
Returns
Type Description
GenerateGroundedContentRequest.Builder

setContents(int index, GroundedGenerationContent.Builder builderForValue)

public GenerateGroundedContentRequest.Builder setContents(int index, GroundedGenerationContent.Builder builderForValue)

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.

Only a single-turn query is supported currently.

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

Parameters
Name Description
index int
builderForValue GroundedGenerationContent.Builder
Returns
Type Description
GenerateGroundedContentRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public GenerateGroundedContentRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

setGenerationSpec(GenerateGroundedContentRequest.GenerationSpec value)

public GenerateGroundedContentRequest.Builder setGenerationSpec(GenerateGroundedContentRequest.GenerationSpec value)

Content generation specification.

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

Parameter
Name Description
value GenerateGroundedContentRequest.GenerationSpec
Returns
Type Description
GenerateGroundedContentRequest.Builder

setGenerationSpec(GenerateGroundedContentRequest.GenerationSpec.Builder builderForValue)

public GenerateGroundedContentRequest.Builder setGenerationSpec(GenerateGroundedContentRequest.GenerationSpec.Builder builderForValue)

Content generation specification.

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

Parameter
Name Description
builderForValue GenerateGroundedContentRequest.GenerationSpec.Builder
Returns
Type Description
GenerateGroundedContentRequest.Builder

setGroundingSpec(GenerateGroundedContentRequest.GroundingSpec value)

public GenerateGroundedContentRequest.Builder setGroundingSpec(GenerateGroundedContentRequest.GroundingSpec value)

Grounding specification.

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

Parameter
Name Description
value GenerateGroundedContentRequest.GroundingSpec
Returns
Type Description
GenerateGroundedContentRequest.Builder

setGroundingSpec(GenerateGroundedContentRequest.GroundingSpec.Builder builderForValue)

public GenerateGroundedContentRequest.Builder setGroundingSpec(GenerateGroundedContentRequest.GroundingSpec.Builder builderForValue)

Grounding specification.

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

Parameter
Name Description
builderForValue GenerateGroundedContentRequest.GroundingSpec.Builder
Returns
Type Description
GenerateGroundedContentRequest.Builder

setLocation(String value)

public GenerateGroundedContentRequest.Builder setLocation(String value)

Required. Location resource.

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

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

Parameter
Name Description
value String

The location to set.

Returns
Type Description
GenerateGroundedContentRequest.Builder

This builder for chaining.

setLocationBytes(ByteString value)

public GenerateGroundedContentRequest.Builder setLocationBytes(ByteString value)

Required. Location resource.

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

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

Parameter
Name Description
value ByteString

The bytes for location to set.

Returns
Type Description
GenerateGroundedContentRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public GenerateGroundedContentRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides

setSystemInstruction(GroundedGenerationContent value)

public GenerateGroundedContentRequest.Builder setSystemInstruction(GroundedGenerationContent value)

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.v1.GroundedGenerationContent system_instruction = 5;

Parameter
Name Description
value GroundedGenerationContent
Returns
Type Description
GenerateGroundedContentRequest.Builder

setSystemInstruction(GroundedGenerationContent.Builder builderForValue)

public GenerateGroundedContentRequest.Builder setSystemInstruction(GroundedGenerationContent.Builder builderForValue)

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.v1.GroundedGenerationContent system_instruction = 5;

Parameter
Name Description
builderForValue GroundedGenerationContent.Builder
Returns
Type Description
GenerateGroundedContentRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final GenerateGroundedContentRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GenerateGroundedContentRequest.Builder
Overrides