From e496880dbb052324f1857a4084bca84ff1dc7aa0 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 8 Dec 2018 16:20:13 +0100 Subject: Thrift: Add PresetRunScript --- .../openslx/bwlp/thrift/iface/PredefinedData.java | 241 +++++++++++++++++---- 1 file changed, 200 insertions(+), 41 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java') 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 67e2463..539fb0e 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java @@ -34,12 +34,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-11-23") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-08") public class PredefinedData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PredefinedData"); private static final org.apache.thrift.protocol.TField NET_SHARES_FIELD_DESC = new org.apache.thrift.protocol.TField("netShares", org.apache.thrift.protocol.TType.LIST, (short)1); private static final org.apache.thrift.protocol.TField LDAP_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("ldapFilter", org.apache.thrift.protocol.TType.LIST, (short)2); + 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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -49,11 +50,13 @@ public class PredefinedData implements org.apache.thrift.TBase netShares; // required public List ldapFilter; // required + public List runScripts; // 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 { NET_SHARES((short)1, "netShares"), - LDAP_FILTER((short)2, "ldapFilter"); + LDAP_FILTER((short)2, "ldapFilter"), + RUN_SCRIPTS((short)3, "runScripts"); private static final Map byName = new HashMap(); @@ -72,6 +75,8 @@ public class PredefinedData implements org.apache.thrift.TBase netShares, - List ldapFilter) + List ldapFilter, + List runScripts) { this(); this.netShares = netShares; this.ldapFilter = ldapFilter; + this.runScripts = runScripts; } /** @@ -155,6 +165,13 @@ public class PredefinedData implements org.apache.thrift.TBase __this__runScripts = new ArrayList(other.runScripts.size()); + for (PresetRunScript other_element : other.runScripts) { + __this__runScripts.add(new PresetRunScript(other_element)); + } + this.runScripts = __this__runScripts; + } } public PredefinedData deepCopy() { @@ -165,6 +182,7 @@ public class PredefinedData implements org.apache.thrift.TBase getRunScriptsIterator() { + return (this.runScripts == null) ? null : this.runScripts.iterator(); + } + + public void addToRunScripts(PresetRunScript elem) { + if (this.runScripts == null) { + this.runScripts = new ArrayList(); + } + this.runScripts.add(elem); + } + + public List getRunScripts() { + return this.runScripts; + } + + public PredefinedData setRunScripts(List runScripts) { + this.runScripts = runScripts; + return this; + } + + public void unsetRunScripts() { + this.runScripts = null; + } + + /** Returns true if field runScripts is set (has been assigned a value) and false otherwise */ + public boolean isSetRunScripts() { + return this.runScripts != null; + } + + public void setRunScriptsIsSet(boolean value) { + if (!value) { + this.runScripts = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case NET_SHARES: @@ -263,6 +320,14 @@ public class PredefinedData implements org.apache.thrift.TBase)value); + } + break; + } } @@ -274,6 +339,9 @@ public class PredefinedData implements org.apache.thrift.TBase(_list90.size); - NetShare _elem91; - for (int _i92 = 0; _i92 < _list90.size; ++_i92) + org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(); + struct.netShares = new ArrayList(_list98.size); + NetShare _elem99; + for (int _i100 = 0; _i100 < _list98.size; ++_i100) { - _elem91 = new NetShare(); - _elem91.read(iprot); - struct.netShares.add(_elem91); + _elem99 = new NetShare(); + _elem99.read(iprot); + struct.netShares.add(_elem99); } iprot.readListEnd(); } @@ -472,14 +574,14 @@ public class PredefinedData implements org.apache.thrift.TBase(_list93.size); - LdapFilter _elem94; - for (int _i95 = 0; _i95 < _list93.size; ++_i95) + org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(); + struct.ldapFilter = new ArrayList(_list101.size); + LdapFilter _elem102; + for (int _i103 = 0; _i103 < _list101.size; ++_i103) { - _elem94 = new LdapFilter(); - _elem94.read(iprot); - struct.ldapFilter.add(_elem94); + _elem102 = new LdapFilter(); + _elem102.read(iprot); + struct.ldapFilter.add(_elem102); } iprot.readListEnd(); } @@ -488,6 +590,25 @@ public class PredefinedData implements org.apache.thrift.TBase(_list104.size); + PresetRunScript _elem105; + for (int _i106 = 0; _i106 < _list104.size; ++_i106) + { + _elem105 = new PresetRunScript(); + _elem105.read(iprot); + struct.runScripts.add(_elem105); + } + iprot.readListEnd(); + } + struct.setRunScriptsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -507,9 +628,9 @@ public class PredefinedData implements org.apache.thrift.TBase(_list100.size); - NetShare _elem101; - for (int _i102 = 0; _i102 < _list100.size; ++_i102) + org.apache.thrift.protocol.TList _list113 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.netShares = new ArrayList(_list113.size); + NetShare _elem114; + for (int _i115 = 0; _i115 < _list113.size; ++_i115) { - _elem101 = new NetShare(); - _elem101.read(iprot); - struct.netShares.add(_elem101); + _elem114 = new NetShare(); + _elem114.read(iprot); + struct.netShares.add(_elem114); } } struct.setNetSharesIsSet(true); } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.ldapFilter = new ArrayList(_list103.size); - LdapFilter _elem104; - for (int _i105 = 0; _i105 < _list103.size; ++_i105) + org.apache.thrift.protocol.TList _list116 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.ldapFilter = new ArrayList(_list116.size); + LdapFilter _elem117; + for (int _i118 = 0; _i118 < _list116.size; ++_i118) { - _elem104 = new LdapFilter(); - _elem104.read(iprot); - struct.ldapFilter.add(_elem104); + _elem117 = new LdapFilter(); + _elem117.read(iprot); + struct.ldapFilter.add(_elem117); } } struct.setLdapFilterIsSet(true); } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list119 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.runScripts = new ArrayList(_list119.size); + PresetRunScript _elem120; + for (int _i121 = 0; _i121 < _list119.size; ++_i121) + { + _elem120 = new PresetRunScript(); + _elem120.read(iprot); + struct.runScripts.add(_elem120); + } + } + struct.setRunScriptsIsSet(true); + } } } -- cgit v1.2.3-55-g7522