Class CheckGroundingRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CheckGroundingRequest.Builder>
com.google.cloud.discoveryengine.v1beta.CheckGroundingRequest.Builder
- All Implemented Interfaces:
CheckGroundingRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- CheckGroundingRequest
public static final class CheckGroundingRequest.Builder
extends com.google.protobuf.GeneratedMessage.Builder<CheckGroundingRequest.Builder>
implements CheckGroundingRequestOrBuilder
Request message for [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding] method.Protobuf type
google.cloud.discoveryengine.v1beta.CheckGroundingRequest-
Method Summary
Modifier and TypeMethodDescriptionaddAllFacts(Iterable<? extends GroundingFact> values) List of facts for the grounding check.addFacts(int index, GroundingFact value) List of facts for the grounding check.addFacts(int index, GroundingFact.Builder builderForValue) List of facts for the grounding check.addFacts(GroundingFact value) List of facts for the grounding check.addFacts(GroundingFact.Builder builderForValue) List of facts for the grounding check.List of facts for the grounding check.addFactsBuilder(int index) List of facts for the grounding check.build()clear()Answer candidate to check.List of facts for the grounding check.Required.Configuration of the grounding check.booleancontainsUserLabels(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 64Answer candidate to check.com.google.protobuf.ByteStringAnswer candidate to check.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetFacts(int index) List of facts for the grounding check.getFactsBuilder(int index) List of facts for the grounding check.List of facts for the grounding check.intList of facts for the grounding check.List of facts for the grounding check.getFactsOrBuilder(int index) List of facts for the grounding check.List<? extends GroundingFactOrBuilder>List of facts for the grounding check.Required.com.google.protobuf.ByteStringRequired.Configuration of the grounding check.Configuration of the grounding check.Configuration of the grounding check.Deprecated.Deprecated.intThe user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64getUserLabelsOrDefault(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 64The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64booleanConfiguration of the grounding check.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(CheckGroundingRequest other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Configuration of the grounding check.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 64putUserLabels(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 64removeFacts(int index) List of facts for the grounding check.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 64setAnswerCandidate(String value) Answer candidate to check.setAnswerCandidateBytes(com.google.protobuf.ByteString value) Answer candidate to check.setFacts(int index, GroundingFact value) List of facts for the grounding check.setFacts(int index, GroundingFact.Builder builderForValue) List of facts for the grounding check.setGroundingConfig(String value) Required.setGroundingConfigBytes(com.google.protobuf.ByteString value) Required.Configuration of the grounding check.setGroundingSpec(CheckGroundingSpec.Builder builderForValue) Configuration of the grounding check.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingRequest.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingRequest.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CheckGroundingRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingRequest.Builder>
-
mergeFrom
public CheckGroundingRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CheckGroundingRequest.Builder>- Throws:
IOException
-
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) = { ... }- Specified by:
getGroundingConfigin interfaceCheckGroundingRequestOrBuilder- Returns:
- The groundingConfig.
-
getGroundingConfigBytes
public com.google.protobuf.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) = { ... }- Specified by:
getGroundingConfigBytesin interfaceCheckGroundingRequestOrBuilder- Returns:
- The bytes for groundingConfig.
-
setGroundingConfig
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) = { ... }- Parameters:
value- The groundingConfig to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setGroundingConfigBytes
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) = { ... }- Parameters:
value- The bytes for groundingConfig to set.- Returns:
- This builder for chaining.
-
getAnswerCandidate
Answer candidate to check. It can have a maximum length of 4096 tokens.
string answer_candidate = 2;- Specified by:
getAnswerCandidatein interfaceCheckGroundingRequestOrBuilder- Returns:
- The answerCandidate.
-
getAnswerCandidateBytes
public com.google.protobuf.ByteString getAnswerCandidateBytes()Answer candidate to check. It can have a maximum length of 4096 tokens.
string answer_candidate = 2;- Specified by:
getAnswerCandidateBytesin interfaceCheckGroundingRequestOrBuilder- Returns:
- The bytes for answerCandidate.
-
setAnswerCandidate
Answer candidate to check. It can have a maximum length of 4096 tokens.
string answer_candidate = 2;- Parameters:
value- The answerCandidate to set.- Returns:
- This builder for chaining.
-
clearAnswerCandidate
Answer candidate to check. It can have a maximum length of 4096 tokens.
string answer_candidate = 2;- Returns:
- This builder for chaining.
-
setAnswerCandidateBytes
Answer candidate to check. It can have a maximum length of 4096 tokens.
string answer_candidate = 2;- Parameters:
value- The bytes for answerCandidate to set.- Returns:
- This builder for chaining.
-
getFactsList
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;- Specified by:
getFactsListin interfaceCheckGroundingRequestOrBuilder
-
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;- Specified by:
getFactsCountin interfaceCheckGroundingRequestOrBuilder
-
getFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;- Specified by:
getFactsin interfaceCheckGroundingRequestOrBuilder
-
setFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
setFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
addFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
addFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
addFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
addFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
addAllFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
clearFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
removeFacts
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
getFactsBuilder
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
getFactsOrBuilder
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;- Specified by:
getFactsOrBuilderin interfaceCheckGroundingRequestOrBuilder
-
getFactsOrBuilderList
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3;- Specified by:
getFactsOrBuilderListin interfaceCheckGroundingRequestOrBuilder
-
addFactsBuilder
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
addFactsBuilder
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
getFactsBuilderList
List of facts for the grounding check. We support up to 200 facts.
repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; -
hasGroundingSpec
public boolean hasGroundingSpec()Configuration of the grounding check.
.google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4;- Specified by:
hasGroundingSpecin interfaceCheckGroundingRequestOrBuilder- Returns:
- Whether the groundingSpec field is set.
-
getGroundingSpec
Configuration of the grounding check.
.google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4;- Specified by:
getGroundingSpecin interfaceCheckGroundingRequestOrBuilder- Returns:
- The groundingSpec.
-
setGroundingSpec
Configuration of the grounding check.
.google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4; -
setGroundingSpec
Configuration of the grounding check.
.google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4; -
mergeGroundingSpec
Configuration of the grounding check.
.google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4; -
clearGroundingSpec
Configuration of the grounding check.
.google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4; -
getGroundingSpecBuilder
Configuration of the grounding check.
.google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4; -
getGroundingSpecOrBuilder
Configuration of the grounding check.
.google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4;- Specified by:
getGroundingSpecOrBuilderin interfaceCheckGroundingRequestOrBuilder
-
getUserLabelsCount
public int getUserLabelsCount()Description copied from interface:CheckGroundingRequestOrBuilderThe 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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 5;- Specified by:
getUserLabelsCountin interfaceCheckGroundingRequestOrBuilder
-
containsUserLabels
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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 5;- Specified by:
containsUserLabelsin interfaceCheckGroundingRequestOrBuilder
-
getUserLabels
Deprecated.UsegetUserLabelsMap()instead.- Specified by:
getUserLabelsin interfaceCheckGroundingRequestOrBuilder
-
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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 5;- Specified by:
getUserLabelsMapin interfaceCheckGroundingRequestOrBuilder
-
getUserLabelsOrDefault
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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 5;- Specified by:
getUserLabelsOrDefaultin interfaceCheckGroundingRequestOrBuilder
-
getUserLabelsOrThrow
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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 5;- Specified by:
getUserLabelsOrThrowin interfaceCheckGroundingRequestOrBuilder
-
clearUserLabels
-
removeUserLabels
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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 5; -
getMutableUserLabels
Deprecated.Use alternate mutation accessors instead. -
putUserLabels
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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 5; -
putAllUserLabels
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](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
map<string, string> user_labels = 5;
-