public static final class QueryDataResponse.Builder extends GeneratedMessageV3.Builder<QueryDataResponse.Builder> implements QueryDataResponseOrBuilderResponse containing the generated query and related information.
Protobuf type google.cloud.geminidataanalytics.v1beta.QueryDataResponse
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.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. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public QueryDataResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
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. |
clearField(Descriptors.FieldDescriptor field)
public QueryDataResponse.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
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. |
clearOneof(Descriptors.OneofDescriptor oneof)
public QueryDataResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| 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 |
|
clone()
public QueryDataResponse.Builder clone()| 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. |
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 |
|
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. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.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 |
|
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 |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final QueryDataResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| 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. |
setField(Descriptors.FieldDescriptor field, Object value)
public QueryDataResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
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. |
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 |
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public QueryDataResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
public final QueryDataResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
QueryDataResponse.Builder |
|