From b9d58c09588d58e4c4e6fb93fcc3db75e70805fa Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 26 Feb 2019 18:10:47 +0100 Subject: Add predefined firewall rulesets --- .../openslx/bwlp/thrift/iface/PredefinedData.java | 277 ++++++++++++++++----- 1 file changed, 218 insertions(+), 59 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 539fb0e..4032b4e 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java @@ -34,13 +34,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-08") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-02-25") 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 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, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -51,12 +52,14 @@ public class PredefinedData implements org.apache.thrift.TBase netShares; // required public List ldapFilter; // required public List runScripts; // required + public List 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 { NET_SHARES((short)1, "netShares"), LDAP_FILTER((short)2, "ldapFilter"), - RUN_SCRIPTS((short)3, "runScripts"); + RUN_SCRIPTS((short)3, "runScripts"), + NETWORK_EXCEPTIONS((short)4, "networkExceptions"); private static final Map byName = new HashMap(); @@ -77,6 +80,8 @@ public class PredefinedData implements org.apache.thrift.TBase netShares, List ldapFilter, - List runScripts) + List runScripts, + List networkExceptions) { this(); this.netShares = netShares; this.ldapFilter = ldapFilter; this.runScripts = runScripts; + this.networkExceptions = networkExceptions; } /** @@ -172,6 +182,13 @@ public class PredefinedData implements org.apache.thrift.TBase __this__networkExceptions = new ArrayList(other.networkExceptions.size()); + for (PresetNetRule other_element : other.networkExceptions) { + __this__networkExceptions.add(new PresetNetRule(other_element)); + } + this.networkExceptions = __this__networkExceptions; + } } public PredefinedData deepCopy() { @@ -183,6 +200,7 @@ public class PredefinedData implements org.apache.thrift.TBase getNetworkExceptionsIterator() { + return (this.networkExceptions == null) ? null : this.networkExceptions.iterator(); + } + + public void addToNetworkExceptions(PresetNetRule elem) { + if (this.networkExceptions == null) { + this.networkExceptions = new ArrayList(); + } + this.networkExceptions.add(elem); + } + + public List getNetworkExceptions() { + return this.networkExceptions; + } + + public PredefinedData setNetworkExceptions(List networkExceptions) { + this.networkExceptions = networkExceptions; + return this; + } + + public void unsetNetworkExceptions() { + this.networkExceptions = null; + } + + /** Returns true if field networkExceptions is set (has been assigned a value) and false otherwise */ + public boolean isSetNetworkExceptions() { + return this.networkExceptions != null; + } + + public void setNetworkExceptionsIsSet(boolean value) { + if (!value) { + this.networkExceptions = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case NET_SHARES: @@ -328,6 +385,14 @@ public class PredefinedData implements org.apache.thrift.TBase)value); + } + break; + } } @@ -342,6 +407,9 @@ public class PredefinedData implements org.apache.thrift.TBase(_list98.size); - NetShare _elem99; - for (int _i100 = 0; _i100 < _list98.size; ++_i100) + org.apache.thrift.protocol.TList _list106 = iprot.readListBegin(); + struct.netShares = new ArrayList(_list106.size); + NetShare _elem107; + for (int _i108 = 0; _i108 < _list106.size; ++_i108) { - _elem99 = new NetShare(); - _elem99.read(iprot); - struct.netShares.add(_elem99); + _elem107 = new NetShare(); + _elem107.read(iprot); + struct.netShares.add(_elem107); } iprot.readListEnd(); } @@ -574,14 +676,14 @@ public class PredefinedData implements org.apache.thrift.TBase(_list101.size); - LdapFilter _elem102; - for (int _i103 = 0; _i103 < _list101.size; ++_i103) + org.apache.thrift.protocol.TList _list109 = iprot.readListBegin(); + struct.ldapFilter = new ArrayList(_list109.size); + LdapFilter _elem110; + for (int _i111 = 0; _i111 < _list109.size; ++_i111) { - _elem102 = new LdapFilter(); - _elem102.read(iprot); - struct.ldapFilter.add(_elem102); + _elem110 = new LdapFilter(); + _elem110.read(iprot); + struct.ldapFilter.add(_elem110); } iprot.readListEnd(); } @@ -593,14 +695,14 @@ public class PredefinedData implements org.apache.thrift.TBase(_list104.size); - PresetRunScript _elem105; - for (int _i106 = 0; _i106 < _list104.size; ++_i106) + org.apache.thrift.protocol.TList _list112 = iprot.readListBegin(); + struct.runScripts = new ArrayList(_list112.size); + PresetRunScript _elem113; + for (int _i114 = 0; _i114 < _list112.size; ++_i114) { - _elem105 = new PresetRunScript(); - _elem105.read(iprot); - struct.runScripts.add(_elem105); + _elem113 = new PresetRunScript(); + _elem113.read(iprot); + struct.runScripts.add(_elem113); } iprot.readListEnd(); } @@ -609,6 +711,25 @@ public class PredefinedData implements org.apache.thrift.TBase(_list115.size); + PresetNetRule _elem116; + for (int _i117 = 0; _i117 < _list115.size; ++_i117) + { + _elem116 = new PresetNetRule(); + _elem116.read(iprot); + struct.networkExceptions.add(_elem116); + } + iprot.readListEnd(); + } + struct.setNetworkExceptionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -628,9 +749,9 @@ public class PredefinedData implements org.apache.thrift.TBase(_list113.size); - NetShare _elem114; - for (int _i115 = 0; _i115 < _list113.size; ++_i115) + org.apache.thrift.protocol.TList _list126 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.netShares = new ArrayList(_list126.size); + NetShare _elem127; + for (int _i128 = 0; _i128 < _list126.size; ++_i128) { - _elem114 = new NetShare(); - _elem114.read(iprot); - struct.netShares.add(_elem114); + _elem127 = new NetShare(); + _elem127.read(iprot); + struct.netShares.add(_elem127); } } struct.setNetSharesIsSet(true); } if (incoming.get(1)) { { - 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) + org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.ldapFilter = new ArrayList(_list129.size); + LdapFilter _elem130; + for (int _i131 = 0; _i131 < _list129.size; ++_i131) { - _elem117 = new LdapFilter(); - _elem117.read(iprot); - struct.ldapFilter.add(_elem117); + _elem130 = new LdapFilter(); + _elem130.read(iprot); + struct.ldapFilter.add(_elem130); } } 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) + org.apache.thrift.protocol.TList _list132 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.runScripts = new ArrayList(_list132.size); + PresetRunScript _elem133; + for (int _i134 = 0; _i134 < _list132.size; ++_i134) { - _elem120 = new PresetRunScript(); - _elem120.read(iprot); - struct.runScripts.add(_elem120); + _elem133 = new PresetRunScript(); + _elem133.read(iprot); + struct.runScripts.add(_elem133); } } struct.setRunScriptsIsSet(true); } + 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(_list135.size); + PresetNetRule _elem136; + for (int _i137 = 0; _i137 < _list135.size; ++_i137) + { + _elem136 = new PresetNetRule(); + _elem136.read(iprot); + struct.networkExceptions.add(_elem136); + } + } + struct.setNetworkExceptionsIsSet(true); + } } } -- cgit v1.2.3-55-g7522