Class ExampleQuery.Builder (0.1.0)

public static final class ExampleQuery.Builder extends GeneratedMessageV3.Builder<ExampleQuery.Builder> implements ExampleQueryOrBuilder

Example of relevant and commonly used SQL query and its corresponding natural language queries optionally present.

Protobuf type google.cloud.geminidataanalytics.v1beta.ExampleQuery

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ExampleQuery build()
Returns
Type Description
ExampleQuery

buildPartial()

public ExampleQuery buildPartial()
Returns
Type Description
ExampleQuery

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearNaturalLanguageQuestion()

public ExampleQuery.Builder clearNaturalLanguageQuestion()

Optional. A natural language question that a user might ask. For example: "How many orders were placed last month?"

string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ExampleQuery.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearQuery()

public ExampleQuery.Builder clearQuery()
Returns
Type Description
ExampleQuery.Builder

clearSqlQuery()

public ExampleQuery.Builder clearSqlQuery()

Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'"

string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ExampleQuery.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public ExampleQuery getDefaultInstanceForType()
Returns
Type Description
ExampleQuery

getDescriptorForType()

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

getNaturalLanguageQuestion()

public String getNaturalLanguageQuestion()

Optional. A natural language question that a user might ask. For example: "How many orders were placed last month?"

string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The naturalLanguageQuestion.

getNaturalLanguageQuestionBytes()

public ByteString getNaturalLanguageQuestionBytes()

Optional. A natural language question that a user might ask. For example: "How many orders were placed last month?"

string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for naturalLanguageQuestion.

getQueryCase()

public ExampleQuery.QueryCase getQueryCase()
Returns
Type Description
ExampleQuery.QueryCase

getSqlQuery()

public String getSqlQuery()

Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'"

string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The sqlQuery.

getSqlQueryBytes()

public ByteString getSqlQueryBytes()

Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'"

string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for sqlQuery.

hasSqlQuery()

public boolean hasSqlQuery()

Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'"

string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the sqlQuery field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ExampleQuery other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setNaturalLanguageQuestion(String value)

public ExampleQuery.Builder setNaturalLanguageQuestion(String value)

Optional. A natural language question that a user might ask. For example: "How many orders were placed last month?"

string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The naturalLanguageQuestion to set.

Returns
Type Description
ExampleQuery.Builder

This builder for chaining.

setNaturalLanguageQuestionBytes(ByteString value)

public ExampleQuery.Builder setNaturalLanguageQuestionBytes(ByteString value)

Optional. A natural language question that a user might ask. For example: "How many orders were placed last month?"

string natural_language_question = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for naturalLanguageQuestion to set.

Returns
Type Description
ExampleQuery.Builder

This builder for chaining.

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

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

setSqlQuery(String value)

public ExampleQuery.Builder setSqlQuery(String value)

Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'"

string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The sqlQuery to set.

Returns
Type Description
ExampleQuery.Builder

This builder for chaining.

setSqlQueryBytes(ByteString value)

public ExampleQuery.Builder setSqlQueryBytes(ByteString value)

Optional. The SQL query that should be generated to answer the natural language question. For example: "SELECT COUNT(*) FROM orders WHERE order_date BETWEEN '2024-01-01' AND '2024-01-31'"

string sql_query = 101 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for sqlQuery to set.

Returns
Type Description
ExampleQuery.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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