com.databricks.jdbc.client.impl.thrift.generated.TGetOperationStatusResp Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.19.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
*/
package com.databricks.jdbc.client.impl.thrift.generated;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(
value = "Autogenerated by Thrift Compiler (0.19.0)",
date = "2024-05-06")
public class TGetOperationStatusResp
implements org.apache.thrift.TBase,
java.io.Serializable,
Cloneable,
Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
new org.apache.thrift.protocol.TStruct("TGetOperationStatusResp");
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"status", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
private static final org.apache.thrift.protocol.TField OPERATION_STATE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"operationState", org.apache.thrift.protocol.TType.I32, (short) 2);
private static final org.apache.thrift.protocol.TField SQL_STATE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"sqlState", org.apache.thrift.protocol.TType.STRING, (short) 3);
private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"errorCode", org.apache.thrift.protocol.TType.I32, (short) 4);
private static final org.apache.thrift.protocol.TField ERROR_MESSAGE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"errorMessage", org.apache.thrift.protocol.TType.STRING, (short) 5);
private static final org.apache.thrift.protocol.TField TASK_STATUS_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"taskStatus", org.apache.thrift.protocol.TType.STRING, (short) 6);
private static final org.apache.thrift.protocol.TField OPERATION_STARTED_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"operationStarted", org.apache.thrift.protocol.TType.I64, (short) 7);
private static final org.apache.thrift.protocol.TField OPERATION_COMPLETED_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"operationCompleted", org.apache.thrift.protocol.TType.I64, (short) 8);
private static final org.apache.thrift.protocol.TField HAS_RESULT_SET_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"hasResultSet", org.apache.thrift.protocol.TType.BOOL, (short) 9);
private static final org.apache.thrift.protocol.TField PROGRESS_UPDATE_RESPONSE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"progressUpdateResponse", org.apache.thrift.protocol.TType.STRUCT, (short) 10);
private static final org.apache.thrift.protocol.TField NUM_MODIFIED_ROWS_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"numModifiedRows", org.apache.thrift.protocol.TType.I64, (short) 11);
private static final org.apache.thrift.protocol.TField DISPLAY_MESSAGE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"displayMessage", org.apache.thrift.protocol.TType.STRING, (short) 1281);
private static final org.apache.thrift.protocol.TField DIAGNOSTIC_INFO_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"diagnosticInfo", org.apache.thrift.protocol.TType.STRING, (short) 1282);
private static final org.apache.thrift.protocol.TField ERROR_DETAILS_JSON_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"errorDetailsJson", org.apache.thrift.protocol.TType.STRING, (short) 1283);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
new TGetOperationStatusRespStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
new TGetOperationStatusRespTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable TStatus status; // required
/**
* @see TOperationState
*/
public @org.apache.thrift.annotation.Nullable TOperationState operationState; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String sqlState; // optional
public int errorCode; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String errorMessage; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String taskStatus; // optional
public long operationStarted; // optional
public long operationCompleted; // optional
public boolean hasResultSet; // optional
public @org.apache.thrift.annotation.Nullable TProgressUpdateResp
progressUpdateResponse; // optional
public long numModifiedRows; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String displayMessage; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String diagnosticInfo; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String errorDetailsJson; // optional
/**
* The set of fields this struct contains, along with convenience methods for finding and
* manipulating them.
*/
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
STATUS((short) 1, "status"),
/**
* @see TOperationState
*/
OPERATION_STATE((short) 2, "operationState"),
SQL_STATE((short) 3, "sqlState"),
ERROR_CODE((short) 4, "errorCode"),
ERROR_MESSAGE((short) 5, "errorMessage"),
TASK_STATUS((short) 6, "taskStatus"),
OPERATION_STARTED((short) 7, "operationStarted"),
OPERATION_COMPLETED((short) 8, "operationCompleted"),
HAS_RESULT_SET((short) 9, "hasResultSet"),
PROGRESS_UPDATE_RESPONSE((short) 10, "progressUpdateResponse"),
NUM_MODIFIED_ROWS((short) 11, "numModifiedRows"),
DISPLAY_MESSAGE((short) 1281, "displayMessage"),
DIAGNOSTIC_INFO((short) 1282, "diagnosticInfo"),
ERROR_DETAILS_JSON((short) 1283, "errorDetailsJson");
private static final java.util.Map byName =
new java.util.HashMap();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/** Find the _Fields constant that matches fieldId, or null if its not found. */
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch (fieldId) {
case 1: // STATUS
return STATUS;
case 2: // OPERATION_STATE
return OPERATION_STATE;
case 3: // SQL_STATE
return SQL_STATE;
case 4: // ERROR_CODE
return ERROR_CODE;
case 5: // ERROR_MESSAGE
return ERROR_MESSAGE;
case 6: // TASK_STATUS
return TASK_STATUS;
case 7: // OPERATION_STARTED
return OPERATION_STARTED;
case 8: // OPERATION_COMPLETED
return OPERATION_COMPLETED;
case 9: // HAS_RESULT_SET
return HAS_RESULT_SET;
case 10: // PROGRESS_UPDATE_RESPONSE
return PROGRESS_UPDATE_RESPONSE;
case 11: // NUM_MODIFIED_ROWS
return NUM_MODIFIED_ROWS;
case 1281: // DISPLAY_MESSAGE
return DISPLAY_MESSAGE;
case 1282: // DIAGNOSTIC_INFO
return DIAGNOSTIC_INFO;
case 1283: // ERROR_DETAILS_JSON
return ERROR_DETAILS_JSON;
default:
return null;
}
}
/** Find the _Fields constant that matches fieldId, throwing an exception if it is not found. */
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null)
throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/** Find the _Fields constant that matches name, or null if its not found. */
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __ERRORCODE_ISSET_ID = 0;
private static final int __OPERATIONSTARTED_ISSET_ID = 1;
private static final int __OPERATIONCOMPLETED_ISSET_ID = 2;
private static final int __HASRESULTSET_ISSET_ID = 3;
private static final int __NUMMODIFIEDROWS_ISSET_ID = 4;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {
_Fields.OPERATION_STATE,
_Fields.SQL_STATE,
_Fields.ERROR_CODE,
_Fields.ERROR_MESSAGE,
_Fields.TASK_STATUS,
_Fields.OPERATION_STARTED,
_Fields.OPERATION_COMPLETED,
_Fields.HAS_RESULT_SET,
_Fields.PROGRESS_UPDATE_RESPONSE,
_Fields.NUM_MODIFIED_ROWS,
_Fields.DISPLAY_MESSAGE,
_Fields.DIAGNOSTIC_INFO,
_Fields.ERROR_DETAILS_JSON
};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(
_Fields.STATUS,
new org.apache.thrift.meta_data.FieldMetaData(
"status",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT, TStatus.class)));
tmpMap.put(
_Fields.OPERATION_STATE,
new org.apache.thrift.meta_data.FieldMetaData(
"operationState",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(
org.apache.thrift.protocol.TType.ENUM, TOperationState.class)));
tmpMap.put(
_Fields.SQL_STATE,
new org.apache.thrift.meta_data.FieldMetaData(
"sqlState",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(
_Fields.ERROR_CODE,
new org.apache.thrift.meta_data.FieldMetaData(
"errorCode",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I32)));
tmpMap.put(
_Fields.ERROR_MESSAGE,
new org.apache.thrift.meta_data.FieldMetaData(
"errorMessage",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(
_Fields.TASK_STATUS,
new org.apache.thrift.meta_data.FieldMetaData(
"taskStatus",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(
_Fields.OPERATION_STARTED,
new org.apache.thrift.meta_data.FieldMetaData(
"operationStarted",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.OPERATION_COMPLETED,
new org.apache.thrift.meta_data.FieldMetaData(
"operationCompleted",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.HAS_RESULT_SET,
new org.apache.thrift.meta_data.FieldMetaData(
"hasResultSet",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(
_Fields.PROGRESS_UPDATE_RESPONSE,
new org.apache.thrift.meta_data.FieldMetaData(
"progressUpdateResponse",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT, TProgressUpdateResp.class)));
tmpMap.put(
_Fields.NUM_MODIFIED_ROWS,
new org.apache.thrift.meta_data.FieldMetaData(
"numModifiedRows",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.DISPLAY_MESSAGE,
new org.apache.thrift.meta_data.FieldMetaData(
"displayMessage",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(
_Fields.DIAGNOSTIC_INFO,
new org.apache.thrift.meta_data.FieldMetaData(
"diagnosticInfo",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(
_Fields.ERROR_DETAILS_JSON,
new org.apache.thrift.meta_data.FieldMetaData(
"errorDetailsJson",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
TGetOperationStatusResp.class, metaDataMap);
}
public TGetOperationStatusResp() {}
public TGetOperationStatusResp(TStatus status) {
this();
this.status = status;
}
/** Performs a deep copy on other. */
public TGetOperationStatusResp(TGetOperationStatusResp other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetStatus()) {
this.status = new TStatus(other.status);
}
if (other.isSetOperationState()) {
this.operationState = other.operationState;
}
if (other.isSetSqlState()) {
this.sqlState = other.sqlState;
}
this.errorCode = other.errorCode;
if (other.isSetErrorMessage()) {
this.errorMessage = other.errorMessage;
}
if (other.isSetTaskStatus()) {
this.taskStatus = other.taskStatus;
}
this.operationStarted = other.operationStarted;
this.operationCompleted = other.operationCompleted;
this.hasResultSet = other.hasResultSet;
if (other.isSetProgressUpdateResponse()) {
this.progressUpdateResponse = new TProgressUpdateResp(other.progressUpdateResponse);
}
this.numModifiedRows = other.numModifiedRows;
if (other.isSetDisplayMessage()) {
this.displayMessage = other.displayMessage;
}
if (other.isSetDiagnosticInfo()) {
this.diagnosticInfo = other.diagnosticInfo;
}
if (other.isSetErrorDetailsJson()) {
this.errorDetailsJson = other.errorDetailsJson;
}
}
@Override
public TGetOperationStatusResp deepCopy() {
return new TGetOperationStatusResp(this);
}
@Override
public void clear() {
this.status = null;
this.operationState = null;
this.sqlState = null;
setErrorCodeIsSet(false);
this.errorCode = 0;
this.errorMessage = null;
this.taskStatus = null;
setOperationStartedIsSet(false);
this.operationStarted = 0;
setOperationCompletedIsSet(false);
this.operationCompleted = 0;
setHasResultSetIsSet(false);
this.hasResultSet = false;
this.progressUpdateResponse = null;
setNumModifiedRowsIsSet(false);
this.numModifiedRows = 0;
this.displayMessage = null;
this.diagnosticInfo = null;
this.errorDetailsJson = null;
}
@org.apache.thrift.annotation.Nullable
public TStatus getStatus() {
return this.status;
}
public TGetOperationStatusResp setStatus(@org.apache.thrift.annotation.Nullable TStatus status) {
this.status = status;
return this;
}
public void unsetStatus() {
this.status = null;
}
/** Returns true if field status is set (has been assigned a value) and false otherwise */
public boolean isSetStatus() {
return this.status != null;
}
public void setStatusIsSet(boolean value) {
if (!value) {
this.status = null;
}
}
/**
* @see TOperationState
*/
@org.apache.thrift.annotation.Nullable
public TOperationState getOperationState() {
return this.operationState;
}
/**
* @see TOperationState
*/
public TGetOperationStatusResp setOperationState(
@org.apache.thrift.annotation.Nullable TOperationState operationState) {
this.operationState = operationState;
return this;
}
public void unsetOperationState() {
this.operationState = null;
}
/** Returns true if field operationState is set (has been assigned a value) and false otherwise */
public boolean isSetOperationState() {
return this.operationState != null;
}
public void setOperationStateIsSet(boolean value) {
if (!value) {
this.operationState = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getSqlState() {
return this.sqlState;
}
public TGetOperationStatusResp setSqlState(
@org.apache.thrift.annotation.Nullable java.lang.String sqlState) {
this.sqlState = sqlState;
return this;
}
public void unsetSqlState() {
this.sqlState = null;
}
/** Returns true if field sqlState is set (has been assigned a value) and false otherwise */
public boolean isSetSqlState() {
return this.sqlState != null;
}
public void setSqlStateIsSet(boolean value) {
if (!value) {
this.sqlState = null;
}
}
public int getErrorCode() {
return this.errorCode;
}
public TGetOperationStatusResp setErrorCode(int errorCode) {
this.errorCode = errorCode;
setErrorCodeIsSet(true);
return this;
}
public void unsetErrorCode() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERRORCODE_ISSET_ID);
}
/** Returns true if field errorCode is set (has been assigned a value) and false otherwise */
public boolean isSetErrorCode() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERRORCODE_ISSET_ID);
}
public void setErrorCodeIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERRORCODE_ISSET_ID, value);
}
@Deprecated
@org.apache.thrift.annotation.Nullable
public java.lang.String getErrorMessage() {
return this.errorMessage;
}
@Deprecated
public TGetOperationStatusResp setErrorMessage(
@org.apache.thrift.annotation.Nullable java.lang.String errorMessage) {
this.errorMessage = errorMessage;
return this;
}
@Deprecated
public void unsetErrorMessage() {
this.errorMessage = null;
}
/** Returns true if field errorMessage is set (has been assigned a value) and false otherwise */
@Deprecated
public boolean isSetErrorMessage() {
return this.errorMessage != null;
}
@Deprecated
public void setErrorMessageIsSet(boolean value) {
if (!value) {
this.errorMessage = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTaskStatus() {
return this.taskStatus;
}
public TGetOperationStatusResp setTaskStatus(
@org.apache.thrift.annotation.Nullable java.lang.String taskStatus) {
this.taskStatus = taskStatus;
return this;
}
public void unsetTaskStatus() {
this.taskStatus = null;
}
/** Returns true if field taskStatus is set (has been assigned a value) and false otherwise */
public boolean isSetTaskStatus() {
return this.taskStatus != null;
}
public void setTaskStatusIsSet(boolean value) {
if (!value) {
this.taskStatus = null;
}
}
public long getOperationStarted() {
return this.operationStarted;
}
public TGetOperationStatusResp setOperationStarted(long operationStarted) {
this.operationStarted = operationStarted;
setOperationStartedIsSet(true);
return this;
}
public void unsetOperationStarted() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OPERATIONSTARTED_ISSET_ID);
}
/**
* Returns true if field operationStarted is set (has been assigned a value) and false otherwise
*/
public boolean isSetOperationStarted() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OPERATIONSTARTED_ISSET_ID);
}
public void setOperationStartedIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __OPERATIONSTARTED_ISSET_ID, value);
}
public long getOperationCompleted() {
return this.operationCompleted;
}
public TGetOperationStatusResp setOperationCompleted(long operationCompleted) {
this.operationCompleted = operationCompleted;
setOperationCompletedIsSet(true);
return this;
}
public void unsetOperationCompleted() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID);
}
/**
* Returns true if field operationCompleted is set (has been assigned a value) and false otherwise
*/
public boolean isSetOperationCompleted() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID);
}
public void setOperationCompletedIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID, value);
}
public boolean isHasResultSet() {
return this.hasResultSet;
}
public TGetOperationStatusResp setHasResultSet(boolean hasResultSet) {
this.hasResultSet = hasResultSet;
setHasResultSetIsSet(true);
return this;
}
public void unsetHasResultSet() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
}
/** Returns true if field hasResultSet is set (has been assigned a value) and false otherwise */
public boolean isSetHasResultSet() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
}
public void setHasResultSetIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public TProgressUpdateResp getProgressUpdateResponse() {
return this.progressUpdateResponse;
}
public TGetOperationStatusResp setProgressUpdateResponse(
@org.apache.thrift.annotation.Nullable TProgressUpdateResp progressUpdateResponse) {
this.progressUpdateResponse = progressUpdateResponse;
return this;
}
public void unsetProgressUpdateResponse() {
this.progressUpdateResponse = null;
}
/**
* Returns true if field progressUpdateResponse is set (has been assigned a value) and false
* otherwise
*/
public boolean isSetProgressUpdateResponse() {
return this.progressUpdateResponse != null;
}
public void setProgressUpdateResponseIsSet(boolean value) {
if (!value) {
this.progressUpdateResponse = null;
}
}
public long getNumModifiedRows() {
return this.numModifiedRows;
}
public TGetOperationStatusResp setNumModifiedRows(long numModifiedRows) {
this.numModifiedRows = numModifiedRows;
setNumModifiedRowsIsSet(true);
return this;
}
public void unsetNumModifiedRows() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NUMMODIFIEDROWS_ISSET_ID);
}
/**
* Returns true if field numModifiedRows is set (has been assigned a value) and false otherwise
*/
public boolean isSetNumModifiedRows() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NUMMODIFIEDROWS_ISSET_ID);
}
public void setNumModifiedRowsIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NUMMODIFIEDROWS_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDisplayMessage() {
return this.displayMessage;
}
public TGetOperationStatusResp setDisplayMessage(
@org.apache.thrift.annotation.Nullable java.lang.String displayMessage) {
this.displayMessage = displayMessage;
return this;
}
public void unsetDisplayMessage() {
this.displayMessage = null;
}
/** Returns true if field displayMessage is set (has been assigned a value) and false otherwise */
public boolean isSetDisplayMessage() {
return this.displayMessage != null;
}
public void setDisplayMessageIsSet(boolean value) {
if (!value) {
this.displayMessage = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDiagnosticInfo() {
return this.diagnosticInfo;
}
public TGetOperationStatusResp setDiagnosticInfo(
@org.apache.thrift.annotation.Nullable java.lang.String diagnosticInfo) {
this.diagnosticInfo = diagnosticInfo;
return this;
}
public void unsetDiagnosticInfo() {
this.diagnosticInfo = null;
}
/** Returns true if field diagnosticInfo is set (has been assigned a value) and false otherwise */
public boolean isSetDiagnosticInfo() {
return this.diagnosticInfo != null;
}
public void setDiagnosticInfoIsSet(boolean value) {
if (!value) {
this.diagnosticInfo = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getErrorDetailsJson() {
return this.errorDetailsJson;
}
public TGetOperationStatusResp setErrorDetailsJson(
@org.apache.thrift.annotation.Nullable java.lang.String errorDetailsJson) {
this.errorDetailsJson = errorDetailsJson;
return this;
}
public void unsetErrorDetailsJson() {
this.errorDetailsJson = null;
}
/**
* Returns true if field errorDetailsJson is set (has been assigned a value) and false otherwise
*/
public boolean isSetErrorDetailsJson() {
return this.errorDetailsJson != null;
}
public void setErrorDetailsJsonIsSet(boolean value) {
if (!value) {
this.errorDetailsJson = null;
}
}
@Override
public void setFieldValue(
_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((TStatus) value);
}
break;
case OPERATION_STATE:
if (value == null) {
unsetOperationState();
} else {
setOperationState((TOperationState) value);
}
break;
case SQL_STATE:
if (value == null) {
unsetSqlState();
} else {
setSqlState((java.lang.String) value);
}
break;
case ERROR_CODE:
if (value == null) {
unsetErrorCode();
} else {
setErrorCode((java.lang.Integer) value);
}
break;
case ERROR_MESSAGE:
if (value == null) {
unsetErrorMessage();
} else {
setErrorMessage((java.lang.String) value);
}
break;
case TASK_STATUS:
if (value == null) {
unsetTaskStatus();
} else {
setTaskStatus((java.lang.String) value);
}
break;
case OPERATION_STARTED:
if (value == null) {
unsetOperationStarted();
} else {
setOperationStarted((java.lang.Long) value);
}
break;
case OPERATION_COMPLETED:
if (value == null) {
unsetOperationCompleted();
} else {
setOperationCompleted((java.lang.Long) value);
}
break;
case HAS_RESULT_SET:
if (value == null) {
unsetHasResultSet();
} else {
setHasResultSet((java.lang.Boolean) value);
}
break;
case PROGRESS_UPDATE_RESPONSE:
if (value == null) {
unsetProgressUpdateResponse();
} else {
setProgressUpdateResponse((TProgressUpdateResp) value);
}
break;
case NUM_MODIFIED_ROWS:
if (value == null) {
unsetNumModifiedRows();
} else {
setNumModifiedRows((java.lang.Long) value);
}
break;
case DISPLAY_MESSAGE:
if (value == null) {
unsetDisplayMessage();
} else {
setDisplayMessage((java.lang.String) value);
}
break;
case DIAGNOSTIC_INFO:
if (value == null) {
unsetDiagnosticInfo();
} else {
setDiagnosticInfo((java.lang.String) value);
}
break;
case ERROR_DETAILS_JSON:
if (value == null) {
unsetErrorDetailsJson();
} else {
setErrorDetailsJson((java.lang.String) value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STATUS:
return getStatus();
case OPERATION_STATE:
return getOperationState();
case SQL_STATE:
return getSqlState();
case ERROR_CODE:
return getErrorCode();
case ERROR_MESSAGE:
return getErrorMessage();
case TASK_STATUS:
return getTaskStatus();
case OPERATION_STARTED:
return getOperationStarted();
case OPERATION_COMPLETED:
return getOperationCompleted();
case HAS_RESULT_SET:
return isHasResultSet();
case PROGRESS_UPDATE_RESPONSE:
return getProgressUpdateResponse();
case NUM_MODIFIED_ROWS:
return getNumModifiedRows();
case DISPLAY_MESSAGE:
return getDisplayMessage();
case DIAGNOSTIC_INFO:
return getDiagnosticInfo();
case ERROR_DETAILS_JSON:
return getErrorDetailsJson();
}
throw new java.lang.IllegalStateException();
}
/**
* Returns true if field corresponding to fieldID is set (has been assigned a value) and false
* otherwise
*/
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case STATUS:
return isSetStatus();
case OPERATION_STATE:
return isSetOperationState();
case SQL_STATE:
return isSetSqlState();
case ERROR_CODE:
return isSetErrorCode();
case ERROR_MESSAGE:
return isSetErrorMessage();
case TASK_STATUS:
return isSetTaskStatus();
case OPERATION_STARTED:
return isSetOperationStarted();
case OPERATION_COMPLETED:
return isSetOperationCompleted();
case HAS_RESULT_SET:
return isSetHasResultSet();
case PROGRESS_UPDATE_RESPONSE:
return isSetProgressUpdateResponse();
case NUM_MODIFIED_ROWS:
return isSetNumModifiedRows();
case DISPLAY_MESSAGE:
return isSetDisplayMessage();
case DIAGNOSTIC_INFO:
return isSetDiagnosticInfo();
case ERROR_DETAILS_JSON:
return isSetErrorDetailsJson();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TGetOperationStatusResp) return this.equals((TGetOperationStatusResp) that);
return false;
}
public boolean equals(TGetOperationStatusResp that) {
if (that == null) return false;
if (this == that) return true;
boolean this_present_status = true && this.isSetStatus();
boolean that_present_status = true && that.isSetStatus();
if (this_present_status || that_present_status) {
if (!(this_present_status && that_present_status)) return false;
if (!this.status.equals(that.status)) return false;
}
boolean this_present_operationState = true && this.isSetOperationState();
boolean that_present_operationState = true && that.isSetOperationState();
if (this_present_operationState || that_present_operationState) {
if (!(this_present_operationState && that_present_operationState)) return false;
if (!this.operationState.equals(that.operationState)) return false;
}
boolean this_present_sqlState = true && this.isSetSqlState();
boolean that_present_sqlState = true && that.isSetSqlState();
if (this_present_sqlState || that_present_sqlState) {
if (!(this_present_sqlState && that_present_sqlState)) return false;
if (!this.sqlState.equals(that.sqlState)) return false;
}
boolean this_present_errorCode = true && this.isSetErrorCode();
boolean that_present_errorCode = true && that.isSetErrorCode();
if (this_present_errorCode || that_present_errorCode) {
if (!(this_present_errorCode && that_present_errorCode)) return false;
if (this.errorCode != that.errorCode) return false;
}
boolean this_present_errorMessage = true && this.isSetErrorMessage();
boolean that_present_errorMessage = true && that.isSetErrorMessage();
if (this_present_errorMessage || that_present_errorMessage) {
if (!(this_present_errorMessage && that_present_errorMessage)) return false;
if (!this.errorMessage.equals(that.errorMessage)) return false;
}
boolean this_present_taskStatus = true && this.isSetTaskStatus();
boolean that_present_taskStatus = true && that.isSetTaskStatus();
if (this_present_taskStatus || that_present_taskStatus) {
if (!(this_present_taskStatus && that_present_taskStatus)) return false;
if (!this.taskStatus.equals(that.taskStatus)) return false;
}
boolean this_present_operationStarted = true && this.isSetOperationStarted();
boolean that_present_operationStarted = true && that.isSetOperationStarted();
if (this_present_operationStarted || that_present_operationStarted) {
if (!(this_present_operationStarted && that_present_operationStarted)) return false;
if (this.operationStarted != that.operationStarted) return false;
}
boolean this_present_operationCompleted = true && this.isSetOperationCompleted();
boolean that_present_operationCompleted = true && that.isSetOperationCompleted();
if (this_present_operationCompleted || that_present_operationCompleted) {
if (!(this_present_operationCompleted && that_present_operationCompleted)) return false;
if (this.operationCompleted != that.operationCompleted) return false;
}
boolean this_present_hasResultSet = true && this.isSetHasResultSet();
boolean that_present_hasResultSet = true && that.isSetHasResultSet();
if (this_present_hasResultSet || that_present_hasResultSet) {
if (!(this_present_hasResultSet && that_present_hasResultSet)) return false;
if (this.hasResultSet != that.hasResultSet) return false;
}
boolean this_present_progressUpdateResponse = true && this.isSetProgressUpdateResponse();
boolean that_present_progressUpdateResponse = true && that.isSetProgressUpdateResponse();
if (this_present_progressUpdateResponse || that_present_progressUpdateResponse) {
if (!(this_present_progressUpdateResponse && that_present_progressUpdateResponse))
return false;
if (!this.progressUpdateResponse.equals(that.progressUpdateResponse)) return false;
}
boolean this_present_numModifiedRows = true && this.isSetNumModifiedRows();
boolean that_present_numModifiedRows = true && that.isSetNumModifiedRows();
if (this_present_numModifiedRows || that_present_numModifiedRows) {
if (!(this_present_numModifiedRows && that_present_numModifiedRows)) return false;
if (this.numModifiedRows != that.numModifiedRows) return false;
}
boolean this_present_displayMessage = true && this.isSetDisplayMessage();
boolean that_present_displayMessage = true && that.isSetDisplayMessage();
if (this_present_displayMessage || that_present_displayMessage) {
if (!(this_present_displayMessage && that_present_displayMessage)) return false;
if (!this.displayMessage.equals(that.displayMessage)) return false;
}
boolean this_present_diagnosticInfo = true && this.isSetDiagnosticInfo();
boolean that_present_diagnosticInfo = true && that.isSetDiagnosticInfo();
if (this_present_diagnosticInfo || that_present_diagnosticInfo) {
if (!(this_present_diagnosticInfo && that_present_diagnosticInfo)) return false;
if (!this.diagnosticInfo.equals(that.diagnosticInfo)) return false;
}
boolean this_present_errorDetailsJson = true && this.isSetErrorDetailsJson();
boolean that_present_errorDetailsJson = true && that.isSetErrorDetailsJson();
if (this_present_errorDetailsJson || that_present_errorDetailsJson) {
if (!(this_present_errorDetailsJson && that_present_errorDetailsJson)) return false;
if (!this.errorDetailsJson.equals(that.errorDetailsJson)) return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
if (isSetStatus()) hashCode = hashCode * 8191 + status.hashCode();
hashCode = hashCode * 8191 + ((isSetOperationState()) ? 131071 : 524287);
if (isSetOperationState()) hashCode = hashCode * 8191 + operationState.getValue();
hashCode = hashCode * 8191 + ((isSetSqlState()) ? 131071 : 524287);
if (isSetSqlState()) hashCode = hashCode * 8191 + sqlState.hashCode();
hashCode = hashCode * 8191 + ((isSetErrorCode()) ? 131071 : 524287);
if (isSetErrorCode()) hashCode = hashCode * 8191 + errorCode;
hashCode = hashCode * 8191 + ((isSetErrorMessage()) ? 131071 : 524287);
if (isSetErrorMessage()) hashCode = hashCode * 8191 + errorMessage.hashCode();
hashCode = hashCode * 8191 + ((isSetTaskStatus()) ? 131071 : 524287);
if (isSetTaskStatus()) hashCode = hashCode * 8191 + taskStatus.hashCode();
hashCode = hashCode * 8191 + ((isSetOperationStarted()) ? 131071 : 524287);
if (isSetOperationStarted())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(operationStarted);
hashCode = hashCode * 8191 + ((isSetOperationCompleted()) ? 131071 : 524287);
if (isSetOperationCompleted())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(operationCompleted);
hashCode = hashCode * 8191 + ((isSetHasResultSet()) ? 131071 : 524287);
if (isSetHasResultSet()) hashCode = hashCode * 8191 + ((hasResultSet) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetProgressUpdateResponse()) ? 131071 : 524287);
if (isSetProgressUpdateResponse())
hashCode = hashCode * 8191 + progressUpdateResponse.hashCode();
hashCode = hashCode * 8191 + ((isSetNumModifiedRows()) ? 131071 : 524287);
if (isSetNumModifiedRows())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(numModifiedRows);
hashCode = hashCode * 8191 + ((isSetDisplayMessage()) ? 131071 : 524287);
if (isSetDisplayMessage()) hashCode = hashCode * 8191 + displayMessage.hashCode();
hashCode = hashCode * 8191 + ((isSetDiagnosticInfo()) ? 131071 : 524287);
if (isSetDiagnosticInfo()) hashCode = hashCode * 8191 + diagnosticInfo.hashCode();
hashCode = hashCode * 8191 + ((isSetErrorDetailsJson()) ? 131071 : 524287);
if (isSetErrorDetailsJson()) hashCode = hashCode * 8191 + errorDetailsJson.hashCode();
return hashCode;
}
@Override
public int compareTo(TGetOperationStatusResp other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatus()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetOperationState(), other.isSetOperationState());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOperationState()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.operationState, other.operationState);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSqlState(), other.isSetSqlState());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSqlState()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, other.sqlState);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetErrorCode(), other.isSetErrorCode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetErrorCode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetErrorMessage(), other.isSetErrorMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetErrorMessage()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTaskStatus(), other.isSetTaskStatus());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTaskStatus()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskStatus, other.taskStatus);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetOperationStarted(), other.isSetOperationStarted());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOperationStarted()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.operationStarted, other.operationStarted);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetOperationCompleted(), other.isSetOperationCompleted());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOperationCompleted()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(
this.operationCompleted, other.operationCompleted);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetHasResultSet(), other.isSetHasResultSet());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHasResultSet()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(
isSetProgressUpdateResponse(), other.isSetProgressUpdateResponse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProgressUpdateResponse()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(
this.progressUpdateResponse, other.progressUpdateResponse);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetNumModifiedRows(), other.isSetNumModifiedRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNumModifiedRows()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.numModifiedRows, other.numModifiedRows);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDisplayMessage(), other.isSetDisplayMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDisplayMessage()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.displayMessage, other.displayMessage);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDiagnosticInfo(), other.isSetDiagnosticInfo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDiagnosticInfo()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.diagnosticInfo, other.diagnosticInfo);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetErrorDetailsJson(), other.isSetErrorDetailsJson());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetErrorDetailsJson()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.errorDetailsJson, other.errorDetailsJson);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot)
throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TGetOperationStatusResp(");
boolean first = true;
sb.append("status:");
if (this.status == null) {
sb.append("null");
} else {
sb.append(this.status);
}
first = false;
if (isSetOperationState()) {
if (!first) sb.append(", ");
sb.append("operationState:");
if (this.operationState == null) {
sb.append("null");
} else {
sb.append(this.operationState);
}
first = false;
}
if (isSetSqlState()) {
if (!first) sb.append(", ");
sb.append("sqlState:");
if (this.sqlState == null) {
sb.append("null");
} else {
sb.append(this.sqlState);
}
first = false;
}
if (isSetErrorCode()) {
if (!first) sb.append(", ");
sb.append("errorCode:");
sb.append(this.errorCode);
first = false;
}
if (isSetErrorMessage()) {
if (!first) sb.append(", ");
sb.append("errorMessage:");
if (this.errorMessage == null) {
sb.append("null");
} else {
sb.append(this.errorMessage);
}
first = false;
}
if (isSetTaskStatus()) {
if (!first) sb.append(", ");
sb.append("taskStatus:");
if (this.taskStatus == null) {
sb.append("null");
} else {
sb.append(this.taskStatus);
}
first = false;
}
if (isSetOperationStarted()) {
if (!first) sb.append(", ");
sb.append("operationStarted:");
sb.append(this.operationStarted);
first = false;
}
if (isSetOperationCompleted()) {
if (!first) sb.append(", ");
sb.append("operationCompleted:");
sb.append(this.operationCompleted);
first = false;
}
if (isSetHasResultSet()) {
if (!first) sb.append(", ");
sb.append("hasResultSet:");
sb.append(this.hasResultSet);
first = false;
}
if (isSetProgressUpdateResponse()) {
if (!first) sb.append(", ");
sb.append("progressUpdateResponse:");
if (this.progressUpdateResponse == null) {
sb.append("null");
} else {
sb.append(this.progressUpdateResponse);
}
first = false;
}
if (isSetNumModifiedRows()) {
if (!first) sb.append(", ");
sb.append("numModifiedRows:");
sb.append(this.numModifiedRows);
first = false;
}
if (isSetDisplayMessage()) {
if (!first) sb.append(", ");
sb.append("displayMessage:");
if (this.displayMessage == null) {
sb.append("null");
} else {
sb.append(this.displayMessage);
}
first = false;
}
if (isSetDiagnosticInfo()) {
if (!first) sb.append(", ");
sb.append("diagnosticInfo:");
if (this.diagnosticInfo == null) {
sb.append("null");
} else {
sb.append(this.diagnosticInfo);
}
first = false;
}
if (isSetErrorDetailsJson()) {
if (!first) sb.append(", ");
sb.append("errorDetailsJson:");
if (this.errorDetailsJson == null) {
sb.append("null");
} else {
sb.append(this.errorDetailsJson);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (status == null) {
throw new org.apache.thrift.protocol.TProtocolException(
"Required field 'status' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (status != null) {
status.validate();
}
if (progressUpdateResponse != null) {
progressUpdateResponse.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(
new org.apache.thrift.protocol.TCompactProtocol(
new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and
// doesn't call the default constructor.
__isset_bitfield = 0;
read(
new org.apache.thrift.protocol.TCompactProtocol(
new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class TGetOperationStatusRespStandardSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TGetOperationStatusRespStandardScheme getScheme() {
return new TGetOperationStatusRespStandardScheme();
}
}
private static class TGetOperationStatusRespStandardScheme
extends org.apache.thrift.scheme.StandardScheme {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatusResp struct)
throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true) {
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.status = new TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPERATION_STATE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.operationState =
com.databricks.jdbc.client.impl.thrift.generated.TOperationState.findByValue(
iprot.readI32());
struct.setOperationStateIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // SQL_STATE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.sqlState = iprot.readString();
struct.setSqlStateIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // ERROR_CODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.errorCode = iprot.readI32();
struct.setErrorCodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // ERROR_MESSAGE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.errorMessage = iprot.readString();
struct.setErrorMessageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TASK_STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.taskStatus = iprot.readString();
struct.setTaskStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // OPERATION_STARTED
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.operationStarted = iprot.readI64();
struct.setOperationStartedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // OPERATION_COMPLETED
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.operationCompleted = iprot.readI64();
struct.setOperationCompletedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // HAS_RESULT_SET
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.hasResultSet = iprot.readBool();
struct.setHasResultSetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // PROGRESS_UPDATE_RESPONSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.progressUpdateResponse = new TProgressUpdateResp();
struct.progressUpdateResponse.read(iprot);
struct.setProgressUpdateResponseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // NUM_MODIFIED_ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.numModifiedRows = iprot.readI64();
struct.setNumModifiedRowsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1281: // DISPLAY_MESSAGE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.displayMessage = iprot.readString();
struct.setDisplayMessageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1282: // DIAGNOSTIC_INFO
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.diagnosticInfo = iprot.readString();
struct.setDiagnosticInfoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1283: // ERROR_DETAILS_JSON
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.errorDetailsJson = iprot.readString();
struct.setErrorDetailsJsonIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, TGetOperationStatusResp struct)
throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.status != null) {
oprot.writeFieldBegin(STATUS_FIELD_DESC);
struct.status.write(oprot);
oprot.writeFieldEnd();
}
if (struct.operationState != null) {
if (struct.isSetOperationState()) {
oprot.writeFieldBegin(OPERATION_STATE_FIELD_DESC);
oprot.writeI32(struct.operationState.getValue());
oprot.writeFieldEnd();
}
}
if (struct.sqlState != null) {
if (struct.isSetSqlState()) {
oprot.writeFieldBegin(SQL_STATE_FIELD_DESC);
oprot.writeString(struct.sqlState);
oprot.writeFieldEnd();
}
}
if (struct.isSetErrorCode()) {
oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
oprot.writeI32(struct.errorCode);
oprot.writeFieldEnd();
}
if (struct.errorMessage != null) {
if (struct.isSetErrorMessage()) {
oprot.writeFieldBegin(ERROR_MESSAGE_FIELD_DESC);
oprot.writeString(struct.errorMessage);
oprot.writeFieldEnd();
}
}
if (struct.taskStatus != null) {
if (struct.isSetTaskStatus()) {
oprot.writeFieldBegin(TASK_STATUS_FIELD_DESC);
oprot.writeString(struct.taskStatus);
oprot.writeFieldEnd();
}
}
if (struct.isSetOperationStarted()) {
oprot.writeFieldBegin(OPERATION_STARTED_FIELD_DESC);
oprot.writeI64(struct.operationStarted);
oprot.writeFieldEnd();
}
if (struct.isSetOperationCompleted()) {
oprot.writeFieldBegin(OPERATION_COMPLETED_FIELD_DESC);
oprot.writeI64(struct.operationCompleted);
oprot.writeFieldEnd();
}
if (struct.isSetHasResultSet()) {
oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC);
oprot.writeBool(struct.hasResultSet);
oprot.writeFieldEnd();
}
if (struct.progressUpdateResponse != null) {
if (struct.isSetProgressUpdateResponse()) {
oprot.writeFieldBegin(PROGRESS_UPDATE_RESPONSE_FIELD_DESC);
struct.progressUpdateResponse.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.isSetNumModifiedRows()) {
oprot.writeFieldBegin(NUM_MODIFIED_ROWS_FIELD_DESC);
oprot.writeI64(struct.numModifiedRows);
oprot.writeFieldEnd();
}
if (struct.displayMessage != null) {
if (struct.isSetDisplayMessage()) {
oprot.writeFieldBegin(DISPLAY_MESSAGE_FIELD_DESC);
oprot.writeString(struct.displayMessage);
oprot.writeFieldEnd();
}
}
if (struct.diagnosticInfo != null) {
if (struct.isSetDiagnosticInfo()) {
oprot.writeFieldBegin(DIAGNOSTIC_INFO_FIELD_DESC);
oprot.writeString(struct.diagnosticInfo);
oprot.writeFieldEnd();
}
}
if (struct.errorDetailsJson != null) {
if (struct.isSetErrorDetailsJson()) {
oprot.writeFieldBegin(ERROR_DETAILS_JSON_FIELD_DESC);
oprot.writeString(struct.errorDetailsJson);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TGetOperationStatusRespTupleSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TGetOperationStatusRespTupleScheme getScheme() {
return new TGetOperationStatusRespTupleScheme();
}
}
private static class TGetOperationStatusRespTupleScheme
extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusResp struct)
throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.status.write(oprot);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetOperationState()) {
optionals.set(0);
}
if (struct.isSetSqlState()) {
optionals.set(1);
}
if (struct.isSetErrorCode()) {
optionals.set(2);
}
if (struct.isSetErrorMessage()) {
optionals.set(3);
}
if (struct.isSetTaskStatus()) {
optionals.set(4);
}
if (struct.isSetOperationStarted()) {
optionals.set(5);
}
if (struct.isSetOperationCompleted()) {
optionals.set(6);
}
if (struct.isSetHasResultSet()) {
optionals.set(7);
}
if (struct.isSetProgressUpdateResponse()) {
optionals.set(8);
}
if (struct.isSetNumModifiedRows()) {
optionals.set(9);
}
if (struct.isSetDisplayMessage()) {
optionals.set(10);
}
if (struct.isSetDiagnosticInfo()) {
optionals.set(11);
}
if (struct.isSetErrorDetailsJson()) {
optionals.set(12);
}
oprot.writeBitSet(optionals, 13);
if (struct.isSetOperationState()) {
oprot.writeI32(struct.operationState.getValue());
}
if (struct.isSetSqlState()) {
oprot.writeString(struct.sqlState);
}
if (struct.isSetErrorCode()) {
oprot.writeI32(struct.errorCode);
}
if (struct.isSetErrorMessage()) {
oprot.writeString(struct.errorMessage);
}
if (struct.isSetTaskStatus()) {
oprot.writeString(struct.taskStatus);
}
if (struct.isSetOperationStarted()) {
oprot.writeI64(struct.operationStarted);
}
if (struct.isSetOperationCompleted()) {
oprot.writeI64(struct.operationCompleted);
}
if (struct.isSetHasResultSet()) {
oprot.writeBool(struct.hasResultSet);
}
if (struct.isSetProgressUpdateResponse()) {
struct.progressUpdateResponse.write(oprot);
}
if (struct.isSetNumModifiedRows()) {
oprot.writeI64(struct.numModifiedRows);
}
if (struct.isSetDisplayMessage()) {
oprot.writeString(struct.displayMessage);
}
if (struct.isSetDiagnosticInfo()) {
oprot.writeString(struct.diagnosticInfo);
}
if (struct.isSetErrorDetailsJson()) {
oprot.writeString(struct.errorDetailsJson);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusResp struct)
throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.status = new TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(13);
if (incoming.get(0)) {
struct.operationState =
com.databricks.jdbc.client.impl.thrift.generated.TOperationState.findByValue(
iprot.readI32());
struct.setOperationStateIsSet(true);
}
if (incoming.get(1)) {
struct.sqlState = iprot.readString();
struct.setSqlStateIsSet(true);
}
if (incoming.get(2)) {
struct.errorCode = iprot.readI32();
struct.setErrorCodeIsSet(true);
}
if (incoming.get(3)) {
struct.errorMessage = iprot.readString();
struct.setErrorMessageIsSet(true);
}
if (incoming.get(4)) {
struct.taskStatus = iprot.readString();
struct.setTaskStatusIsSet(true);
}
if (incoming.get(5)) {
struct.operationStarted = iprot.readI64();
struct.setOperationStartedIsSet(true);
}
if (incoming.get(6)) {
struct.operationCompleted = iprot.readI64();
struct.setOperationCompletedIsSet(true);
}
if (incoming.get(7)) {
struct.hasResultSet = iprot.readBool();
struct.setHasResultSetIsSet(true);
}
if (incoming.get(8)) {
struct.progressUpdateResponse = new TProgressUpdateResp();
struct.progressUpdateResponse.read(iprot);
struct.setProgressUpdateResponseIsSet(true);
}
if (incoming.get(9)) {
struct.numModifiedRows = iprot.readI64();
struct.setNumModifiedRowsIsSet(true);
}
if (incoming.get(10)) {
struct.displayMessage = iprot.readString();
struct.setDisplayMessageIsSet(true);
}
if (incoming.get(11)) {
struct.diagnosticInfo = iprot.readString();
struct.setDiagnosticInfoIsSet(true);
}
if (incoming.get(12)) {
struct.errorDetailsJson = iprot.readString();
struct.setErrorDetailsJsonIsSet(true);
}
}
}
private static S scheme(
org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
? STANDARD_SCHEME_FACTORY
: TUPLE_SCHEME_FACTORY)
.getScheme();
}
}