Class TranslateQueryResponse (0.42.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
TypeDescription
int

TRANSLATED_QUERY_FIELD_NUMBER

public static final int TRANSLATED_QUERY_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSLATION_JOB_FIELD_NUMBER

public static final int TRANSLATION_JOB_FIELD_NUMBER
Field Value
TypeDescription
int

WARNINGS_FIELD_NUMBER

public static final int WARNINGS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TranslateQueryResponse getDefaultInstance()
Returns
TypeDescription
TranslateQueryResponse

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static TranslateQueryResponse.Builder newBuilder()
Returns
TypeDescription
TranslateQueryResponse.Builder

newBuilder(TranslateQueryResponse prototype)

public static TranslateQueryResponse.Builder newBuilder(TranslateQueryResponse prototype)
Parameter
NameDescription
prototypeTranslateQueryResponse
Returns
TypeDescription
TranslateQueryResponse.Builder

parseDelimitedFrom(InputStream input)

public static TranslateQueryResponse parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TranslateQueryResponse parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TranslateQueryResponse parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TranslateQueryResponse parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TranslateQueryResponse parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TranslateQueryResponse parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TranslateQueryResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TranslateQueryResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TranslateQueryResponse> parser()
Returns
TypeDescription
Parser<TranslateQueryResponse>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public TranslateQueryResponse getDefaultInstanceForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
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>

getParserForType()

public Parser<TranslateQueryResponse> getParserForType()
Returns
TypeDescription
Parser<TranslateQueryResponse>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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

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>

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TranslateQueryResponse.Builder newBuilderForType()
Returns
TypeDescription
TranslateQueryResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TranslateQueryResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TranslateQueryResponse.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TranslateQueryResponse.Builder toBuilder()
Returns
TypeDescription
TranslateQueryResponse.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException