Class TranslateQueryResponse.Builder (0.15.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

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

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

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

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

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

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

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

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

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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

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

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

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

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

build()

public TranslateQueryResponse build()
Returns
TypeDescription
TranslateQueryResponse

buildPartial()

public TranslateQueryResponse buildPartial()
Returns
TypeDescription
TranslateQueryResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public TranslateQueryResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns 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

clone()

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

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

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

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

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

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

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

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

setField(Descriptors.FieldDescriptor field, Object value)

public TranslateQueryResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns 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 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 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

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