Class GenerativeQuestionConfig.Builder (2.54.0)

public static final class GenerativeQuestionConfig.Builder extends GeneratedMessageV3.Builder<GenerativeQuestionConfig.Builder> implements GenerativeQuestionConfigOrBuilder

Configuration for a single generated question.

Protobuf type google.cloud.retail.v2.GenerativeQuestionConfig

Static Methods

getDescriptor()

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

Methods

addAllExampleValues(Iterable<String> values)

public GenerativeQuestionConfig.Builder addAllExampleValues(Iterable<String> values)

Output only. Values that can be used to answer the question.

repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<String>

The exampleValues to add.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

addExampleValues(String value)

public GenerativeQuestionConfig.Builder addExampleValues(String value)

Output only. Values that can be used to answer the question.

repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The exampleValues to add.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

addExampleValuesBytes(ByteString value)

public GenerativeQuestionConfig.Builder addExampleValuesBytes(ByteString value)

Output only. Values that can be used to answer the question.

repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes of the exampleValues to add.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public GenerativeQuestionConfig build()
Returns
Type Description
GenerativeQuestionConfig

buildPartial()

public GenerativeQuestionConfig buildPartial()
Returns
Type Description
GenerativeQuestionConfig

clear()

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

clearAllowedInConversation()

public GenerativeQuestionConfig.Builder clearAllowedInConversation()

Optional. Whether the question is asked at serving time.

bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

clearCatalog()

public GenerativeQuestionConfig.Builder clearCatalog()

Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}

string catalog = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

clearExampleValues()

public GenerativeQuestionConfig.Builder clearExampleValues()

Output only. Values that can be used to answer the question.

repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

clearFacet()

public GenerativeQuestionConfig.Builder clearFacet()

Required. The facet to which the question is associated.

string facet = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearFinalQuestion()

public GenerativeQuestionConfig.Builder 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
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

clearFrequency()

public GenerativeQuestionConfig.Builder clearFrequency()

Output only. The ratio of how often a question was asked.

float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

clearGeneratedQuestion()

public GenerativeQuestionConfig.Builder clearGeneratedQuestion()

Output only. The LLM generated question.

string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAllowedInConversation()

public boolean getAllowedInConversation()

Optional. Whether the question is asked at serving time.

bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The allowedInConversation.

getCatalog()

public String getCatalog()

Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}

string catalog = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The catalog.

getCatalogBytes()

public ByteString getCatalogBytes()

Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}

string catalog = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for catalog.

getDefaultInstanceForType()

public GenerativeQuestionConfig getDefaultInstanceForType()
Returns
Type Description
GenerativeQuestionConfig

getDescriptorForType()

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

getExampleValues(int index)

public String getExampleValues(int index)

Output only. Values that can be used to answer the question.

repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The exampleValues at the given index.

getExampleValuesBytes(int index)

public 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];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the exampleValues at the given index.

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];

Returns
Type Description
int

The count of exampleValues.

getExampleValuesList()

public ProtocolStringList getExampleValuesList()

Output only. Values that can be used to answer the question.

repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the exampleValues.

getFacet()

public String getFacet()

Required. The facet to which the question is associated.

string facet = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The facet.

getFacetBytes()

public ByteString getFacetBytes()

Required. The facet to which the question is associated.

string facet = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for facet.

getFinalQuestion()

public String 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];

Returns
Type Description
String

The finalQuestion.

getFinalQuestionBytes()

public 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];

Returns
Type Description
ByteString

The bytes for finalQuestion.

getFrequency()

public float getFrequency()

Output only. The ratio of how often a question was asked.

float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
float

The frequency.

getGeneratedQuestion()

public String getGeneratedQuestion()

Output only. The LLM generated question.

string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The generatedQuestion.

getGeneratedQuestionBytes()

public ByteString getGeneratedQuestionBytes()

Output only. The LLM generated question.

string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for generatedQuestion.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GenerativeQuestionConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAllowedInConversation(boolean value)

public GenerativeQuestionConfig.Builder setAllowedInConversation(boolean value)

Optional. Whether the question is asked at serving time.

bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The allowedInConversation to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setCatalog(String value)

public GenerativeQuestionConfig.Builder setCatalog(String value)

Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}

string catalog = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The catalog to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setCatalogBytes(ByteString value)

public GenerativeQuestionConfig.Builder setCatalogBytes(ByteString value)

Required. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}

string catalog = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for catalog to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setExampleValues(int index, String value)

public GenerativeQuestionConfig.Builder setExampleValues(int index, String value)

Output only. Values that can be used to answer the question.

repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int

The index to set the value at.

value String

The exampleValues to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setFacet(String value)

public GenerativeQuestionConfig.Builder setFacet(String value)

Required. The facet to which the question is associated.

string facet = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The facet to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setFacetBytes(ByteString value)

public GenerativeQuestionConfig.Builder setFacetBytes(ByteString value)

Required. The facet to which the question is associated.

string facet = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for facet to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setFinalQuestion(String value)

public GenerativeQuestionConfig.Builder setFinalQuestion(String value)

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];

Parameter
Name Description
value String

The finalQuestion to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setFinalQuestionBytes(ByteString value)

public GenerativeQuestionConfig.Builder setFinalQuestionBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for finalQuestion to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setFrequency(float value)

public GenerativeQuestionConfig.Builder setFrequency(float value)

Output only. The ratio of how often a question was asked.

float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value float

The frequency to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setGeneratedQuestion(String value)

public GenerativeQuestionConfig.Builder setGeneratedQuestion(String value)

Output only. The LLM generated question.

string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The generatedQuestion to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

setGeneratedQuestionBytes(ByteString value)

public GenerativeQuestionConfig.Builder setGeneratedQuestionBytes(ByteString value)

Output only. The LLM generated question.

string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for generatedQuestion to set.

Returns
Type Description
GenerativeQuestionConfig.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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