Class AnswerQueryRequest.AnswerGenerationSpec (0.38.0)

public static final class AnswerQueryRequest.AnswerGenerationSpec extends GeneratedMessageV3 implements AnswerQueryRequest.AnswerGenerationSpecOrBuilder

Answer generation specification.

Protobuf type google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > AnswerQueryRequest.AnswerGenerationSpec

Static Fields

ANSWER_LANGUAGE_CODE_FIELD_NUMBER

public static final int ANSWER_LANGUAGE_CODE_FIELD_NUMBER
Field Value
Type Description
int

IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER

public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER
Field Value
Type Description
int

IGNORE_NON_ANSWER_SEEKING_QUERY_FIELD_NUMBER

public static final int IGNORE_NON_ANSWER_SEEKING_QUERY_FIELD_NUMBER
Field Value
Type Description
int

INCLUDE_CITATIONS_FIELD_NUMBER

public static final int INCLUDE_CITATIONS_FIELD_NUMBER
Field Value
Type Description
int

MODEL_SPEC_FIELD_NUMBER

public static final int MODEL_SPEC_FIELD_NUMBER
Field Value
Type Description
int

PROMPT_SPEC_FIELD_NUMBER

public static final int PROMPT_SPEC_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AnswerQueryRequest.AnswerGenerationSpec getDefaultInstance()
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec

getDescriptor()

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

newBuilder()

public static AnswerQueryRequest.AnswerGenerationSpec.Builder newBuilder()
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec.Builder

newBuilder(AnswerQueryRequest.AnswerGenerationSpec prototype)

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

parseDelimitedFrom(InputStream input)

public static AnswerQueryRequest.AnswerGenerationSpec parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

public static AnswerQueryRequest.AnswerGenerationSpec parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

public static Parser<AnswerQueryRequest.AnswerGenerationSpec> parser()
Returns
Type Description
Parser<AnswerGenerationSpec>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAnswerLanguageCode()

public String getAnswerLanguageCode()

Language code for Answer. Use language tags defined by BCP47. Note: This is an experimental feature.

string answer_language_code = 4;

Returns
Type Description
String

The answerLanguageCode.

getAnswerLanguageCodeBytes()

public ByteString getAnswerLanguageCodeBytes()

Language code for Answer. Use language tags defined by BCP47. Note: This is an experimental feature.

string answer_language_code = 4;

Returns
Type Description
ByteString

The bytes for answerLanguageCode.

getDefaultInstanceForType()

public AnswerQueryRequest.AnswerGenerationSpec getDefaultInstanceForType()
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec

getIgnoreAdversarialQuery()

public boolean getIgnoreAdversarialQuery()

Specifies whether to filter out adversarial queries. The default value is false.

Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to true, we skip generating answers for adversarial queries and return fallback messages instead.

bool ignore_adversarial_query = 5;

Returns
Type Description
boolean

The ignoreAdversarialQuery.

getIgnoreNonAnswerSeekingQuery()

public boolean getIgnoreNonAnswerSeekingQuery()

Specifies whether to filter out queries that are not answer-seeking. The default value is false.

Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to true, we skip generating answers for non-answer seeking queries and return fallback messages instead.

bool ignore_non_answer_seeking_query = 6;

Returns
Type Description
boolean

The ignoreNonAnswerSeekingQuery.

getIncludeCitations()

public boolean getIncludeCitations()

Specifies whether to include citation metadata in the answer. The default value is false.

bool include_citations = 3;

Returns
Type Description
boolean

The includeCitations.

getModelSpec()

public AnswerQueryRequest.AnswerGenerationSpec.ModelSpec getModelSpec()

Answer generation model specification.

.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1;

Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec.ModelSpec

The modelSpec.

getModelSpecOrBuilder()

public AnswerQueryRequest.AnswerGenerationSpec.ModelSpecOrBuilder getModelSpecOrBuilder()

Answer generation model specification.

.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1;

Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec.ModelSpecOrBuilder

getParserForType()

public Parser<AnswerQueryRequest.AnswerGenerationSpec> getParserForType()
Returns
Type Description
Parser<AnswerGenerationSpec>
Overrides

getPromptSpec()

public AnswerQueryRequest.AnswerGenerationSpec.PromptSpec getPromptSpec()

Answer generation prompt specification.

.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2;

Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec.PromptSpec

The promptSpec.

getPromptSpecOrBuilder()

public AnswerQueryRequest.AnswerGenerationSpec.PromptSpecOrBuilder getPromptSpecOrBuilder()

Answer generation prompt specification.

.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2;

Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec.PromptSpecOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasModelSpec()

public boolean hasModelSpec()

Answer generation model specification.

.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1;

Returns
Type Description
boolean

Whether the modelSpec field is set.

hasPromptSpec()

public boolean hasPromptSpec()

Answer generation prompt specification.

.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2;

Returns
Type Description
boolean

Whether the promptSpec field is set.

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 AnswerQueryRequest.AnswerGenerationSpec.Builder newBuilderForType()
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public AnswerQueryRequest.AnswerGenerationSpec.Builder toBuilder()
Returns
Type Description
AnswerQueryRequest.AnswerGenerationSpec.Builder

writeTo(CodedOutputStream output)

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