TLanceIndexMutationRequest.java
/**
* Autogenerated by Thrift Compiler (0.24.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class TLanceIndexMutationRequest implements org.apache.thrift.TBase<TLanceIndexMutationRequest, TLanceIndexMutationRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TLanceIndexMutationRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TLanceIndexMutationRequest");
private static final org.apache.thrift.protocol.TField INVOCATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("invocation_id", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField BE_PROCESS_EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("be_process_epoch", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField DEADLINE_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("deadline_ms", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField MUTATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("mutation_type", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField INDEX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("index_name", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField INDEX_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("index_type", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField PROPERTIES_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("properties_json", org.apache.thrift.protocol.TType.STRING, (short)8);
private static final org.apache.thrift.protocol.TField IF_NOT_EXISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("if_not_exists", org.apache.thrift.protocol.TType.BOOL, (short)9);
private static final org.apache.thrift.protocol.TField IF_EXISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("if_exists", org.apache.thrift.protocol.TType.BOOL, (short)10);
private static final org.apache.thrift.protocol.TField DATASET_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("dataset_uri", org.apache.thrift.protocol.TType.STRING, (short)11);
private static final org.apache.thrift.protocol.TField ADMITTED_DATASET_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("admitted_dataset_version", org.apache.thrift.protocol.TType.I64, (short)12);
private static final org.apache.thrift.protocol.TField SCHEMA_CONTRACT_JSON_FIELD_DESC = new org.apache.thrift.protocol.TField("schema_contract_json", org.apache.thrift.protocol.TType.STRING, (short)13);
private static final org.apache.thrift.protocol.TField STORAGE_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("storage_options", org.apache.thrift.protocol.TType.MAP, (short)14);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TLanceIndexMutationRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TLanceIndexMutationRequestTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String invocation_id; // required
public long be_process_epoch; // required
public long deadline_ms; // required
/**
*
* @see TLanceIndexMutationType
*/
public @org.apache.thrift.annotation.Nullable TLanceIndexMutationType mutation_type; // required
public @org.apache.thrift.annotation.Nullable java.lang.String index_name; // required
public @org.apache.thrift.annotation.Nullable java.lang.String column_name; // required
public @org.apache.thrift.annotation.Nullable java.lang.String index_type; // required
public @org.apache.thrift.annotation.Nullable java.lang.String properties_json; // optional
public boolean if_not_exists; // optional
public boolean if_exists; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String dataset_uri; // required
public long admitted_dataset_version; // required
public @org.apache.thrift.annotation.Nullable java.lang.String schema_contract_json; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> storage_options; // 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 {
INVOCATION_ID((short)1, "invocation_id"),
BE_PROCESS_EPOCH((short)2, "be_process_epoch"),
DEADLINE_MS((short)3, "deadline_ms"),
/**
*
* @see TLanceIndexMutationType
*/
MUTATION_TYPE((short)4, "mutation_type"),
INDEX_NAME((short)5, "index_name"),
COLUMN_NAME((short)6, "column_name"),
INDEX_TYPE((short)7, "index_type"),
PROPERTIES_JSON((short)8, "properties_json"),
IF_NOT_EXISTS((short)9, "if_not_exists"),
IF_EXISTS((short)10, "if_exists"),
DATASET_URI((short)11, "dataset_uri"),
ADMITTED_DATASET_VERSION((short)12, "admitted_dataset_version"),
SCHEMA_CONTRACT_JSON((short)13, "schema_contract_json"),
STORAGE_OPTIONS((short)14, "storage_options");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
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: // INVOCATION_ID
return INVOCATION_ID;
case 2: // BE_PROCESS_EPOCH
return BE_PROCESS_EPOCH;
case 3: // DEADLINE_MS
return DEADLINE_MS;
case 4: // MUTATION_TYPE
return MUTATION_TYPE;
case 5: // INDEX_NAME
return INDEX_NAME;
case 6: // COLUMN_NAME
return COLUMN_NAME;
case 7: // INDEX_TYPE
return INDEX_TYPE;
case 8: // PROPERTIES_JSON
return PROPERTIES_JSON;
case 9: // IF_NOT_EXISTS
return IF_NOT_EXISTS;
case 10: // IF_EXISTS
return IF_EXISTS;
case 11: // DATASET_URI
return DATASET_URI;
case 12: // ADMITTED_DATASET_VERSION
return ADMITTED_DATASET_VERSION;
case 13: // SCHEMA_CONTRACT_JSON
return SCHEMA_CONTRACT_JSON;
case 14: // STORAGE_OPTIONS
return STORAGE_OPTIONS;
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 __BE_PROCESS_EPOCH_ISSET_ID = 0;
private static final int __DEADLINE_MS_ISSET_ID = 1;
private static final int __IF_NOT_EXISTS_ISSET_ID = 2;
private static final int __IF_EXISTS_ISSET_ID = 3;
private static final int __ADMITTED_DATASET_VERSION_ISSET_ID = 4;
private byte __isset_bitfield = 0;
private static final _Fields[] optionals = {_Fields.PROPERTIES_JSON,_Fields.IF_NOT_EXISTS,_Fields.IF_EXISTS,_Fields.SCHEMA_CONTRACT_JSON,_Fields.STORAGE_OPTIONS};
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.INVOCATION_ID, new org.apache.thrift.meta_data.FieldMetaData("invocation_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.BE_PROCESS_EPOCH, new org.apache.thrift.meta_data.FieldMetaData("be_process_epoch", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.DEADLINE_MS, new org.apache.thrift.meta_data.FieldMetaData("deadline_ms", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.MUTATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("mutation_type", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TLanceIndexMutationType.class)));
tmpMap.put(_Fields.INDEX_NAME, new org.apache.thrift.meta_data.FieldMetaData("index_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("column_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.INDEX_TYPE, new org.apache.thrift.meta_data.FieldMetaData("index_type", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PROPERTIES_JSON, new org.apache.thrift.meta_data.FieldMetaData("properties_json", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.IF_NOT_EXISTS, new org.apache.thrift.meta_data.FieldMetaData("if_not_exists", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.IF_EXISTS, new org.apache.thrift.meta_data.FieldMetaData("if_exists", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.DATASET_URI, new org.apache.thrift.meta_data.FieldMetaData("dataset_uri", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ADMITTED_DATASET_VERSION, new org.apache.thrift.meta_data.FieldMetaData("admitted_dataset_version", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SCHEMA_CONTRACT_JSON, new org.apache.thrift.meta_data.FieldMetaData("schema_contract_json", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STORAGE_OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("storage_options", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
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(TLanceIndexMutationRequest.class, metaDataMap);
}
public TLanceIndexMutationRequest() {
}
public TLanceIndexMutationRequest(
java.lang.String invocation_id,
long be_process_epoch,
long deadline_ms,
TLanceIndexMutationType mutation_type,
java.lang.String index_name,
java.lang.String column_name,
java.lang.String index_type,
java.lang.String dataset_uri,
long admitted_dataset_version)
{
this();
this.invocation_id = invocation_id;
this.be_process_epoch = be_process_epoch;
setBeProcessEpochIsSet(true);
this.deadline_ms = deadline_ms;
setDeadlineMsIsSet(true);
this.mutation_type = mutation_type;
this.index_name = index_name;
this.column_name = column_name;
this.index_type = index_type;
this.dataset_uri = dataset_uri;
this.admitted_dataset_version = admitted_dataset_version;
setAdmittedDatasetVersionIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TLanceIndexMutationRequest(TLanceIndexMutationRequest other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetInvocationId()) {
this.invocation_id = other.invocation_id;
}
this.be_process_epoch = other.be_process_epoch;
this.deadline_ms = other.deadline_ms;
if (other.isSetMutationType()) {
this.mutation_type = other.mutation_type;
}
if (other.isSetIndexName()) {
this.index_name = other.index_name;
}
if (other.isSetColumnName()) {
this.column_name = other.column_name;
}
if (other.isSetIndexType()) {
this.index_type = other.index_type;
}
if (other.isSetPropertiesJson()) {
this.properties_json = other.properties_json;
}
this.if_not_exists = other.if_not_exists;
this.if_exists = other.if_exists;
if (other.isSetDatasetUri()) {
this.dataset_uri = other.dataset_uri;
}
this.admitted_dataset_version = other.admitted_dataset_version;
if (other.isSetSchemaContractJson()) {
this.schema_contract_json = other.schema_contract_json;
}
if (other.isSetStorageOptions()) {
java.util.Map<java.lang.String,java.lang.String> __this__storage_options = new java.util.HashMap<java.lang.String,java.lang.String>(other.storage_options);
this.storage_options = __this__storage_options;
}
}
@Override
public TLanceIndexMutationRequest deepCopy() {
return new TLanceIndexMutationRequest(this);
}
@Override
public void clear() {
this.invocation_id = null;
setBeProcessEpochIsSet(false);
this.be_process_epoch = 0;
setDeadlineMsIsSet(false);
this.deadline_ms = 0;
this.mutation_type = null;
this.index_name = null;
this.column_name = null;
this.index_type = null;
this.properties_json = null;
setIfNotExistsIsSet(false);
this.if_not_exists = false;
setIfExistsIsSet(false);
this.if_exists = false;
this.dataset_uri = null;
setAdmittedDatasetVersionIsSet(false);
this.admitted_dataset_version = 0;
this.schema_contract_json = null;
this.storage_options = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getInvocationId() {
return this.invocation_id;
}
public TLanceIndexMutationRequest setInvocationId(@org.apache.thrift.annotation.Nullable java.lang.String invocation_id) {
this.invocation_id = invocation_id;
return this;
}
public void unsetInvocationId() {
this.invocation_id = null;
}
/** Returns true if field invocation_id is set (has been assigned a value) and false otherwise */
public boolean isSetInvocationId() {
return this.invocation_id != null;
}
public void setInvocationIdIsSet(boolean value) {
if (!value) {
this.invocation_id = null;
}
}
public long getBeProcessEpoch() {
return this.be_process_epoch;
}
public TLanceIndexMutationRequest setBeProcessEpoch(long be_process_epoch) {
this.be_process_epoch = be_process_epoch;
setBeProcessEpochIsSet(true);
return this;
}
public void unsetBeProcessEpoch() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BE_PROCESS_EPOCH_ISSET_ID);
}
/** Returns true if field be_process_epoch is set (has been assigned a value) and false otherwise */
public boolean isSetBeProcessEpoch() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BE_PROCESS_EPOCH_ISSET_ID);
}
public void setBeProcessEpochIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BE_PROCESS_EPOCH_ISSET_ID, value);
}
public long getDeadlineMs() {
return this.deadline_ms;
}
public TLanceIndexMutationRequest setDeadlineMs(long deadline_ms) {
this.deadline_ms = deadline_ms;
setDeadlineMsIsSet(true);
return this;
}
public void unsetDeadlineMs() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEADLINE_MS_ISSET_ID);
}
/** Returns true if field deadline_ms is set (has been assigned a value) and false otherwise */
public boolean isSetDeadlineMs() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEADLINE_MS_ISSET_ID);
}
public void setDeadlineMsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEADLINE_MS_ISSET_ID, value);
}
/**
*
* @see TLanceIndexMutationType
*/
@org.apache.thrift.annotation.Nullable
public TLanceIndexMutationType getMutationType() {
return this.mutation_type;
}
/**
*
* @see TLanceIndexMutationType
*/
public TLanceIndexMutationRequest setMutationType(@org.apache.thrift.annotation.Nullable TLanceIndexMutationType mutation_type) {
this.mutation_type = mutation_type;
return this;
}
public void unsetMutationType() {
this.mutation_type = null;
}
/** Returns true if field mutation_type is set (has been assigned a value) and false otherwise */
public boolean isSetMutationType() {
return this.mutation_type != null;
}
public void setMutationTypeIsSet(boolean value) {
if (!value) {
this.mutation_type = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getIndexName() {
return this.index_name;
}
public TLanceIndexMutationRequest setIndexName(@org.apache.thrift.annotation.Nullable java.lang.String index_name) {
this.index_name = index_name;
return this;
}
public void unsetIndexName() {
this.index_name = null;
}
/** Returns true if field index_name is set (has been assigned a value) and false otherwise */
public boolean isSetIndexName() {
return this.index_name != null;
}
public void setIndexNameIsSet(boolean value) {
if (!value) {
this.index_name = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getColumnName() {
return this.column_name;
}
public TLanceIndexMutationRequest setColumnName(@org.apache.thrift.annotation.Nullable java.lang.String column_name) {
this.column_name = column_name;
return this;
}
public void unsetColumnName() {
this.column_name = null;
}
/** Returns true if field column_name is set (has been assigned a value) and false otherwise */
public boolean isSetColumnName() {
return this.column_name != null;
}
public void setColumnNameIsSet(boolean value) {
if (!value) {
this.column_name = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getIndexType() {
return this.index_type;
}
public TLanceIndexMutationRequest setIndexType(@org.apache.thrift.annotation.Nullable java.lang.String index_type) {
this.index_type = index_type;
return this;
}
public void unsetIndexType() {
this.index_type = null;
}
/** Returns true if field index_type is set (has been assigned a value) and false otherwise */
public boolean isSetIndexType() {
return this.index_type != null;
}
public void setIndexTypeIsSet(boolean value) {
if (!value) {
this.index_type = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getPropertiesJson() {
return this.properties_json;
}
public TLanceIndexMutationRequest setPropertiesJson(@org.apache.thrift.annotation.Nullable java.lang.String properties_json) {
this.properties_json = properties_json;
return this;
}
public void unsetPropertiesJson() {
this.properties_json = null;
}
/** Returns true if field properties_json is set (has been assigned a value) and false otherwise */
public boolean isSetPropertiesJson() {
return this.properties_json != null;
}
public void setPropertiesJsonIsSet(boolean value) {
if (!value) {
this.properties_json = null;
}
}
public boolean isIfNotExists() {
return this.if_not_exists;
}
public TLanceIndexMutationRequest setIfNotExists(boolean if_not_exists) {
this.if_not_exists = if_not_exists;
setIfNotExistsIsSet(true);
return this;
}
public void unsetIfNotExists() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IF_NOT_EXISTS_ISSET_ID);
}
/** Returns true if field if_not_exists is set (has been assigned a value) and false otherwise */
public boolean isSetIfNotExists() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IF_NOT_EXISTS_ISSET_ID);
}
public void setIfNotExistsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IF_NOT_EXISTS_ISSET_ID, value);
}
public boolean isIfExists() {
return this.if_exists;
}
public TLanceIndexMutationRequest setIfExists(boolean if_exists) {
this.if_exists = if_exists;
setIfExistsIsSet(true);
return this;
}
public void unsetIfExists() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IF_EXISTS_ISSET_ID);
}
/** Returns true if field if_exists is set (has been assigned a value) and false otherwise */
public boolean isSetIfExists() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IF_EXISTS_ISSET_ID);
}
public void setIfExistsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IF_EXISTS_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDatasetUri() {
return this.dataset_uri;
}
public TLanceIndexMutationRequest setDatasetUri(@org.apache.thrift.annotation.Nullable java.lang.String dataset_uri) {
this.dataset_uri = dataset_uri;
return this;
}
public void unsetDatasetUri() {
this.dataset_uri = null;
}
/** Returns true if field dataset_uri is set (has been assigned a value) and false otherwise */
public boolean isSetDatasetUri() {
return this.dataset_uri != null;
}
public void setDatasetUriIsSet(boolean value) {
if (!value) {
this.dataset_uri = null;
}
}
public long getAdmittedDatasetVersion() {
return this.admitted_dataset_version;
}
public TLanceIndexMutationRequest setAdmittedDatasetVersion(long admitted_dataset_version) {
this.admitted_dataset_version = admitted_dataset_version;
setAdmittedDatasetVersionIsSet(true);
return this;
}
public void unsetAdmittedDatasetVersion() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ADMITTED_DATASET_VERSION_ISSET_ID);
}
/** Returns true if field admitted_dataset_version is set (has been assigned a value) and false otherwise */
public boolean isSetAdmittedDatasetVersion() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ADMITTED_DATASET_VERSION_ISSET_ID);
}
public void setAdmittedDatasetVersionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ADMITTED_DATASET_VERSION_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getSchemaContractJson() {
return this.schema_contract_json;
}
public TLanceIndexMutationRequest setSchemaContractJson(@org.apache.thrift.annotation.Nullable java.lang.String schema_contract_json) {
this.schema_contract_json = schema_contract_json;
return this;
}
public void unsetSchemaContractJson() {
this.schema_contract_json = null;
}
/** Returns true if field schema_contract_json is set (has been assigned a value) and false otherwise */
public boolean isSetSchemaContractJson() {
return this.schema_contract_json != null;
}
public void setSchemaContractJsonIsSet(boolean value) {
if (!value) {
this.schema_contract_json = null;
}
}
public int getStorageOptionsSize() {
return (this.storage_options == null) ? 0 : this.storage_options.size();
}
public void putToStorageOptions(java.lang.String key, java.lang.String val) {
if (this.storage_options == null) {
this.storage_options = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.storage_options.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.String,java.lang.String> getStorageOptions() {
return this.storage_options;
}
public TLanceIndexMutationRequest setStorageOptions(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> storage_options) {
this.storage_options = storage_options;
return this;
}
public void unsetStorageOptions() {
this.storage_options = null;
}
/** Returns true if field storage_options is set (has been assigned a value) and false otherwise */
public boolean isSetStorageOptions() {
return this.storage_options != null;
}
public void setStorageOptionsIsSet(boolean value) {
if (!value) {
this.storage_options = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case INVOCATION_ID:
if (value == null) {
unsetInvocationId();
} else {
setInvocationId((java.lang.String)value);
}
break;
case BE_PROCESS_EPOCH:
if (value == null) {
unsetBeProcessEpoch();
} else {
setBeProcessEpoch((java.lang.Long)value);
}
break;
case DEADLINE_MS:
if (value == null) {
unsetDeadlineMs();
} else {
setDeadlineMs((java.lang.Long)value);
}
break;
case MUTATION_TYPE:
if (value == null) {
unsetMutationType();
} else {
setMutationType((TLanceIndexMutationType)value);
}
break;
case INDEX_NAME:
if (value == null) {
unsetIndexName();
} else {
setIndexName((java.lang.String)value);
}
break;
case COLUMN_NAME:
if (value == null) {
unsetColumnName();
} else {
setColumnName((java.lang.String)value);
}
break;
case INDEX_TYPE:
if (value == null) {
unsetIndexType();
} else {
setIndexType((java.lang.String)value);
}
break;
case PROPERTIES_JSON:
if (value == null) {
unsetPropertiesJson();
} else {
setPropertiesJson((java.lang.String)value);
}
break;
case IF_NOT_EXISTS:
if (value == null) {
unsetIfNotExists();
} else {
setIfNotExists((java.lang.Boolean)value);
}
break;
case IF_EXISTS:
if (value == null) {
unsetIfExists();
} else {
setIfExists((java.lang.Boolean)value);
}
break;
case DATASET_URI:
if (value == null) {
unsetDatasetUri();
} else {
setDatasetUri((java.lang.String)value);
}
break;
case ADMITTED_DATASET_VERSION:
if (value == null) {
unsetAdmittedDatasetVersion();
} else {
setAdmittedDatasetVersion((java.lang.Long)value);
}
break;
case SCHEMA_CONTRACT_JSON:
if (value == null) {
unsetSchemaContractJson();
} else {
setSchemaContractJson((java.lang.String)value);
}
break;
case STORAGE_OPTIONS:
if (value == null) {
unsetStorageOptions();
} else {
setStorageOptions((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case INVOCATION_ID:
return getInvocationId();
case BE_PROCESS_EPOCH:
return getBeProcessEpoch();
case DEADLINE_MS:
return getDeadlineMs();
case MUTATION_TYPE:
return getMutationType();
case INDEX_NAME:
return getIndexName();
case COLUMN_NAME:
return getColumnName();
case INDEX_TYPE:
return getIndexType();
case PROPERTIES_JSON:
return getPropertiesJson();
case IF_NOT_EXISTS:
return isIfNotExists();
case IF_EXISTS:
return isIfExists();
case DATASET_URI:
return getDatasetUri();
case ADMITTED_DATASET_VERSION:
return getAdmittedDatasetVersion();
case SCHEMA_CONTRACT_JSON:
return getSchemaContractJson();
case STORAGE_OPTIONS:
return getStorageOptions();
}
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 INVOCATION_ID:
return isSetInvocationId();
case BE_PROCESS_EPOCH:
return isSetBeProcessEpoch();
case DEADLINE_MS:
return isSetDeadlineMs();
case MUTATION_TYPE:
return isSetMutationType();
case INDEX_NAME:
return isSetIndexName();
case COLUMN_NAME:
return isSetColumnName();
case INDEX_TYPE:
return isSetIndexType();
case PROPERTIES_JSON:
return isSetPropertiesJson();
case IF_NOT_EXISTS:
return isSetIfNotExists();
case IF_EXISTS:
return isSetIfExists();
case DATASET_URI:
return isSetDatasetUri();
case ADMITTED_DATASET_VERSION:
return isSetAdmittedDatasetVersion();
case SCHEMA_CONTRACT_JSON:
return isSetSchemaContractJson();
case STORAGE_OPTIONS:
return isSetStorageOptions();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TLanceIndexMutationRequest)
return this.equals((TLanceIndexMutationRequest)that);
return false;
}
public boolean equals(TLanceIndexMutationRequest that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_invocation_id = true && this.isSetInvocationId();
boolean that_present_invocation_id = true && that.isSetInvocationId();
if (this_present_invocation_id || that_present_invocation_id) {
if (!(this_present_invocation_id && that_present_invocation_id))
return false;
if (!this.invocation_id.equals(that.invocation_id))
return false;
}
boolean this_present_be_process_epoch = true;
boolean that_present_be_process_epoch = true;
if (this_present_be_process_epoch || that_present_be_process_epoch) {
if (!(this_present_be_process_epoch && that_present_be_process_epoch))
return false;
if (this.be_process_epoch != that.be_process_epoch)
return false;
}
boolean this_present_deadline_ms = true;
boolean that_present_deadline_ms = true;
if (this_present_deadline_ms || that_present_deadline_ms) {
if (!(this_present_deadline_ms && that_present_deadline_ms))
return false;
if (this.deadline_ms != that.deadline_ms)
return false;
}
boolean this_present_mutation_type = true && this.isSetMutationType();
boolean that_present_mutation_type = true && that.isSetMutationType();
if (this_present_mutation_type || that_present_mutation_type) {
if (!(this_present_mutation_type && that_present_mutation_type))
return false;
if (!this.mutation_type.equals(that.mutation_type))
return false;
}
boolean this_present_index_name = true && this.isSetIndexName();
boolean that_present_index_name = true && that.isSetIndexName();
if (this_present_index_name || that_present_index_name) {
if (!(this_present_index_name && that_present_index_name))
return false;
if (!this.index_name.equals(that.index_name))
return false;
}
boolean this_present_column_name = true && this.isSetColumnName();
boolean that_present_column_name = true && that.isSetColumnName();
if (this_present_column_name || that_present_column_name) {
if (!(this_present_column_name && that_present_column_name))
return false;
if (!this.column_name.equals(that.column_name))
return false;
}
boolean this_present_index_type = true && this.isSetIndexType();
boolean that_present_index_type = true && that.isSetIndexType();
if (this_present_index_type || that_present_index_type) {
if (!(this_present_index_type && that_present_index_type))
return false;
if (!this.index_type.equals(that.index_type))
return false;
}
boolean this_present_properties_json = true && this.isSetPropertiesJson();
boolean that_present_properties_json = true && that.isSetPropertiesJson();
if (this_present_properties_json || that_present_properties_json) {
if (!(this_present_properties_json && that_present_properties_json))
return false;
if (!this.properties_json.equals(that.properties_json))
return false;
}
boolean this_present_if_not_exists = true && this.isSetIfNotExists();
boolean that_present_if_not_exists = true && that.isSetIfNotExists();
if (this_present_if_not_exists || that_present_if_not_exists) {
if (!(this_present_if_not_exists && that_present_if_not_exists))
return false;
if (this.if_not_exists != that.if_not_exists)
return false;
}
boolean this_present_if_exists = true && this.isSetIfExists();
boolean that_present_if_exists = true && that.isSetIfExists();
if (this_present_if_exists || that_present_if_exists) {
if (!(this_present_if_exists && that_present_if_exists))
return false;
if (this.if_exists != that.if_exists)
return false;
}
boolean this_present_dataset_uri = true && this.isSetDatasetUri();
boolean that_present_dataset_uri = true && that.isSetDatasetUri();
if (this_present_dataset_uri || that_present_dataset_uri) {
if (!(this_present_dataset_uri && that_present_dataset_uri))
return false;
if (!this.dataset_uri.equals(that.dataset_uri))
return false;
}
boolean this_present_admitted_dataset_version = true;
boolean that_present_admitted_dataset_version = true;
if (this_present_admitted_dataset_version || that_present_admitted_dataset_version) {
if (!(this_present_admitted_dataset_version && that_present_admitted_dataset_version))
return false;
if (this.admitted_dataset_version != that.admitted_dataset_version)
return false;
}
boolean this_present_schema_contract_json = true && this.isSetSchemaContractJson();
boolean that_present_schema_contract_json = true && that.isSetSchemaContractJson();
if (this_present_schema_contract_json || that_present_schema_contract_json) {
if (!(this_present_schema_contract_json && that_present_schema_contract_json))
return false;
if (!this.schema_contract_json.equals(that.schema_contract_json))
return false;
}
boolean this_present_storage_options = true && this.isSetStorageOptions();
boolean that_present_storage_options = true && that.isSetStorageOptions();
if (this_present_storage_options || that_present_storage_options) {
if (!(this_present_storage_options && that_present_storage_options))
return false;
if (!this.storage_options.equals(that.storage_options))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetInvocationId()) ? 131071 : 524287);
if (isSetInvocationId())
hashCode = hashCode * 8191 + invocation_id.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(be_process_epoch);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(deadline_ms);
hashCode = hashCode * 8191 + ((isSetMutationType()) ? 131071 : 524287);
if (isSetMutationType())
hashCode = hashCode * 8191 + mutation_type.getValue();
hashCode = hashCode * 8191 + ((isSetIndexName()) ? 131071 : 524287);
if (isSetIndexName())
hashCode = hashCode * 8191 + index_name.hashCode();
hashCode = hashCode * 8191 + ((isSetColumnName()) ? 131071 : 524287);
if (isSetColumnName())
hashCode = hashCode * 8191 + column_name.hashCode();
hashCode = hashCode * 8191 + ((isSetIndexType()) ? 131071 : 524287);
if (isSetIndexType())
hashCode = hashCode * 8191 + index_type.hashCode();
hashCode = hashCode * 8191 + ((isSetPropertiesJson()) ? 131071 : 524287);
if (isSetPropertiesJson())
hashCode = hashCode * 8191 + properties_json.hashCode();
hashCode = hashCode * 8191 + ((isSetIfNotExists()) ? 131071 : 524287);
if (isSetIfNotExists())
hashCode = hashCode * 8191 + ((if_not_exists) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIfExists()) ? 131071 : 524287);
if (isSetIfExists())
hashCode = hashCode * 8191 + ((if_exists) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetDatasetUri()) ? 131071 : 524287);
if (isSetDatasetUri())
hashCode = hashCode * 8191 + dataset_uri.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(admitted_dataset_version);
hashCode = hashCode * 8191 + ((isSetSchemaContractJson()) ? 131071 : 524287);
if (isSetSchemaContractJson())
hashCode = hashCode * 8191 + schema_contract_json.hashCode();
hashCode = hashCode * 8191 + ((isSetStorageOptions()) ? 131071 : 524287);
if (isSetStorageOptions())
hashCode = hashCode * 8191 + storage_options.hashCode();
return hashCode;
}
@Override
public int compareTo(TLanceIndexMutationRequest other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetInvocationId(), other.isSetInvocationId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInvocationId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invocation_id, other.invocation_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBeProcessEpoch(), other.isSetBeProcessEpoch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBeProcessEpoch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.be_process_epoch, other.be_process_epoch);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDeadlineMs(), other.isSetDeadlineMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeadlineMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deadline_ms, other.deadline_ms);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMutationType(), other.isSetMutationType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMutationType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutation_type, other.mutation_type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIndexName(), other.isSetIndexName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_name, other.index_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetColumnName(), other.isSetColumnName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetColumnName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIndexType(), other.isSetIndexType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_type, other.index_type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPropertiesJson(), other.isSetPropertiesJson());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPropertiesJson()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties_json, other.properties_json);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIfNotExists(), other.isSetIfNotExists());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIfNotExists()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.if_not_exists, other.if_not_exists);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIfExists(), other.isSetIfExists());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIfExists()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.if_exists, other.if_exists);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDatasetUri(), other.isSetDatasetUri());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDatasetUri()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataset_uri, other.dataset_uri);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAdmittedDatasetVersion(), other.isSetAdmittedDatasetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAdmittedDatasetVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.admitted_dataset_version, other.admitted_dataset_version);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSchemaContractJson(), other.isSetSchemaContractJson());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSchemaContractJson()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema_contract_json, other.schema_contract_json);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStorageOptions(), other.isSetStorageOptions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStorageOptions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storage_options, other.storage_options);
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("TLanceIndexMutationRequest(");
boolean first = true;
sb.append("invocation_id:");
if (this.invocation_id == null) {
sb.append("null");
} else {
sb.append(this.invocation_id);
}
first = false;
if (!first) sb.append(", ");
sb.append("be_process_epoch:");
sb.append(this.be_process_epoch);
first = false;
if (!first) sb.append(", ");
sb.append("deadline_ms:");
sb.append(this.deadline_ms);
first = false;
if (!first) sb.append(", ");
sb.append("mutation_type:");
if (this.mutation_type == null) {
sb.append("null");
} else {
sb.append(this.mutation_type);
}
first = false;
if (!first) sb.append(", ");
sb.append("index_name:");
if (this.index_name == null) {
sb.append("null");
} else {
sb.append(this.index_name);
}
first = false;
if (!first) sb.append(", ");
sb.append("column_name:");
if (this.column_name == null) {
sb.append("null");
} else {
sb.append(this.column_name);
}
first = false;
if (!first) sb.append(", ");
sb.append("index_type:");
if (this.index_type == null) {
sb.append("null");
} else {
sb.append(this.index_type);
}
first = false;
if (isSetPropertiesJson()) {
if (!first) sb.append(", ");
sb.append("properties_json:");
if (this.properties_json == null) {
sb.append("null");
} else {
sb.append(this.properties_json);
}
first = false;
}
if (isSetIfNotExists()) {
if (!first) sb.append(", ");
sb.append("if_not_exists:");
sb.append(this.if_not_exists);
first = false;
}
if (isSetIfExists()) {
if (!first) sb.append(", ");
sb.append("if_exists:");
sb.append(this.if_exists);
first = false;
}
if (!first) sb.append(", ");
sb.append("dataset_uri:");
if (this.dataset_uri == null) {
sb.append("null");
} else {
sb.append(this.dataset_uri);
}
first = false;
if (!first) sb.append(", ");
sb.append("admitted_dataset_version:");
sb.append(this.admitted_dataset_version);
first = false;
if (isSetSchemaContractJson()) {
if (!first) sb.append(", ");
sb.append("schema_contract_json:");
if (this.schema_contract_json == null) {
sb.append("null");
} else {
sb.append(this.schema_contract_json);
}
first = false;
}
if (isSetStorageOptions()) {
if (!first) sb.append(", ");
sb.append("storage_options:");
if (this.storage_options == null) {
sb.append("null");
} else {
sb.append(this.storage_options);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (invocation_id == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'invocation_id' was not present! Struct: " + toString());
}
// alas, we cannot check 'be_process_epoch' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'deadline_ms' because it's a primitive and you chose the non-beans generator.
if (mutation_type == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'mutation_type' was not present! Struct: " + toString());
}
if (index_name == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'index_name' was not present! Struct: " + toString());
}
if (column_name == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'column_name' was not present! Struct: " + toString());
}
if (index_type == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'index_type' was not present! Struct: " + toString());
}
if (dataset_uri == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'dataset_uri' was not present! Struct: " + toString());
}
// alas, we cannot check 'admitted_dataset_version' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
}
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 TLanceIndexMutationRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TLanceIndexMutationRequestStandardScheme getScheme() {
return new TLanceIndexMutationRequestStandardScheme();
}
}
private static class TLanceIndexMutationRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TLanceIndexMutationRequest> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TLanceIndexMutationRequest struct) throws org.apache.thrift.TException {
iprot.incrementRecursionDepth();
try {
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: // INVOCATION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.invocation_id = iprot.readString();
struct.setInvocationIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // BE_PROCESS_EPOCH
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.be_process_epoch = iprot.readI64();
struct.setBeProcessEpochIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // DEADLINE_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.deadline_ms = iprot.readI64();
struct.setDeadlineMsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // MUTATION_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.mutation_type = org.apache.doris.thrift.TLanceIndexMutationType.findByValue(iprot.readI32());
struct.setMutationTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // INDEX_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.index_name = iprot.readString();
struct.setIndexNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // COLUMN_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column_name = iprot.readString();
struct.setColumnNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // INDEX_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.index_type = iprot.readString();
struct.setIndexTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // PROPERTIES_JSON
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.properties_json = iprot.readString();
struct.setPropertiesJsonIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // IF_NOT_EXISTS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.if_not_exists = iprot.readBool();
struct.setIfNotExistsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // IF_EXISTS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.if_exists = iprot.readBool();
struct.setIfExistsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // DATASET_URI
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.dataset_uri = iprot.readString();
struct.setDatasetUriIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // ADMITTED_DATASET_VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.admitted_dataset_version = iprot.readI64();
struct.setAdmittedDatasetVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // SCHEMA_CONTRACT_JSON
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.schema_contract_json = iprot.readString();
struct.setSchemaContractJsonIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // STORAGE_OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map206 = iprot.readMapBegin();
struct.storage_options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map206.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key207;
@org.apache.thrift.annotation.Nullable java.lang.String _val208;
for (int _i209 = 0; _i209 < _map206.size; ++_i209)
{
_key207 = iprot.readString();
_val208 = iprot.readString();
struct.storage_options.put(_key207, _val208);
}
iprot.readMapEnd();
}
struct.setStorageOptionsIsSet(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
if (!struct.isSetBeProcessEpoch()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'be_process_epoch' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetDeadlineMs()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'deadline_ms' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetAdmittedDatasetVersion()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'admitted_dataset_version' was not found in serialized data! Struct: " + toString());
}
struct.validate();
} finally {
iprot.decrementRecursionDepth();
}
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, TLanceIndexMutationRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.invocation_id != null) {
oprot.writeFieldBegin(INVOCATION_ID_FIELD_DESC);
oprot.writeString(struct.invocation_id);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(BE_PROCESS_EPOCH_FIELD_DESC);
oprot.writeI64(struct.be_process_epoch);
oprot.writeFieldEnd();
oprot.writeFieldBegin(DEADLINE_MS_FIELD_DESC);
oprot.writeI64(struct.deadline_ms);
oprot.writeFieldEnd();
if (struct.mutation_type != null) {
oprot.writeFieldBegin(MUTATION_TYPE_FIELD_DESC);
oprot.writeI32(struct.mutation_type.getValue());
oprot.writeFieldEnd();
}
if (struct.index_name != null) {
oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC);
oprot.writeString(struct.index_name);
oprot.writeFieldEnd();
}
if (struct.column_name != null) {
oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
oprot.writeString(struct.column_name);
oprot.writeFieldEnd();
}
if (struct.index_type != null) {
oprot.writeFieldBegin(INDEX_TYPE_FIELD_DESC);
oprot.writeString(struct.index_type);
oprot.writeFieldEnd();
}
if (struct.properties_json != null) {
if (struct.isSetPropertiesJson()) {
oprot.writeFieldBegin(PROPERTIES_JSON_FIELD_DESC);
oprot.writeString(struct.properties_json);
oprot.writeFieldEnd();
}
}
if (struct.isSetIfNotExists()) {
oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC);
oprot.writeBool(struct.if_not_exists);
oprot.writeFieldEnd();
}
if (struct.isSetIfExists()) {
oprot.writeFieldBegin(IF_EXISTS_FIELD_DESC);
oprot.writeBool(struct.if_exists);
oprot.writeFieldEnd();
}
if (struct.dataset_uri != null) {
oprot.writeFieldBegin(DATASET_URI_FIELD_DESC);
oprot.writeString(struct.dataset_uri);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(ADMITTED_DATASET_VERSION_FIELD_DESC);
oprot.writeI64(struct.admitted_dataset_version);
oprot.writeFieldEnd();
if (struct.schema_contract_json != null) {
if (struct.isSetSchemaContractJson()) {
oprot.writeFieldBegin(SCHEMA_CONTRACT_JSON_FIELD_DESC);
oprot.writeString(struct.schema_contract_json);
oprot.writeFieldEnd();
}
}
if (struct.storage_options != null) {
if (struct.isSetStorageOptions()) {
oprot.writeFieldBegin(STORAGE_OPTIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.storage_options.size()));
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter210 : struct.storage_options.entrySet())
{
oprot.writeString(_iter210.getKey());
oprot.writeString(_iter210.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TLanceIndexMutationRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TLanceIndexMutationRequestTupleScheme getScheme() {
return new TLanceIndexMutationRequestTupleScheme();
}
}
private static class TLanceIndexMutationRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TLanceIndexMutationRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TLanceIndexMutationRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.invocation_id);
oprot.writeI64(struct.be_process_epoch);
oprot.writeI64(struct.deadline_ms);
oprot.writeI32(struct.mutation_type.getValue());
oprot.writeString(struct.index_name);
oprot.writeString(struct.column_name);
oprot.writeString(struct.index_type);
oprot.writeString(struct.dataset_uri);
oprot.writeI64(struct.admitted_dataset_version);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetPropertiesJson()) {
optionals.set(0);
}
if (struct.isSetIfNotExists()) {
optionals.set(1);
}
if (struct.isSetIfExists()) {
optionals.set(2);
}
if (struct.isSetSchemaContractJson()) {
optionals.set(3);
}
if (struct.isSetStorageOptions()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
if (struct.isSetPropertiesJson()) {
oprot.writeString(struct.properties_json);
}
if (struct.isSetIfNotExists()) {
oprot.writeBool(struct.if_not_exists);
}
if (struct.isSetIfExists()) {
oprot.writeBool(struct.if_exists);
}
if (struct.isSetSchemaContractJson()) {
oprot.writeString(struct.schema_contract_json);
}
if (struct.isSetStorageOptions()) {
{
oprot.writeI32(struct.storage_options.size());
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter211 : struct.storage_options.entrySet())
{
oprot.writeString(_iter211.getKey());
oprot.writeString(_iter211.getValue());
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TLanceIndexMutationRequest struct) throws org.apache.thrift.TException {
prot.incrementRecursionDepth();
try {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.invocation_id = iprot.readString();
struct.setInvocationIdIsSet(true);
struct.be_process_epoch = iprot.readI64();
struct.setBeProcessEpochIsSet(true);
struct.deadline_ms = iprot.readI64();
struct.setDeadlineMsIsSet(true);
struct.mutation_type = org.apache.doris.thrift.TLanceIndexMutationType.findByValue(iprot.readI32());
struct.setMutationTypeIsSet(true);
struct.index_name = iprot.readString();
struct.setIndexNameIsSet(true);
struct.column_name = iprot.readString();
struct.setColumnNameIsSet(true);
struct.index_type = iprot.readString();
struct.setIndexTypeIsSet(true);
struct.dataset_uri = iprot.readString();
struct.setDatasetUriIsSet(true);
struct.admitted_dataset_version = iprot.readI64();
struct.setAdmittedDatasetVersionIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.properties_json = iprot.readString();
struct.setPropertiesJsonIsSet(true);
}
if (incoming.get(1)) {
struct.if_not_exists = iprot.readBool();
struct.setIfNotExistsIsSet(true);
}
if (incoming.get(2)) {
struct.if_exists = iprot.readBool();
struct.setIfExistsIsSet(true);
}
if (incoming.get(3)) {
struct.schema_contract_json = iprot.readString();
struct.setSchemaContractJsonIsSet(true);
}
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TMap _map212 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.storage_options = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map212.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key213;
@org.apache.thrift.annotation.Nullable java.lang.String _val214;
for (int _i215 = 0; _i215 < _map212.size; ++_i215)
{
_key213 = iprot.readString();
_val214 = iprot.readString();
struct.storage_options.put(_key213, _val214);
}
}
struct.setStorageOptionsIsSet(true);
}
} finally {
prot.decrementRecursionDepth();
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> 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();
}
}