Class TranslateQueryResponse.Builder (0.37.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.bigquery.migration.v2alpha.SqlTranslationError>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning>
Returns
TypeDescription
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
NameDescription
valueSqlTranslationError
Returns
TypeDescription
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
NameDescription
builderForValueSqlTranslationError.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSqlTranslationError
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSqlTranslationError.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
SqlTranslationError.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TranslateQueryResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueSqlTranslationWarning
Returns
TypeDescription
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
NameDescription
builderForValueSqlTranslationWarning.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSqlTranslationWarning
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSqlTranslationWarning.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
SqlTranslationWarning.Builder

build()

public TranslateQueryResponse build()
Returns
TypeDescription
TranslateQueryResponse

buildPartial()

public TranslateQueryResponse buildPartial()
Returns
TypeDescription
TranslateQueryResponse

clear()

public TranslateQueryResponse.Builder clear()
Returns
TypeDescription
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
TypeDescription
TranslateQueryResponse.Builder

clearField(Descriptors.FieldDescriptor field)

public TranslateQueryResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TranslateQueryResponse.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TranslateQueryResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TranslateQueryResponse.Builder
Overrides

clearTranslatedQuery()

public TranslateQueryResponse.Builder clearTranslatedQuery()

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

string translated_query = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TranslateQueryResponse.Builder

clone()

public TranslateQueryResponse.Builder clone()
Returns
TypeDescription
TranslateQueryResponse.Builder
Overrides

getDefaultInstanceForType()

public TranslateQueryResponse getDefaultInstanceForType()
Returns
TypeDescription
TranslateQueryResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
String

The translatedQuery.

getTranslatedQueryBytes()

public ByteString getTranslatedQueryBytes()

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

string translated_query = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarningOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TranslateQueryResponse other)

public TranslateQueryResponse.Builder mergeFrom(TranslateQueryResponse other)
Parameter
NameDescription
otherTranslateQueryResponse
Returns
TypeDescription
TranslateQueryResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TranslateQueryResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TranslateQueryResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TranslateQueryResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TranslateQueryResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TranslateQueryResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
valueSqlTranslationError
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSqlTranslationError.Builder
Returns
TypeDescription
TranslateQueryResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public TranslateQueryResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TranslateQueryResponse.Builder
Overrides

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

public TranslateQueryResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The translatedQuery to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for translatedQuery to set.

Returns
TypeDescription
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
NameDescription
valueString

The translationJob to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for translationJob to set.

Returns
TypeDescription
TranslateQueryResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final TranslateQueryResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
valueSqlTranslationWarning
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSqlTranslationWarning.Builder
Returns
TypeDescription
TranslateQueryResponse.Builder