diff options
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java | 253 |
1 files changed, 117 insertions, 136 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java b/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java index 4032b4e..afdf0b0 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.openslx.bwlp.thrift.iface; -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 org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-02-25") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17") public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, PredefinedData._Fields>, java.io.Serializable, Cloneable, Comparable<PredefinedData> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PredefinedData"); @@ -43,16 +16,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P private static final org.apache.thrift.protocol.TField RUN_SCRIPTS_FIELD_DESC = new org.apache.thrift.protocol.TField("runScripts", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField NETWORK_EXCEPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("networkExceptions", org.apache.thrift.protocol.TType.LIST, (short)4); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PredefinedDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PredefinedDataTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new PredefinedDataStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new PredefinedDataTupleSchemeFactory(); - public List<NetShare> netShares; // required - public List<LdapFilter> ldapFilter; // required - public List<PresetRunScript> runScripts; // required - public List<PresetNetRule> networkExceptions; // required + public @org.apache.thrift.annotation.Nullable java.util.List<NetShare> netShares; // required + public @org.apache.thrift.annotation.Nullable java.util.List<LdapFilter> ldapFilter; // required + public @org.apache.thrift.annotation.Nullable java.util.List<PresetRunScript> runScripts; // required + public @org.apache.thrift.annotation.Nullable java.util.List<PresetNetRule> networkExceptions; // 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 { @@ -61,10 +31,10 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P RUN_SCRIPTS((short)3, "runScripts"), NETWORK_EXCEPTIONS((short)4, "networkExceptions"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -72,6 +42,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P /** * 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: // NET_SHARES @@ -93,21 +64,22 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + 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. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -116,15 +88,15 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + 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.NET_SHARES, new org.apache.thrift.meta_data.FieldMetaData("netShares", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NetShare.class)))); @@ -137,7 +109,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P tmpMap.put(_Fields.NETWORK_EXCEPTIONS, new org.apache.thrift.meta_data.FieldMetaData("networkExceptions", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PresetNetRule.class)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PredefinedData.class, metaDataMap); } @@ -145,10 +117,10 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } public PredefinedData( - List<NetShare> netShares, - List<LdapFilter> ldapFilter, - List<PresetRunScript> runScripts, - List<PresetNetRule> networkExceptions) + java.util.List<NetShare> netShares, + java.util.List<LdapFilter> ldapFilter, + java.util.List<PresetRunScript> runScripts, + java.util.List<PresetNetRule> networkExceptions) { this(); this.netShares = netShares; @@ -162,28 +134,28 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P */ public PredefinedData(PredefinedData other) { if (other.isSetNetShares()) { - List<NetShare> __this__netShares = new ArrayList<NetShare>(other.netShares.size()); + java.util.List<NetShare> __this__netShares = new java.util.ArrayList<NetShare>(other.netShares.size()); for (NetShare other_element : other.netShares) { __this__netShares.add(new NetShare(other_element)); } this.netShares = __this__netShares; } if (other.isSetLdapFilter()) { - List<LdapFilter> __this__ldapFilter = new ArrayList<LdapFilter>(other.ldapFilter.size()); + java.util.List<LdapFilter> __this__ldapFilter = new java.util.ArrayList<LdapFilter>(other.ldapFilter.size()); for (LdapFilter other_element : other.ldapFilter) { __this__ldapFilter.add(new LdapFilter(other_element)); } this.ldapFilter = __this__ldapFilter; } if (other.isSetRunScripts()) { - List<PresetRunScript> __this__runScripts = new ArrayList<PresetRunScript>(other.runScripts.size()); + java.util.List<PresetRunScript> __this__runScripts = new java.util.ArrayList<PresetRunScript>(other.runScripts.size()); for (PresetRunScript other_element : other.runScripts) { __this__runScripts.add(new PresetRunScript(other_element)); } this.runScripts = __this__runScripts; } if (other.isSetNetworkExceptions()) { - List<PresetNetRule> __this__networkExceptions = new ArrayList<PresetNetRule>(other.networkExceptions.size()); + java.util.List<PresetNetRule> __this__networkExceptions = new java.util.ArrayList<PresetNetRule>(other.networkExceptions.size()); for (PresetNetRule other_element : other.networkExceptions) { __this__networkExceptions.add(new PresetNetRule(other_element)); } @@ -207,22 +179,24 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return (this.netShares == null) ? 0 : this.netShares.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator<NetShare> getNetSharesIterator() { return (this.netShares == null) ? null : this.netShares.iterator(); } public void addToNetShares(NetShare elem) { if (this.netShares == null) { - this.netShares = new ArrayList<NetShare>(); + this.netShares = new java.util.ArrayList<NetShare>(); } this.netShares.add(elem); } - public List<NetShare> getNetShares() { + @org.apache.thrift.annotation.Nullable + public java.util.List<NetShare> getNetShares() { return this.netShares; } - public PredefinedData setNetShares(List<NetShare> netShares) { + public PredefinedData setNetShares(@org.apache.thrift.annotation.Nullable java.util.List<NetShare> netShares) { this.netShares = netShares; return this; } @@ -246,22 +220,24 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return (this.ldapFilter == null) ? 0 : this.ldapFilter.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator<LdapFilter> getLdapFilterIterator() { return (this.ldapFilter == null) ? null : this.ldapFilter.iterator(); } public void addToLdapFilter(LdapFilter elem) { if (this.ldapFilter == null) { - this.ldapFilter = new ArrayList<LdapFilter>(); + this.ldapFilter = new java.util.ArrayList<LdapFilter>(); } this.ldapFilter.add(elem); } - public List<LdapFilter> getLdapFilter() { + @org.apache.thrift.annotation.Nullable + public java.util.List<LdapFilter> getLdapFilter() { return this.ldapFilter; } - public PredefinedData setLdapFilter(List<LdapFilter> ldapFilter) { + public PredefinedData setLdapFilter(@org.apache.thrift.annotation.Nullable java.util.List<LdapFilter> ldapFilter) { this.ldapFilter = ldapFilter; return this; } @@ -285,22 +261,24 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return (this.runScripts == null) ? 0 : this.runScripts.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator<PresetRunScript> getRunScriptsIterator() { return (this.runScripts == null) ? null : this.runScripts.iterator(); } public void addToRunScripts(PresetRunScript elem) { if (this.runScripts == null) { - this.runScripts = new ArrayList<PresetRunScript>(); + this.runScripts = new java.util.ArrayList<PresetRunScript>(); } this.runScripts.add(elem); } - public List<PresetRunScript> getRunScripts() { + @org.apache.thrift.annotation.Nullable + public java.util.List<PresetRunScript> getRunScripts() { return this.runScripts; } - public PredefinedData setRunScripts(List<PresetRunScript> runScripts) { + public PredefinedData setRunScripts(@org.apache.thrift.annotation.Nullable java.util.List<PresetRunScript> runScripts) { this.runScripts = runScripts; return this; } @@ -324,22 +302,24 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return (this.networkExceptions == null) ? 0 : this.networkExceptions.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator<PresetNetRule> getNetworkExceptionsIterator() { return (this.networkExceptions == null) ? null : this.networkExceptions.iterator(); } public void addToNetworkExceptions(PresetNetRule elem) { if (this.networkExceptions == null) { - this.networkExceptions = new ArrayList<PresetNetRule>(); + this.networkExceptions = new java.util.ArrayList<PresetNetRule>(); } this.networkExceptions.add(elem); } - public List<PresetNetRule> getNetworkExceptions() { + @org.apache.thrift.annotation.Nullable + public java.util.List<PresetNetRule> getNetworkExceptions() { return this.networkExceptions; } - public PredefinedData setNetworkExceptions(List<PresetNetRule> networkExceptions) { + public PredefinedData setNetworkExceptions(@org.apache.thrift.annotation.Nullable java.util.List<PresetNetRule> networkExceptions) { this.networkExceptions = networkExceptions; return this; } @@ -359,13 +339,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case NET_SHARES: if (value == null) { unsetNetShares(); } else { - setNetShares((List<NetShare>)value); + setNetShares((java.util.List<NetShare>)value); } break; @@ -373,7 +353,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P if (value == null) { unsetLdapFilter(); } else { - setLdapFilter((List<LdapFilter>)value); + setLdapFilter((java.util.List<LdapFilter>)value); } break; @@ -381,7 +361,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P if (value == null) { unsetRunScripts(); } else { - setRunScripts((List<PresetRunScript>)value); + setRunScripts((java.util.List<PresetRunScript>)value); } break; @@ -389,14 +369,15 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P if (value == null) { unsetNetworkExceptions(); } else { - setNetworkExceptions((List<PresetNetRule>)value); + setNetworkExceptions((java.util.List<PresetNetRule>)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case NET_SHARES: return getNetShares(); @@ -411,13 +392,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return getNetworkExceptions(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -430,13 +411,11 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P case NETWORK_EXCEPTIONS: return isSetNetworkExceptions(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof PredefinedData) return this.equals((PredefinedData)that); return false; @@ -445,6 +424,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P public boolean equals(PredefinedData that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_netShares = true && this.isSetNetShares(); boolean that_present_netShares = true && that.isSetNetShares(); @@ -487,29 +468,25 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_netShares = true && (isSetNetShares()); - list.add(present_netShares); - if (present_netShares) - list.add(netShares); + hashCode = hashCode * 8191 + ((isSetNetShares()) ? 131071 : 524287); + if (isSetNetShares()) + hashCode = hashCode * 8191 + netShares.hashCode(); - boolean present_ldapFilter = true && (isSetLdapFilter()); - list.add(present_ldapFilter); - if (present_ldapFilter) - list.add(ldapFilter); + hashCode = hashCode * 8191 + ((isSetLdapFilter()) ? 131071 : 524287); + if (isSetLdapFilter()) + hashCode = hashCode * 8191 + ldapFilter.hashCode(); - boolean present_runScripts = true && (isSetRunScripts()); - list.add(present_runScripts); - if (present_runScripts) - list.add(runScripts); + hashCode = hashCode * 8191 + ((isSetRunScripts()) ? 131071 : 524287); + if (isSetRunScripts()) + hashCode = hashCode * 8191 + runScripts.hashCode(); - boolean present_networkExceptions = true && (isSetNetworkExceptions()); - list.add(present_networkExceptions); - if (present_networkExceptions) - list.add(networkExceptions); + hashCode = hashCode * 8191 + ((isSetNetworkExceptions()) ? 131071 : 524287); + if (isSetNetworkExceptions()) + hashCode = hashCode * 8191 + networkExceptions.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -520,7 +497,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetNetShares()).compareTo(other.isSetNetShares()); + lastComparison = java.lang.Boolean.compare(isSetNetShares(), other.isSetNetShares()); if (lastComparison != 0) { return lastComparison; } @@ -530,7 +507,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLdapFilter()).compareTo(other.isSetLdapFilter()); + lastComparison = java.lang.Boolean.compare(isSetLdapFilter(), other.isSetLdapFilter()); if (lastComparison != 0) { return lastComparison; } @@ -540,7 +517,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRunScripts()).compareTo(other.isSetRunScripts()); + lastComparison = java.lang.Boolean.compare(isSetRunScripts(), other.isSetRunScripts()); if (lastComparison != 0) { return lastComparison; } @@ -550,7 +527,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNetworkExceptions()).compareTo(other.isSetNetworkExceptions()); + lastComparison = java.lang.Boolean.compare(isSetNetworkExceptions(), other.isSetNetworkExceptions()); if (lastComparison != 0) { return lastComparison; } @@ -563,21 +540,22 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P return 0; } + @org.apache.thrift.annotation.Nullable 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); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("PredefinedData("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("PredefinedData("); boolean first = true; sb.append("netShares:"); @@ -628,7 +606,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -636,13 +614,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } } - private static class PredefinedDataStandardSchemeFactory implements SchemeFactory { + private static class PredefinedDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public PredefinedDataStandardScheme getScheme() { return new PredefinedDataStandardScheme(); } } - private static class PredefinedDataStandardScheme extends StandardScheme<PredefinedData> { + private static class PredefinedDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<PredefinedData> { public void read(org.apache.thrift.protocol.TProtocol iprot, PredefinedData struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -658,8 +636,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list106 = iprot.readListBegin(); - struct.netShares = new ArrayList<NetShare>(_list106.size); - NetShare _elem107; + struct.netShares = new java.util.ArrayList<NetShare>(_list106.size); + @org.apache.thrift.annotation.Nullable NetShare _elem107; for (int _i108 = 0; _i108 < _list106.size; ++_i108) { _elem107 = new NetShare(); @@ -677,8 +655,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list109 = iprot.readListBegin(); - struct.ldapFilter = new ArrayList<LdapFilter>(_list109.size); - LdapFilter _elem110; + struct.ldapFilter = new java.util.ArrayList<LdapFilter>(_list109.size); + @org.apache.thrift.annotation.Nullable LdapFilter _elem110; for (int _i111 = 0; _i111 < _list109.size; ++_i111) { _elem110 = new LdapFilter(); @@ -696,8 +674,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list112 = iprot.readListBegin(); - struct.runScripts = new ArrayList<PresetRunScript>(_list112.size); - PresetRunScript _elem113; + struct.runScripts = new java.util.ArrayList<PresetRunScript>(_list112.size); + @org.apache.thrift.annotation.Nullable PresetRunScript _elem113; for (int _i114 = 0; _i114 < _list112.size; ++_i114) { _elem113 = new PresetRunScript(); @@ -715,8 +693,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list115 = iprot.readListBegin(); - struct.networkExceptions = new ArrayList<PresetNetRule>(_list115.size); - PresetNetRule _elem116; + struct.networkExceptions = new java.util.ArrayList<PresetNetRule>(_list115.size); + @org.apache.thrift.annotation.Nullable PresetNetRule _elem116; for (int _i117 = 0; _i117 < _list115.size; ++_i117) { _elem116 = new PresetNetRule(); @@ -799,18 +777,18 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } - private static class PredefinedDataTupleSchemeFactory implements SchemeFactory { + private static class PredefinedDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public PredefinedDataTupleScheme getScheme() { return new PredefinedDataTupleScheme(); } } - private static class PredefinedDataTupleScheme extends TupleScheme<PredefinedData> { + private static class PredefinedDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<PredefinedData> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, PredefinedData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetNetShares()) { optionals.set(0); } @@ -864,13 +842,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P @Override public void read(org.apache.thrift.protocol.TProtocol prot, PredefinedData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list126 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.netShares = new ArrayList<NetShare>(_list126.size); - NetShare _elem127; + org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.netShares = new java.util.ArrayList<NetShare>(_list126.size); + @org.apache.thrift.annotation.Nullable NetShare _elem127; for (int _i128 = 0; _i128 < _list126.size; ++_i128) { _elem127 = new NetShare(); @@ -882,9 +860,9 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.ldapFilter = new ArrayList<LdapFilter>(_list129.size); - LdapFilter _elem130; + org.apache.thrift.protocol.TList _list129 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.ldapFilter = new java.util.ArrayList<LdapFilter>(_list129.size); + @org.apache.thrift.annotation.Nullable LdapFilter _elem130; for (int _i131 = 0; _i131 < _list129.size; ++_i131) { _elem130 = new LdapFilter(); @@ -896,9 +874,9 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list132 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.runScripts = new ArrayList<PresetRunScript>(_list132.size); - PresetRunScript _elem133; + org.apache.thrift.protocol.TList _list132 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.runScripts = new java.util.ArrayList<PresetRunScript>(_list132.size); + @org.apache.thrift.annotation.Nullable PresetRunScript _elem133; for (int _i134 = 0; _i134 < _list132.size; ++_i134) { _elem133 = new PresetRunScript(); @@ -910,9 +888,9 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.networkExceptions = new ArrayList<PresetNetRule>(_list135.size); - PresetNetRule _elem136; + org.apache.thrift.protocol.TList _list135 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.networkExceptions = new java.util.ArrayList<PresetNetRule>(_list135.size); + @org.apache.thrift.annotation.Nullable PresetNetRule _elem136; for (int _i137 = 0; _i137 < _list135.size; ++_i137) { _elem136 = new PresetNetRule(); @@ -925,5 +903,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P } } + 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(); + } } |