Class GenerativeQuestionConfig (2.54.0)

public final class GenerativeQuestionConfig extends GeneratedMessageV3 implements GenerativeQuestionConfigOrBuilder

Configuration for a single generated question.

Protobuf type google.cloud.retail.v2.GenerativeQuestionConfig

Static Fields

ALLOWED_IN_CONVERSATION_FIELD_NUMBER

public static final int ALLOWED_IN_CONVERSATION_FIELD_NUMBER
Field Value
Type Description
int

CATALOG_FIELD_NUMBER

public static final int CATALOG_FIELD_NUMBER
Field Value
Type Description
int

EXAMPLE_VALUES_FIELD_NUMBER

public static final int EXAMPLE_VALUES_FIELD_NUMBER
Field Value
Type Description
int

FACET_FIELD_NUMBER

public static final int FACET_FIELD_NUMBER
Field Value
Type Description
int

FINAL_QUESTION_FIELD_NUMBER

public static final int FINAL_QUESTION_FIELD_NUMBER
Field Value
Type Description
int

FREQUENCY_FIELD_NUMBER

public static final int FREQUENCY_FIELD_NUMBER
Field Value
Type Description
int

GENERATED_QUESTION_FIELD_NUMBER

public static final int GENERATED_QUESTION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static GenerativeQuestionConfig getDefaultInstance()
Returns
Type Description
GenerativeQuestionConfig

getDescriptor()

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

newBuilder()

public static GenerativeQuestionConfig.Builder newBuilder()
Returns
Type Description
GenerativeQuestionConfig.Builder

newBuilder(GenerativeQuestionConfig prototype)

public static GenerativeQuestionConfig.Builder newBuilder(GenerativeQuestionConfig prototype)
Parameter
Name Description
prototype GenerativeQuestionConfig
Returns
Type Description
GenerativeQuestionConfig.Builder

parseDelimitedFrom(InputStream input)

public static GenerativeQuestionConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerativeQuestionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static GenerativeQuestionConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static GenerativeQuestionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static GenerativeQuestionConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static GenerativeQuestionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static GenerativeQuestionConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerativeQuestionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static GenerativeQuestionConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static GenerativeQuestionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static GenerativeQuestionConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static GenerativeQuestionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerativeQuestionConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<GenerativeQuestionConfig> parser()
Returns
Type Description
Parser<GenerativeQuestionConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

getParserForType()

public Parser<GenerativeQuestionConfig> getParserForType()
Returns
Type Description
Parser<GenerativeQuestionConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public GenerativeQuestionConfig.Builder newBuilderForType()
Returns
Type Description
GenerativeQuestionConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected GenerativeQuestionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
GenerativeQuestionConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public GenerativeQuestionConfig.Builder toBuilder()
Returns
Type Description
GenerativeQuestionConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException