public static final class QueryDataResponse.Builder extends GeneratedMessage.Builder<QueryDataResponse.Builder> implements QueryDataResponseOrBuilderResponse containing the generated query and related information.
Protobuf type google.cloud.geminidataanalytics.v1beta.QueryDataResponse
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > QueryDataResponse.BuilderImplements
QueryDataResponseOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllDisambiguationQuestion(Iterable<String> values)
public QueryDataResponse.Builder addAllDisambiguationQuestion(Iterable<String> values)If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The disambiguationQuestion to add. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
addDisambiguationQuestion(String value)
public QueryDataResponse.Builder addDisambiguationQuestion(String value)If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe disambiguationQuestion to add. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
addDisambiguationQuestionBytes(ByteString value)
public QueryDataResponse.Builder addDisambiguationQuestionBytes(ByteString value)If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the disambiguationQuestion to add. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
build()
public QueryDataResponse build()| Returns | |
|---|---|
| Type | Description |
QueryDataResponse |
|
buildPartial()
public QueryDataResponse buildPartial()| Returns | |
|---|---|
| Type | Description |
QueryDataResponse |
|
clear()
public QueryDataResponse.Builder clear()| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
clearDisambiguationQuestion()
public QueryDataResponse.Builder clearDisambiguationQuestion()If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
clearGeneratedQuery()
public QueryDataResponse.Builder clearGeneratedQuery()Generated query for the given user prompt.
string generated_query = 1;
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
clearIntentExplanation()
public QueryDataResponse.Builder clearIntentExplanation()A natural language explanation of the generated query. Populated if options.generate_explanation was true in the request.
string intent_explanation = 2;
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
clearNaturalLanguageAnswer()
public QueryDataResponse.Builder clearNaturalLanguageAnswer()A natural language answer to the query, based on the query_result. Populated if options.generate_natural_language_answer was true in the request and query execution was successful based in the response from executeSql API.
string natural_language_answer = 4;
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
clearPipelineDebugInfo()
public QueryDataResponse.Builder clearPipelineDebugInfo()Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object.
.google.protobuf.Struct pipeline_debug_info = 9;
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
clearQueryResult()
public QueryDataResponse.Builder clearQueryResult()The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted.
.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
clearTokenUsage()
public QueryDataResponse.Builder clearTokenUsage()Overall token usage for the request.
.google.cloud.geminidataanalytics.v1beta.TokenUsage token_usage = 10;
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
getDefaultInstanceForType()
public QueryDataResponse getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
QueryDataResponse |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDisambiguationQuestion(int index)
public String getDisambiguationQuestion(int index)If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The disambiguationQuestion at the given index. |
getDisambiguationQuestionBytes(int index)
public ByteString getDisambiguationQuestionBytes(int index)If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the disambiguationQuestion at the given index. |
getDisambiguationQuestionCount()
public int getDisambiguationQuestionCount()If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Returns | |
|---|---|
| Type | Description |
int |
The count of disambiguationQuestion. |
getDisambiguationQuestionList()
public ProtocolStringList getDisambiguationQuestionList()If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the disambiguationQuestion. |
getGeneratedQuery()
public String getGeneratedQuery()Generated query for the given user prompt.
string generated_query = 1;
| Returns | |
|---|---|
| Type | Description |
String |
The generatedQuery. |
getGeneratedQueryBytes()
public ByteString getGeneratedQueryBytes()Generated query for the given user prompt.
string generated_query = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for generatedQuery. |
getIntentExplanation()
public String getIntentExplanation()A natural language explanation of the generated query. Populated if options.generate_explanation was true in the request.
string intent_explanation = 2;
| Returns | |
|---|---|
| Type | Description |
String |
The intentExplanation. |
getIntentExplanationBytes()
public ByteString getIntentExplanationBytes()A natural language explanation of the generated query. Populated if options.generate_explanation was true in the request.
string intent_explanation = 2;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for intentExplanation. |
getNaturalLanguageAnswer()
public String getNaturalLanguageAnswer()A natural language answer to the query, based on the query_result. Populated if options.generate_natural_language_answer was true in the request and query execution was successful based in the response from executeSql API.
string natural_language_answer = 4;
| Returns | |
|---|---|
| Type | Description |
String |
The naturalLanguageAnswer. |
getNaturalLanguageAnswerBytes()
public ByteString getNaturalLanguageAnswerBytes()A natural language answer to the query, based on the query_result. Populated if options.generate_natural_language_answer was true in the request and query execution was successful based in the response from executeSql API.
string natural_language_answer = 4;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for naturalLanguageAnswer. |
getPipelineDebugInfo()
public Struct getPipelineDebugInfo()Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object.
.google.protobuf.Struct pipeline_debug_info = 9;
| Returns | |
|---|---|
| Type | Description |
Struct |
The pipelineDebugInfo. |
getPipelineDebugInfoBuilder()
public Struct.Builder getPipelineDebugInfoBuilder()Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object.
.google.protobuf.Struct pipeline_debug_info = 9;
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getPipelineDebugInfoOrBuilder()
public StructOrBuilder getPipelineDebugInfoOrBuilder()Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object.
.google.protobuf.Struct pipeline_debug_info = 9;
| Returns | |
|---|---|
| Type | Description |
StructOrBuilder |
|
getQueryResult()
public ExecutedQueryResult getQueryResult()The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted.
.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;
| Returns | |
|---|---|
| Type | Description |
ExecutedQueryResult |
The queryResult. |
getQueryResultBuilder()
public ExecutedQueryResult.Builder getQueryResultBuilder()The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted.
.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;
| Returns | |
|---|---|
| Type | Description |
ExecutedQueryResult.Builder |
|
getQueryResultOrBuilder()
public ExecutedQueryResultOrBuilder getQueryResultOrBuilder()The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted.
.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;
| Returns | |
|---|---|
| Type | Description |
ExecutedQueryResultOrBuilder |
|
getTokenUsage()
public TokenUsage getTokenUsage()Overall token usage for the request.
.google.cloud.geminidataanalytics.v1beta.TokenUsage token_usage = 10;
| Returns | |
|---|---|
| Type | Description |
TokenUsage |
The tokenUsage. |
getTokenUsageBuilder()
public TokenUsage.Builder getTokenUsageBuilder()Overall token usage for the request.
.google.cloud.geminidataanalytics.v1beta.TokenUsage token_usage = 10;
| Returns | |
|---|---|
| Type | Description |
TokenUsage.Builder |
|
getTokenUsageOrBuilder()
public TokenUsageOrBuilder getTokenUsageOrBuilder()Overall token usage for the request.
.google.cloud.geminidataanalytics.v1beta.TokenUsage token_usage = 10;
| Returns | |
|---|---|
| Type | Description |
TokenUsageOrBuilder |
|
hasPipelineDebugInfo()
public boolean hasPipelineDebugInfo()Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object.
.google.protobuf.Struct pipeline_debug_info = 9;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the pipelineDebugInfo field is set. |
hasQueryResult()
public boolean hasQueryResult()The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted.
.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the queryResult field is set. |
hasTokenUsage()
public boolean hasTokenUsage()Overall token usage for the request.
.google.cloud.geminidataanalytics.v1beta.TokenUsage token_usage = 10;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the tokenUsage field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(QueryDataResponse other)
public QueryDataResponse.Builder mergeFrom(QueryDataResponse other)| Parameter | |
|---|---|
| Name | Description |
other |
QueryDataResponse |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public QueryDataResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public QueryDataResponse.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
mergePipelineDebugInfo(Struct value)
public QueryDataResponse.Builder mergePipelineDebugInfo(Struct value)Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object.
.google.protobuf.Struct pipeline_debug_info = 9;
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
mergeQueryResult(ExecutedQueryResult value)
public QueryDataResponse.Builder mergeQueryResult(ExecutedQueryResult value)The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted.
.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
ExecutedQueryResult |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
mergeTokenUsage(TokenUsage value)
public QueryDataResponse.Builder mergeTokenUsage(TokenUsage value)Overall token usage for the request.
.google.cloud.geminidataanalytics.v1beta.TokenUsage token_usage = 10;
| Parameter | |
|---|---|
| Name | Description |
value |
TokenUsage |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
setDisambiguationQuestion(int index, String value)
public QueryDataResponse.Builder setDisambiguationQuestion(int index, String value)If ambiguity was detected in the natural language query and options.generate_disambiguation_question was true, this field contains a question to the user for clarification. The returned represents the service's best effort based on the ambiguous input.
repeated string disambiguation_question = 5;
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe disambiguationQuestion to set. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
setGeneratedQuery(String value)
public QueryDataResponse.Builder setGeneratedQuery(String value)Generated query for the given user prompt.
string generated_query = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe generatedQuery to set. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
setGeneratedQueryBytes(ByteString value)
public QueryDataResponse.Builder setGeneratedQueryBytes(ByteString value)Generated query for the given user prompt.
string generated_query = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for generatedQuery to set. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
setIntentExplanation(String value)
public QueryDataResponse.Builder setIntentExplanation(String value)A natural language explanation of the generated query. Populated if options.generate_explanation was true in the request.
string intent_explanation = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe intentExplanation to set. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
setIntentExplanationBytes(ByteString value)
public QueryDataResponse.Builder setIntentExplanationBytes(ByteString value)A natural language explanation of the generated query. Populated if options.generate_explanation was true in the request.
string intent_explanation = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for intentExplanation to set. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
setNaturalLanguageAnswer(String value)
public QueryDataResponse.Builder setNaturalLanguageAnswer(String value)A natural language answer to the query, based on the query_result. Populated if options.generate_natural_language_answer was true in the request and query execution was successful based in the response from executeSql API.
string natural_language_answer = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe naturalLanguageAnswer to set. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
setNaturalLanguageAnswerBytes(ByteString value)
public QueryDataResponse.Builder setNaturalLanguageAnswerBytes(ByteString value)A natural language answer to the query, based on the query_result. Populated if options.generate_natural_language_answer was true in the request and query execution was successful based in the response from executeSql API.
string natural_language_answer = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for naturalLanguageAnswer to set. |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
This builder for chaining. |
setPipelineDebugInfo(Struct value)
public QueryDataResponse.Builder setPipelineDebugInfo(Struct value)Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object.
.google.protobuf.Struct pipeline_debug_info = 9;
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
setPipelineDebugInfo(Struct.Builder builderForValue)
public QueryDataResponse.Builder setPipelineDebugInfo(Struct.Builder builderForValue)Detailed step-by-step pipeline execution information. Populated only if generation_options.generate_debug_info was true. Provided for debugging and transparency purposes only. The structure and content of this object is not guaranteed and may change at any time without notice. Do not write production code or business logic depending on the fields in this object.
.google.protobuf.Struct pipeline_debug_info = 9;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
setQueryResult(ExecutedQueryResult value)
public QueryDataResponse.Builder setQueryResult(ExecutedQueryResult value)The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted.
.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
ExecutedQueryResult |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
setQueryResult(ExecutedQueryResult.Builder builderForValue)
public QueryDataResponse.Builder setQueryResult(ExecutedQueryResult.Builder builderForValue)The result of executing the query. Populated if options.generate_query_result or options.generate_natural_language_answer was true in the request, and execution was successful or attempted.
.google.cloud.geminidataanalytics.v1beta.ExecutedQueryResult query_result = 3;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
ExecutedQueryResult.Builder |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
setTokenUsage(TokenUsage value)
public QueryDataResponse.Builder setTokenUsage(TokenUsage value)Overall token usage for the request.
.google.cloud.geminidataanalytics.v1beta.TokenUsage token_usage = 10;
| Parameter | |
|---|---|
| Name | Description |
value |
TokenUsage |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
setTokenUsage(TokenUsage.Builder builderForValue)
public QueryDataResponse.Builder setTokenUsage(TokenUsage.Builder builderForValue)Overall token usage for the request.
.google.cloud.geminidataanalytics.v1beta.TokenUsage token_usage = 10;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
TokenUsage.Builder |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|