Class CheckGroundingRequest.Builder (0.51.0)

public static final class CheckGroundingRequest.Builder extends GeneratedMessageV3.Builder<CheckGroundingRequest.Builder> implements CheckGroundingRequestOrBuilder

Request message for GroundedGenerationService.CheckGrounding method.

Protobuf type google.cloud.discoveryengine.v1alpha.CheckGroundingRequest

Static Methods

getDescriptor()

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

Methods

addAllFacts(Iterable<? extends GroundingFact> values)

public CheckGroundingRequest.Builder addAllFacts(Iterable<? extends GroundingFact> values)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1alpha.GroundingFact>
Returns
Type Description
CheckGroundingRequest.Builder

addFacts(GroundingFact value)

public CheckGroundingRequest.Builder addFacts(GroundingFact value)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameter
Name Description
value GroundingFact
Returns
Type Description
CheckGroundingRequest.Builder

addFacts(GroundingFact.Builder builderForValue)

public CheckGroundingRequest.Builder addFacts(GroundingFact.Builder builderForValue)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameter
Name Description
builderForValue GroundingFact.Builder
Returns
Type Description
CheckGroundingRequest.Builder

addFacts(int index, GroundingFact value)

public CheckGroundingRequest.Builder addFacts(int index, GroundingFact value)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameters
Name Description
index int
value GroundingFact
Returns
Type Description
CheckGroundingRequest.Builder

addFacts(int index, GroundingFact.Builder builderForValue)

public CheckGroundingRequest.Builder addFacts(int index, GroundingFact.Builder builderForValue)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameters
Name Description
index int
builderForValue GroundingFact.Builder
Returns
Type Description
CheckGroundingRequest.Builder

addFactsBuilder()

public GroundingFact.Builder addFactsBuilder()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Returns
Type Description
GroundingFact.Builder

addFactsBuilder(int index)

public GroundingFact.Builder addFactsBuilder(int index)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameter
Name Description
index int
Returns
Type Description
GroundingFact.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CheckGroundingRequest build()
Returns
Type Description
CheckGroundingRequest

buildPartial()

public CheckGroundingRequest buildPartial()
Returns
Type Description
CheckGroundingRequest

clear()

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

clearAnswerCandidate()

public CheckGroundingRequest.Builder clearAnswerCandidate()

Answer candidate to check. Can have a maximum length of 1024 characters.

string answer_candidate = 2;

Returns
Type Description
CheckGroundingRequest.Builder

This builder for chaining.

clearFacts()

public CheckGroundingRequest.Builder clearFacts()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Returns
Type Description
CheckGroundingRequest.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearGroundingConfig()

public CheckGroundingRequest.Builder clearGroundingConfig()

Required. The resource name of the grounding config, such as projects/*/locations/global/groundingConfigs/default_grounding_config.

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

Returns
Type Description
CheckGroundingRequest.Builder

This builder for chaining.

clearGroundingSpec()

public CheckGroundingRequest.Builder clearGroundingSpec()

Configuration of the grounding check.

.google.cloud.discoveryengine.v1alpha.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
CheckGroundingRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUserLabels()

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

clone()

public CheckGroundingRequest.Builder clone()
Returns
Type Description
CheckGroundingRequest.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 = 5;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAnswerCandidate()

public String getAnswerCandidate()

Answer candidate to check. Can have a maximum length of 1024 characters.

string answer_candidate = 2;

Returns
Type Description
String

The answerCandidate.

getAnswerCandidateBytes()

public ByteString getAnswerCandidateBytes()

Answer candidate to check. Can have a maximum length of 1024 characters.

string answer_candidate = 2;

Returns
Type Description
ByteString

The bytes for answerCandidate.

getDefaultInstanceForType()

public CheckGroundingRequest getDefaultInstanceForType()
Returns
Type Description
CheckGroundingRequest

getDescriptorForType()

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

getFacts(int index)

public GroundingFact getFacts(int index)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameter
Name Description
index int
Returns
Type Description
GroundingFact

getFactsBuilder(int index)

public GroundingFact.Builder getFactsBuilder(int index)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameter
Name Description
index int
Returns
Type Description
GroundingFact.Builder

getFactsBuilderList()

public List<GroundingFact.Builder> getFactsBuilderList()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Returns
Type Description
List<Builder>

getFactsCount()

public int getFactsCount()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Returns
Type Description
int

getFactsList()

public List<GroundingFact> getFactsList()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Returns
Type Description
List<GroundingFact>

getFactsOrBuilder(int index)

public GroundingFactOrBuilder getFactsOrBuilder(int index)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameter
Name Description
index int
Returns
Type Description
GroundingFactOrBuilder

getFactsOrBuilderList()

public List<? extends GroundingFactOrBuilder> getFactsOrBuilderList()

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1alpha.GroundingFactOrBuilder>

getGroundingConfig()

public String getGroundingConfig()

Required. The resource name of the grounding config, such as projects/*/locations/global/groundingConfigs/default_grounding_config.

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

Returns
Type Description
String

The groundingConfig.

getGroundingConfigBytes()

public ByteString getGroundingConfigBytes()

Required. The resource name of the grounding config, such as projects/*/locations/global/groundingConfigs/default_grounding_config.

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

Returns
Type Description
ByteString

The bytes for groundingConfig.

getGroundingSpec()

public CheckGroundingSpec getGroundingSpec()

Configuration of the grounding check.

.google.cloud.discoveryengine.v1alpha.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
CheckGroundingSpec

The groundingSpec.

getGroundingSpecBuilder()

public CheckGroundingSpec.Builder getGroundingSpecBuilder()

Configuration of the grounding check.

.google.cloud.discoveryengine.v1alpha.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
CheckGroundingSpec.Builder

getGroundingSpecOrBuilder()

public CheckGroundingSpecOrBuilder getGroundingSpecOrBuilder()

Configuration of the grounding check.

.google.cloud.discoveryengine.v1alpha.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
CheckGroundingSpecOrBuilder

getMutableUserLabels() (deprecated)

public Map<String,String> getMutableUserLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

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 = 5;

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 = 5;

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 = 5;

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 = 5;

Parameter
Name Description
key String
Returns
Type Description
String

hasGroundingSpec()

public boolean hasGroundingSpec()

Configuration of the grounding check.

.google.cloud.discoveryengine.v1alpha.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
boolean

Whether the groundingSpec 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(CheckGroundingRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeGroundingSpec(CheckGroundingSpec value)

public CheckGroundingRequest.Builder mergeGroundingSpec(CheckGroundingSpec value)

Configuration of the grounding check.

.google.cloud.discoveryengine.v1alpha.CheckGroundingSpec grounding_spec = 4;

Parameter
Name Description
value CheckGroundingSpec
Returns
Type Description
CheckGroundingRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllUserLabels(Map<String,String> values)

public CheckGroundingRequest.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 = 5;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
CheckGroundingRequest.Builder

putUserLabels(String key, String value)

public CheckGroundingRequest.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 = 5;

Parameters
Name Description
key String
value String
Returns
Type Description
CheckGroundingRequest.Builder

removeFacts(int index)

public CheckGroundingRequest.Builder removeFacts(int index)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameter
Name Description
index int
Returns
Type Description
CheckGroundingRequest.Builder

removeUserLabels(String key)

public CheckGroundingRequest.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 = 5;

Parameter
Name Description
key String
Returns
Type Description
CheckGroundingRequest.Builder

setAnswerCandidate(String value)

public CheckGroundingRequest.Builder setAnswerCandidate(String value)

Answer candidate to check. Can have a maximum length of 1024 characters.

string answer_candidate = 2;

Parameter
Name Description
value String

The answerCandidate to set.

Returns
Type Description
CheckGroundingRequest.Builder

This builder for chaining.

setAnswerCandidateBytes(ByteString value)

public CheckGroundingRequest.Builder setAnswerCandidateBytes(ByteString value)

Answer candidate to check. Can have a maximum length of 1024 characters.

string answer_candidate = 2;

Parameter
Name Description
value ByteString

The bytes for answerCandidate to set.

Returns
Type Description
CheckGroundingRequest.Builder

This builder for chaining.

setFacts(int index, GroundingFact value)

public CheckGroundingRequest.Builder setFacts(int index, GroundingFact value)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameters
Name Description
index int
value GroundingFact
Returns
Type Description
CheckGroundingRequest.Builder

setFacts(int index, GroundingFact.Builder builderForValue)

public CheckGroundingRequest.Builder setFacts(int index, GroundingFact.Builder builderForValue)

List of facts for the grounding check. We support up to 200 facts.

repeated .google.cloud.discoveryengine.v1alpha.GroundingFact facts = 3;

Parameters
Name Description
index int
builderForValue GroundingFact.Builder
Returns
Type Description
CheckGroundingRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGroundingConfig(String value)

public CheckGroundingRequest.Builder setGroundingConfig(String value)

Required. The resource name of the grounding config, such as projects/*/locations/global/groundingConfigs/default_grounding_config.

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

Parameter
Name Description
value String

The groundingConfig to set.

Returns
Type Description
CheckGroundingRequest.Builder

This builder for chaining.

setGroundingConfigBytes(ByteString value)

public CheckGroundingRequest.Builder setGroundingConfigBytes(ByteString value)

Required. The resource name of the grounding config, such as projects/*/locations/global/groundingConfigs/default_grounding_config.

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

Parameter
Name Description
value ByteString

The bytes for groundingConfig to set.

Returns
Type Description
CheckGroundingRequest.Builder

This builder for chaining.

setGroundingSpec(CheckGroundingSpec value)

public CheckGroundingRequest.Builder setGroundingSpec(CheckGroundingSpec value)

Configuration of the grounding check.

.google.cloud.discoveryengine.v1alpha.CheckGroundingSpec grounding_spec = 4;

Parameter
Name Description
value CheckGroundingSpec
Returns
Type Description
CheckGroundingRequest.Builder

setGroundingSpec(CheckGroundingSpec.Builder builderForValue)

public CheckGroundingRequest.Builder setGroundingSpec(CheckGroundingSpec.Builder builderForValue)

Configuration of the grounding check.

.google.cloud.discoveryengine.v1alpha.CheckGroundingSpec grounding_spec = 4;

Parameter
Name Description
builderForValue CheckGroundingSpec.Builder
Returns
Type Description
CheckGroundingRequest.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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