Class TranslateQueryResponse (0.45.0)

public final class TranslateQueryResponse extends GeneratedMessageV3 implements TranslateQueryResponseOrBuilder

The response of translating a SQL query to Standard SQL.

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

Static Fields

ERRORS_FIELD_NUMBER

public static final int ERRORS_FIELD_NUMBER
Field Value
Type Description
int

TRANSLATED_QUERY_FIELD_NUMBER

public static final int TRANSLATED_QUERY_FIELD_NUMBER
Field Value
Type Description
int

TRANSLATION_JOB_FIELD_NUMBER

public static final int TRANSLATION_JOB_FIELD_NUMBER
Field Value
Type Description
int

WARNINGS_FIELD_NUMBER

public static final int WARNINGS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static TranslateQueryResponse getDefaultInstance()
Returns
Type Description
TranslateQueryResponse

getDescriptor()

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

newBuilder()

public static TranslateQueryResponse.Builder newBuilder()
Returns
Type Description
TranslateQueryResponse.Builder

newBuilder(TranslateQueryResponse prototype)

public static TranslateQueryResponse.Builder newBuilder(TranslateQueryResponse prototype)
Parameter
Name Description
prototype TranslateQueryResponse
Returns
Type Description
TranslateQueryResponse.Builder

parseDelimitedFrom(InputStream input)

public static TranslateQueryResponse parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static TranslateQueryResponse parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TranslateQueryResponse parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TranslateQueryResponse parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static TranslateQueryResponse parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static TranslateQueryResponse parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TranslateQueryResponse
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<TranslateQueryResponse> parser()
Returns
Type Description
Parser<TranslateQueryResponse>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public TranslateQueryResponse getDefaultInstanceForType()
Returns
Type Description
TranslateQueryResponse

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

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>

getParserForType()

public Parser<TranslateQueryResponse> getParserForType()
Returns
Type Description
Parser<TranslateQueryResponse>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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

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>

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public TranslateQueryResponse.Builder newBuilderForType()
Returns
Type Description
TranslateQueryResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TranslateQueryResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TranslateQueryResponse.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public TranslateQueryResponse.Builder toBuilder()
Returns
Type Description
TranslateQueryResponse.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException