Class CheckGroundingRequest.Builder (0.38.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.v1beta.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.v1beta.GroundingFact facts = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.

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.v1beta.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.v1beta.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

clone()

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

getAnswerCandidate()

public String getAnswerCandidate()

Answer candidate to check.

string answer_candidate = 2;

Returns
Type Description
String

The answerCandidate.

getAnswerCandidateBytes()

public ByteString getAnswerCandidateBytes()

Answer candidate to check.

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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.GroundingFact facts = 3;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.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.v1beta.CheckGroundingSpec grounding_spec = 4;

Returns
Type Description
CheckGroundingSpec

The groundingSpec.

getGroundingSpecBuilder()

public CheckGroundingSpec.Builder getGroundingSpecBuilder()

Configuration of the grounding check.

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

Returns
Type Description
CheckGroundingSpec.Builder

getGroundingSpecOrBuilder()

public CheckGroundingSpecOrBuilder getGroundingSpecOrBuilder()

Configuration of the grounding check.

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

Returns
Type Description
CheckGroundingSpecOrBuilder

hasGroundingSpec()

public boolean hasGroundingSpec()

Configuration of the grounding check.

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

Returns
Type Description
boolean

Whether the groundingSpec field is set.

internalGetFieldAccessorTable()

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

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.v1beta.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

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.v1beta.GroundingFact facts = 3;

Parameter
Name Description
index int
Returns
Type Description
CheckGroundingRequest.Builder

setAnswerCandidate(String value)

public CheckGroundingRequest.Builder setAnswerCandidate(String value)

Answer candidate to check.

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.

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.v1beta.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.v1beta.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.v1beta.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.v1beta.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