Package com.google.cloud.retail.v2alpha
Class GenerativeQuestionConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GenerativeQuestionConfig.Builder>
com.google.cloud.retail.v2alpha.GenerativeQuestionConfig.Builder
- All Implemented Interfaces:
GenerativeQuestionConfigOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- GenerativeQuestionConfig
public static final class GenerativeQuestionConfig.Builder
extends com.google.protobuf.GeneratedMessage.Builder<GenerativeQuestionConfig.Builder>
implements GenerativeQuestionConfigOrBuilder
Configuration for a single generated question.Protobuf type
google.cloud.retail.v2alpha.GenerativeQuestionConfig-
Method Summary
Modifier and TypeMethodDescriptionaddAllExampleValues(Iterable<String> values) Output only.addExampleValues(String value) Output only.addExampleValuesBytes(com.google.protobuf.ByteString value) Output only.build()clear()Optional.Required.Output only.Required.Optional.Output only.Output only.booleanOptional.Required.com.google.protobuf.ByteStringRequired.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetExampleValues(int index) Output only.com.google.protobuf.ByteStringgetExampleValuesBytes(int index) Output only.intOutput only.com.google.protobuf.ProtocolStringListOutput only.getFacet()Required.com.google.protobuf.ByteStringRequired.Optional.com.google.protobuf.ByteStringOptional.floatOutput only.Output only.com.google.protobuf.ByteStringOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAllowedInConversation(boolean value) Optional.setCatalog(String value) Required.setCatalogBytes(com.google.protobuf.ByteString value) Required.setExampleValues(int index, String value) Output only.Required.setFacetBytes(com.google.protobuf.ByteString value) Required.setFinalQuestion(String value) Optional.setFinalQuestionBytes(com.google.protobuf.ByteString value) Optional.setFrequency(float value) Output only.setGeneratedQuestion(String value) Output only.setGeneratedQuestionBytes(com.google.protobuf.ByteString value) Output only.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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<GenerativeQuestionConfig.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<GenerativeQuestionConfig.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<GenerativeQuestionConfig.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<GenerativeQuestionConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<GenerativeQuestionConfig.Builder>
-
mergeFrom
public GenerativeQuestionConfig.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<GenerativeQuestionConfig.Builder>- Throws:
IOException
-
getCatalog
Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}string catalog = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getCatalogin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The catalog.
-
getCatalogBytes
public com.google.protobuf.ByteString getCatalogBytes()Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}string catalog = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getCatalogBytesin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The bytes for catalog.
-
setCatalog
Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}string catalog = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The catalog to set.- Returns:
- This builder for chaining.
-
clearCatalog
Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}string catalog = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setCatalogBytes
Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}string catalog = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for catalog to set.- Returns:
- This builder for chaining.
-
getFacet
Required. The facet to which the question is associated.
string facet = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getFacetin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The facet.
-
getFacetBytes
public com.google.protobuf.ByteString getFacetBytes()Required. The facet to which the question is associated.
string facet = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getFacetBytesin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The bytes for facet.
-
setFacet
Required. The facet to which the question is associated.
string facet = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The facet to set.- Returns:
- This builder for chaining.
-
clearFacet
Required. The facet to which the question is associated.
string facet = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setFacetBytes
Required. The facet to which the question is associated.
string facet = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for facet to set.- Returns:
- This builder for chaining.
-
getGeneratedQuestion
Output only. The LLM generated question.
string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getGeneratedQuestionin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The generatedQuestion.
-
getGeneratedQuestionBytes
public com.google.protobuf.ByteString getGeneratedQuestionBytes()Output only. The LLM generated question.
string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getGeneratedQuestionBytesin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The bytes for generatedQuestion.
-
setGeneratedQuestion
Output only. The LLM generated question.
string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The generatedQuestion to set.- Returns:
- This builder for chaining.
-
clearGeneratedQuestion
Output only. The LLM generated question.
string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setGeneratedQuestionBytes
public GenerativeQuestionConfig.Builder setGeneratedQuestionBytes(com.google.protobuf.ByteString value) Output only. The LLM generated question.
string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for generatedQuestion to set.- Returns:
- This builder for chaining.
-
getFinalQuestion
Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.
string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getFinalQuestionin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The finalQuestion.
-
getFinalQuestionBytes
public com.google.protobuf.ByteString getFinalQuestionBytes()Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.
string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getFinalQuestionBytesin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The bytes for finalQuestion.
-
setFinalQuestion
Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.
string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The finalQuestion to set.- Returns:
- This builder for chaining.
-
clearFinalQuestion
Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.
string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setFinalQuestionBytes
Optional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.
string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for finalQuestion to set.- Returns:
- This builder for chaining.
-
getExampleValuesList
public com.google.protobuf.ProtocolStringList getExampleValuesList()Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getExampleValuesListin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- A list containing the exampleValues.
-
getExampleValuesCount
public int getExampleValuesCount()Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getExampleValuesCountin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The count of exampleValues.
-
getExampleValues
Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getExampleValuesin interfaceGenerativeQuestionConfigOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The exampleValues at the given index.
-
getExampleValuesBytes
public com.google.protobuf.ByteString getExampleValuesBytes(int index) Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getExampleValuesBytesin interfaceGenerativeQuestionConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the exampleValues at the given index.
-
setExampleValues
Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
index- The index to set the value at.value- The exampleValues to set.- Returns:
- This builder for chaining.
-
addExampleValues
Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The exampleValues to add.- Returns:
- This builder for chaining.
-
addAllExampleValues
Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
values- The exampleValues to add.- Returns:
- This builder for chaining.
-
clearExampleValues
Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
addExampleValuesBytes
Output only. Values that can be used to answer the question.
repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes of the exampleValues to add.- Returns:
- This builder for chaining.
-
getFrequency
public float getFrequency()Output only. The ratio of how often a question was asked.
float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getFrequencyin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The frequency.
-
setFrequency
Output only. The ratio of how often a question was asked.
float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The frequency to set.- Returns:
- This builder for chaining.
-
clearFrequency
Output only. The ratio of how often a question was asked.
float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
getAllowedInConversation
public boolean getAllowedInConversation()Optional. Whether the question is asked at serving time.
bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAllowedInConversationin interfaceGenerativeQuestionConfigOrBuilder- Returns:
- The allowedInConversation.
-
setAllowedInConversation
Optional. Whether the question is asked at serving time.
bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The allowedInConversation to set.- Returns:
- This builder for chaining.
-
clearAllowedInConversation
Optional. Whether the question is asked at serving time.
bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-