Class TranslateQueryResponse.Builder (0.55.0)

public static final class TranslateQueryResponse.Builder extends GeneratedMessageV3.Builder<TranslateQueryResponse.Builder> implements TranslateQueryResponseOrBuilder

The response of translating a SQL query to Standard SQL.

Protobuf type google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse

Static Methods

getDescriptor()

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

Methods

addAllErrors(Iterable<? extends SqlTranslationError> values)

public TranslateQueryResponse.Builder addAllErrors(Iterable<? extends SqlTranslationError> values)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.bigquery.migration.v2alpha.SqlTranslationError>
Returns
Type Description
TranslateQueryResponse.Builder

addAllWarnings(Iterable<? extends SqlTranslationWarning> values)

public TranslateQueryResponse.Builder addAllWarnings(Iterable<? extends SqlTranslationWarning> values)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning>
Returns
Type Description
TranslateQueryResponse.Builder

addErrors(SqlTranslationError value)

public TranslateQueryResponse.Builder addErrors(SqlTranslationError value)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameter
Name Description
value SqlTranslationError
Returns
Type Description
TranslateQueryResponse.Builder

addErrors(SqlTranslationError.Builder builderForValue)

public TranslateQueryResponse.Builder addErrors(SqlTranslationError.Builder builderForValue)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameter
Name Description
builderForValue SqlTranslationError.Builder
Returns
Type Description
TranslateQueryResponse.Builder

addErrors(int index, SqlTranslationError value)

public TranslateQueryResponse.Builder addErrors(int index, SqlTranslationError value)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameters
Name Description
index int
value SqlTranslationError
Returns
Type Description
TranslateQueryResponse.Builder

addErrors(int index, SqlTranslationError.Builder builderForValue)

public TranslateQueryResponse.Builder addErrors(int index, SqlTranslationError.Builder builderForValue)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameters
Name Description
index int
builderForValue SqlTranslationError.Builder
Returns
Type Description
TranslateQueryResponse.Builder

addErrorsBuilder()

public SqlTranslationError.Builder addErrorsBuilder()

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Returns
Type Description
SqlTranslationError.Builder

addErrorsBuilder(int index)

public SqlTranslationError.Builder addErrorsBuilder(int index)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameter
Name Description
index int
Returns
Type Description
SqlTranslationError.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addWarnings(SqlTranslationWarning value)

public TranslateQueryResponse.Builder addWarnings(SqlTranslationWarning value)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameter
Name Description
value SqlTranslationWarning
Returns
Type Description
TranslateQueryResponse.Builder

addWarnings(SqlTranslationWarning.Builder builderForValue)

public TranslateQueryResponse.Builder addWarnings(SqlTranslationWarning.Builder builderForValue)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameter
Name Description
builderForValue SqlTranslationWarning.Builder
Returns
Type Description
TranslateQueryResponse.Builder

addWarnings(int index, SqlTranslationWarning value)

public TranslateQueryResponse.Builder addWarnings(int index, SqlTranslationWarning value)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameters
Name Description
index int
value SqlTranslationWarning
Returns
Type Description
TranslateQueryResponse.Builder

addWarnings(int index, SqlTranslationWarning.Builder builderForValue)

public TranslateQueryResponse.Builder addWarnings(int index, SqlTranslationWarning.Builder builderForValue)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameters
Name Description
index int
builderForValue SqlTranslationWarning.Builder
Returns
Type Description
TranslateQueryResponse.Builder

addWarningsBuilder()

public SqlTranslationWarning.Builder addWarningsBuilder()

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Returns
Type Description
SqlTranslationWarning.Builder

addWarningsBuilder(int index)

public SqlTranslationWarning.Builder addWarningsBuilder(int index)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameter
Name Description
index int
Returns
Type Description
SqlTranslationWarning.Builder

build()

public TranslateQueryResponse build()
Returns
Type Description
TranslateQueryResponse

buildPartial()

public TranslateQueryResponse buildPartial()
Returns
Type Description
TranslateQueryResponse

clear()

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

clearErrors()

public TranslateQueryResponse.Builder clearErrors()

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Returns
Type Description
TranslateQueryResponse.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTranslatedQuery()

public TranslateQueryResponse.Builder clearTranslatedQuery()

The translated result. This will be empty if the translation fails.

string translated_query = 1;

Returns
Type Description
TranslateQueryResponse.Builder

This builder for chaining.

clearTranslationJob()

public TranslateQueryResponse.Builder clearTranslationJob()

Output only. Immutable. The unique identifier for the SQL translation job. Example: projects/123/locations/us/translation/1234

string translation_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
TranslateQueryResponse.Builder

This builder for chaining.

clearWarnings()

public TranslateQueryResponse.Builder clearWarnings()

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Returns
Type Description
TranslateQueryResponse.Builder

clone()

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

getDefaultInstanceForType()

public TranslateQueryResponse getDefaultInstanceForType()
Returns
Type Description
TranslateQueryResponse

getDescriptorForType()

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

getErrors(int index)

public SqlTranslationError getErrors(int index)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameter
Name Description
index int
Returns
Type Description
SqlTranslationError

getErrorsBuilder(int index)

public SqlTranslationError.Builder getErrorsBuilder(int index)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameter
Name Description
index int
Returns
Type Description
SqlTranslationError.Builder

getErrorsBuilderList()

public List<SqlTranslationError.Builder> getErrorsBuilderList()

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Returns
Type Description
List<Builder>

getErrorsCount()

public int getErrorsCount()

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Returns
Type Description
int

getErrorsList()

public List<SqlTranslationError> getErrorsList()

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Returns
Type Description
List<SqlTranslationError>

getErrorsOrBuilder(int index)

public SqlTranslationErrorOrBuilder getErrorsOrBuilder(int index)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameter
Name Description
index int
Returns
Type Description
SqlTranslationErrorOrBuilder

getErrorsOrBuilderList()

public List<? extends SqlTranslationErrorOrBuilder> getErrorsOrBuilderList()

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Returns
Type Description
List<? extends com.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorOrBuilder>

getTranslatedQuery()

public String getTranslatedQuery()

The translated result. This will be empty if the translation fails.

string translated_query = 1;

Returns
Type Description
String

The translatedQuery.

getTranslatedQueryBytes()

public ByteString getTranslatedQueryBytes()

The translated result. This will be empty if the translation fails.

string translated_query = 1;

Returns
Type Description
ByteString

The bytes for translatedQuery.

getTranslationJob()

public String getTranslationJob()

Output only. Immutable. The unique identifier for the SQL translation job. Example: projects/123/locations/us/translation/1234

string translation_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The translationJob.

getTranslationJobBytes()

public ByteString getTranslationJobBytes()

Output only. Immutable. The unique identifier for the SQL translation job. Example: projects/123/locations/us/translation/1234

string translation_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for translationJob.

getWarnings(int index)

public SqlTranslationWarning getWarnings(int index)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameter
Name Description
index int
Returns
Type Description
SqlTranslationWarning

getWarningsBuilder(int index)

public SqlTranslationWarning.Builder getWarningsBuilder(int index)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameter
Name Description
index int
Returns
Type Description
SqlTranslationWarning.Builder

getWarningsBuilderList()

public List<SqlTranslationWarning.Builder> getWarningsBuilderList()

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Returns
Type Description
List<Builder>

getWarningsCount()

public int getWarningsCount()

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Returns
Type Description
int

getWarningsList()

public List<SqlTranslationWarning> getWarningsList()

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Returns
Type Description
List<SqlTranslationWarning>

getWarningsOrBuilder(int index)

public SqlTranslationWarningOrBuilder getWarningsOrBuilder(int index)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameter
Name Description
index int
Returns
Type Description
SqlTranslationWarningOrBuilder

getWarningsOrBuilderList()

public List<? extends SqlTranslationWarningOrBuilder> getWarningsOrBuilderList()

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Returns
Type Description
List<? extends com.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarningOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TranslateQueryResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeErrors(int index)

public TranslateQueryResponse.Builder removeErrors(int index)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameter
Name Description
index int
Returns
Type Description
TranslateQueryResponse.Builder

removeWarnings(int index)

public TranslateQueryResponse.Builder removeWarnings(int index)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameter
Name Description
index int
Returns
Type Description
TranslateQueryResponse.Builder

setErrors(int index, SqlTranslationError value)

public TranslateQueryResponse.Builder setErrors(int index, SqlTranslationError value)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameters
Name Description
index int
value SqlTranslationError
Returns
Type Description
TranslateQueryResponse.Builder

setErrors(int index, SqlTranslationError.Builder builderForValue)

public TranslateQueryResponse.Builder setErrors(int index, SqlTranslationError.Builder builderForValue)

The list of errors encountered during the translation, if present.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationError errors = 2;

Parameters
Name Description
index int
builderForValue SqlTranslationError.Builder
Returns
Type Description
TranslateQueryResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setTranslatedQuery(String value)

public TranslateQueryResponse.Builder setTranslatedQuery(String value)

The translated result. This will be empty if the translation fails.

string translated_query = 1;

Parameter
Name Description
value String

The translatedQuery to set.

Returns
Type Description
TranslateQueryResponse.Builder

This builder for chaining.

setTranslatedQueryBytes(ByteString value)

public TranslateQueryResponse.Builder setTranslatedQueryBytes(ByteString value)

The translated result. This will be empty if the translation fails.

string translated_query = 1;

Parameter
Name Description
value ByteString

The bytes for translatedQuery to set.

Returns
Type Description
TranslateQueryResponse.Builder

This builder for chaining.

setTranslationJob(String value)

public TranslateQueryResponse.Builder setTranslationJob(String value)

Output only. Immutable. The unique identifier for the SQL translation job. Example: projects/123/locations/us/translation/1234

string translation_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The translationJob to set.

Returns
Type Description
TranslateQueryResponse.Builder

This builder for chaining.

setTranslationJobBytes(ByteString value)

public TranslateQueryResponse.Builder setTranslationJobBytes(ByteString value)

Output only. Immutable. The unique identifier for the SQL translation job. Example: projects/123/locations/us/translation/1234

string translation_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for translationJob to set.

Returns
Type Description
TranslateQueryResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setWarnings(int index, SqlTranslationWarning value)

public TranslateQueryResponse.Builder setWarnings(int index, SqlTranslationWarning value)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameters
Name Description
index int
value SqlTranslationWarning
Returns
Type Description
TranslateQueryResponse.Builder

setWarnings(int index, SqlTranslationWarning.Builder builderForValue)

public TranslateQueryResponse.Builder setWarnings(int index, SqlTranslationWarning.Builder builderForValue)

The list of warnings encountered during the translation, if present, indicates non-semantically correct translation.

repeated .google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning warnings = 3;

Parameters
Name Description
index int
builderForValue SqlTranslationWarning.Builder
Returns
Type Description
TranslateQueryResponse.Builder