| /** |
| * Autogenerated by Thrift Compiler (0.9.0) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.sentry.provider.db.service.thrift; |
| |
| import org.apache.commons.lang.builder.HashCodeBuilder; |
| import org.apache.thrift.scheme.IScheme; |
| import org.apache.thrift.scheme.SchemeFactory; |
| import org.apache.thrift.scheme.StandardScheme; |
| |
| import org.apache.thrift.scheme.TupleScheme; |
| import org.apache.thrift.protocol.TTupleProtocol; |
| import org.apache.thrift.protocol.TProtocolException; |
| import org.apache.thrift.EncodingUtils; |
| import org.apache.thrift.TException; |
| import java.util.List; |
| import java.util.ArrayList; |
| import java.util.Map; |
| import java.util.HashMap; |
| import java.util.EnumMap; |
| import java.util.Set; |
| import java.util.HashSet; |
| import java.util.EnumSet; |
| import java.util.Collections; |
| import java.util.BitSet; |
| import java.nio.ByteBuffer; |
| import java.util.Arrays; |
| import org.slf4j.Logger; |
| import org.slf4j.LoggerFactory; |
| |
| public class TPathChanges implements org.apache.thrift.TBase<TPathChanges, TPathChanges._Fields>, java.io.Serializable, Cloneable { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPathChanges"); |
| |
| private static final org.apache.thrift.protocol.TField AUTHZ_OBJ_FIELD_DESC = new org.apache.thrift.protocol.TField("authzObj", org.apache.thrift.protocol.TType.STRING, (short)1); |
| private static final org.apache.thrift.protocol.TField ADD_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("addPaths", org.apache.thrift.protocol.TType.LIST, (short)2); |
| private static final org.apache.thrift.protocol.TField DEL_PATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("delPaths", org.apache.thrift.protocol.TType.LIST, (short)3); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new TPathChangesStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new TPathChangesTupleSchemeFactory()); |
| } |
| |
| private String authzObj; // required |
| private List<List<String>> addPaths; // required |
| private List<List<String>> delPaths; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| AUTHZ_OBJ((short)1, "authzObj"), |
| ADD_PATHS((short)2, "addPaths"), |
| DEL_PATHS((short)3, "delPaths"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // AUTHZ_OBJ |
| return AUTHZ_OBJ; |
| case 2: // ADD_PATHS |
| return ADD_PATHS; |
| case 3: // DEL_PATHS |
| return DEL_PATHS; |
| 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.AUTHZ_OBJ, new org.apache.thrift.meta_data.FieldMetaData("authzObj", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.ADD_PATHS, new org.apache.thrift.meta_data.FieldMetaData("addPaths", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, |
| new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); |
| tmpMap.put(_Fields.DEL_PATHS, new org.apache.thrift.meta_data.FieldMetaData("delPaths", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, |
| new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPathChanges.class, metaDataMap); |
| } |
| |
| public TPathChanges() { |
| } |
| |
| public TPathChanges( |
| String authzObj, |
| List<List<String>> addPaths, |
| List<List<String>> delPaths) |
| { |
| this(); |
| this.authzObj = authzObj; |
| this.addPaths = addPaths; |
| this.delPaths = delPaths; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public TPathChanges(TPathChanges other) { |
| if (other.isSetAuthzObj()) { |
| this.authzObj = other.authzObj; |
| } |
| if (other.isSetAddPaths()) { |
| List<List<String>> __this__addPaths = new ArrayList<List<String>>(); |
| for (List<String> other_element : other.addPaths) { |
| List<String> __this__addPaths_copy = new ArrayList<String>(); |
| for (String other_element_element : other_element) { |
| __this__addPaths_copy.add(other_element_element); |
| } |
| __this__addPaths.add(__this__addPaths_copy); |
| } |
| this.addPaths = __this__addPaths; |
| } |
| if (other.isSetDelPaths()) { |
| List<List<String>> __this__delPaths = new ArrayList<List<String>>(); |
| for (List<String> other_element : other.delPaths) { |
| List<String> __this__delPaths_copy = new ArrayList<String>(); |
| for (String other_element_element : other_element) { |
| __this__delPaths_copy.add(other_element_element); |
| } |
| __this__delPaths.add(__this__delPaths_copy); |
| } |
| this.delPaths = __this__delPaths; |
| } |
| } |
| |
| public TPathChanges deepCopy() { |
| return new TPathChanges(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.authzObj = null; |
| this.addPaths = null; |
| this.delPaths = null; |
| } |
| |
| public String getAuthzObj() { |
| return this.authzObj; |
| } |
| |
| public void setAuthzObj(String authzObj) { |
| this.authzObj = authzObj; |
| } |
| |
| public void unsetAuthzObj() { |
| this.authzObj = null; |
| } |
| |
| /** Returns true if field authzObj is set (has been assigned a value) and false otherwise */ |
| public boolean isSetAuthzObj() { |
| return this.authzObj != null; |
| } |
| |
| public void setAuthzObjIsSet(boolean value) { |
| if (!value) { |
| this.authzObj = null; |
| } |
| } |
| |
| public int getAddPathsSize() { |
| return (this.addPaths == null) ? 0 : this.addPaths.size(); |
| } |
| |
| public java.util.Iterator<List<String>> getAddPathsIterator() { |
| return (this.addPaths == null) ? null : this.addPaths.iterator(); |
| } |
| |
| public void addToAddPaths(List<String> elem) { |
| if (this.addPaths == null) { |
| this.addPaths = new ArrayList<List<String>>(); |
| } |
| this.addPaths.add(elem); |
| } |
| |
| public List<List<String>> getAddPaths() { |
| return this.addPaths; |
| } |
| |
| public void setAddPaths(List<List<String>> addPaths) { |
| this.addPaths = addPaths; |
| } |
| |
| public void unsetAddPaths() { |
| this.addPaths = null; |
| } |
| |
| /** Returns true if field addPaths is set (has been assigned a value) and false otherwise */ |
| public boolean isSetAddPaths() { |
| return this.addPaths != null; |
| } |
| |
| public void setAddPathsIsSet(boolean value) { |
| if (!value) { |
| this.addPaths = null; |
| } |
| } |
| |
| public int getDelPathsSize() { |
| return (this.delPaths == null) ? 0 : this.delPaths.size(); |
| } |
| |
| public java.util.Iterator<List<String>> getDelPathsIterator() { |
| return (this.delPaths == null) ? null : this.delPaths.iterator(); |
| } |
| |
| public void addToDelPaths(List<String> elem) { |
| if (this.delPaths == null) { |
| this.delPaths = new ArrayList<List<String>>(); |
| } |
| this.delPaths.add(elem); |
| } |
| |
| public List<List<String>> getDelPaths() { |
| return this.delPaths; |
| } |
| |
| public void setDelPaths(List<List<String>> delPaths) { |
| this.delPaths = delPaths; |
| } |
| |
| public void unsetDelPaths() { |
| this.delPaths = null; |
| } |
| |
| /** Returns true if field delPaths is set (has been assigned a value) and false otherwise */ |
| public boolean isSetDelPaths() { |
| return this.delPaths != null; |
| } |
| |
| public void setDelPathsIsSet(boolean value) { |
| if (!value) { |
| this.delPaths = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case AUTHZ_OBJ: |
| if (value == null) { |
| unsetAuthzObj(); |
| } else { |
| setAuthzObj((String)value); |
| } |
| break; |
| |
| case ADD_PATHS: |
| if (value == null) { |
| unsetAddPaths(); |
| } else { |
| setAddPaths((List<List<String>>)value); |
| } |
| break; |
| |
| case DEL_PATHS: |
| if (value == null) { |
| unsetDelPaths(); |
| } else { |
| setDelPaths((List<List<String>>)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case AUTHZ_OBJ: |
| return getAuthzObj(); |
| |
| case ADD_PATHS: |
| return getAddPaths(); |
| |
| case DEL_PATHS: |
| return getDelPaths(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case AUTHZ_OBJ: |
| return isSetAuthzObj(); |
| case ADD_PATHS: |
| return isSetAddPaths(); |
| case DEL_PATHS: |
| return isSetDelPaths(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof TPathChanges) |
| return this.equals((TPathChanges)that); |
| return false; |
| } |
| |
| public boolean equals(TPathChanges that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_authzObj = true && this.isSetAuthzObj(); |
| boolean that_present_authzObj = true && that.isSetAuthzObj(); |
| if (this_present_authzObj || that_present_authzObj) { |
| if (!(this_present_authzObj && that_present_authzObj)) |
| return false; |
| if (!this.authzObj.equals(that.authzObj)) |
| return false; |
| } |
| |
| boolean this_present_addPaths = true && this.isSetAddPaths(); |
| boolean that_present_addPaths = true && that.isSetAddPaths(); |
| if (this_present_addPaths || that_present_addPaths) { |
| if (!(this_present_addPaths && that_present_addPaths)) |
| return false; |
| if (!this.addPaths.equals(that.addPaths)) |
| return false; |
| } |
| |
| boolean this_present_delPaths = true && this.isSetDelPaths(); |
| boolean that_present_delPaths = true && that.isSetDelPaths(); |
| if (this_present_delPaths || that_present_delPaths) { |
| if (!(this_present_delPaths && that_present_delPaths)) |
| return false; |
| if (!this.delPaths.equals(that.delPaths)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| HashCodeBuilder builder = new HashCodeBuilder(); |
| |
| boolean present_authzObj = true && (isSetAuthzObj()); |
| builder.append(present_authzObj); |
| if (present_authzObj) |
| builder.append(authzObj); |
| |
| boolean present_addPaths = true && (isSetAddPaths()); |
| builder.append(present_addPaths); |
| if (present_addPaths) |
| builder.append(addPaths); |
| |
| boolean present_delPaths = true && (isSetDelPaths()); |
| builder.append(present_delPaths); |
| if (present_delPaths) |
| builder.append(delPaths); |
| |
| return builder.toHashCode(); |
| } |
| |
| public int compareTo(TPathChanges other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| TPathChanges typedOther = (TPathChanges)other; |
| |
| lastComparison = Boolean.valueOf(isSetAuthzObj()).compareTo(typedOther.isSetAuthzObj()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetAuthzObj()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzObj, typedOther.authzObj); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = Boolean.valueOf(isSetAddPaths()).compareTo(typedOther.isSetAddPaths()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetAddPaths()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addPaths, typedOther.addPaths); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = Boolean.valueOf(isSetDelPaths()).compareTo(typedOther.isSetDelPaths()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetDelPaths()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delPaths, typedOther.delPaths); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("TPathChanges("); |
| boolean first = true; |
| |
| sb.append("authzObj:"); |
| if (this.authzObj == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.authzObj); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("addPaths:"); |
| if (this.addPaths == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.addPaths); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("delPaths:"); |
| if (this.delPaths == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.delPaths); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (!isSetAuthzObj()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzObj' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetAddPaths()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'addPaths' is unset! Struct:" + toString()); |
| } |
| |
| if (!isSetDelPaths()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'delPaths' is unset! Struct:" + toString()); |
| } |
| |
| // 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, ClassNotFoundException { |
| try { |
| 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 TPathChangesStandardSchemeFactory implements SchemeFactory { |
| public TPathChangesStandardScheme getScheme() { |
| return new TPathChangesStandardScheme(); |
| } |
| } |
| |
| private static class TPathChangesStandardScheme extends StandardScheme<TPathChanges> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, TPathChanges 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: // AUTHZ_OBJ |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.authzObj = iprot.readString(); |
| struct.setAuthzObjIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 2: // ADD_PATHS |
| if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { |
| { |
| org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); |
| struct.addPaths = new ArrayList<List<String>>(_list64.size); |
| for (int _i65 = 0; _i65 < _list64.size; ++_i65) |
| { |
| List<String> _elem66; // required |
| { |
| org.apache.thrift.protocol.TList _list67 = iprot.readListBegin(); |
| _elem66 = new ArrayList<String>(_list67.size); |
| for (int _i68 = 0; _i68 < _list67.size; ++_i68) |
| { |
| String _elem69; // required |
| _elem69 = iprot.readString(); |
| _elem66.add(_elem69); |
| } |
| iprot.readListEnd(); |
| } |
| struct.addPaths.add(_elem66); |
| } |
| iprot.readListEnd(); |
| } |
| struct.setAddPathsIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // DEL_PATHS |
| if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { |
| { |
| org.apache.thrift.protocol.TList _list70 = iprot.readListBegin(); |
| struct.delPaths = new ArrayList<List<String>>(_list70.size); |
| for (int _i71 = 0; _i71 < _list70.size; ++_i71) |
| { |
| List<String> _elem72; // required |
| { |
| org.apache.thrift.protocol.TList _list73 = iprot.readListBegin(); |
| _elem72 = new ArrayList<String>(_list73.size); |
| for (int _i74 = 0; _i74 < _list73.size; ++_i74) |
| { |
| String _elem75; // required |
| _elem75 = iprot.readString(); |
| _elem72.add(_elem75); |
| } |
| iprot.readListEnd(); |
| } |
| struct.delPaths.add(_elem72); |
| } |
| iprot.readListEnd(); |
| } |
| struct.setDelPathsIsSet(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(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, TPathChanges struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.authzObj != null) { |
| oprot.writeFieldBegin(AUTHZ_OBJ_FIELD_DESC); |
| oprot.writeString(struct.authzObj); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.addPaths != null) { |
| oprot.writeFieldBegin(ADD_PATHS_FIELD_DESC); |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.addPaths.size())); |
| for (List<String> _iter76 : struct.addPaths) |
| { |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter76.size())); |
| for (String _iter77 : _iter76) |
| { |
| oprot.writeString(_iter77); |
| } |
| oprot.writeListEnd(); |
| } |
| } |
| oprot.writeListEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| if (struct.delPaths != null) { |
| oprot.writeFieldBegin(DEL_PATHS_FIELD_DESC); |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.delPaths.size())); |
| for (List<String> _iter78 : struct.delPaths) |
| { |
| { |
| oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter78.size())); |
| for (String _iter79 : _iter78) |
| { |
| oprot.writeString(_iter79); |
| } |
| oprot.writeListEnd(); |
| } |
| } |
| oprot.writeListEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class TPathChangesTupleSchemeFactory implements SchemeFactory { |
| public TPathChangesTupleScheme getScheme() { |
| return new TPathChangesTupleScheme(); |
| } |
| } |
| |
| private static class TPathChangesTupleScheme extends TupleScheme<TPathChanges> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, TPathChanges struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| oprot.writeString(struct.authzObj); |
| { |
| oprot.writeI32(struct.addPaths.size()); |
| for (List<String> _iter80 : struct.addPaths) |
| { |
| { |
| oprot.writeI32(_iter80.size()); |
| for (String _iter81 : _iter80) |
| { |
| oprot.writeString(_iter81); |
| } |
| } |
| } |
| } |
| { |
| oprot.writeI32(struct.delPaths.size()); |
| for (List<String> _iter82 : struct.delPaths) |
| { |
| { |
| oprot.writeI32(_iter82.size()); |
| for (String _iter83 : _iter82) |
| { |
| oprot.writeString(_iter83); |
| } |
| } |
| } |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, TPathChanges struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| struct.authzObj = iprot.readString(); |
| struct.setAuthzObjIsSet(true); |
| { |
| org.apache.thrift.protocol.TList _list84 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32()); |
| struct.addPaths = new ArrayList<List<String>>(_list84.size); |
| for (int _i85 = 0; _i85 < _list84.size; ++_i85) |
| { |
| List<String> _elem86; // required |
| { |
| org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); |
| _elem86 = new ArrayList<String>(_list87.size); |
| for (int _i88 = 0; _i88 < _list87.size; ++_i88) |
| { |
| String _elem89; // required |
| _elem89 = iprot.readString(); |
| _elem86.add(_elem89); |
| } |
| } |
| struct.addPaths.add(_elem86); |
| } |
| } |
| struct.setAddPathsIsSet(true); |
| { |
| org.apache.thrift.protocol.TList _list90 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, iprot.readI32()); |
| struct.delPaths = new ArrayList<List<String>>(_list90.size); |
| for (int _i91 = 0; _i91 < _list90.size; ++_i91) |
| { |
| List<String> _elem92; // required |
| { |
| org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); |
| _elem92 = new ArrayList<String>(_list93.size); |
| for (int _i94 = 0; _i94 < _list93.size; ++_i94) |
| { |
| String _elem95; // required |
| _elem95 = iprot.readString(); |
| _elem92.add(_elem95); |
| } |
| } |
| struct.delPaths.add(_elem92); |
| } |
| } |
| struct.setDelPathsIsSet(true); |
| } |
| } |
| |
| } |
| |