summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java228
-rw-r--r--src/main/thrift/bwlp.thrift2
2 files changed, 223 insertions, 7 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java b/src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java
index 537d5d3..c274a4c 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java
@@ -34,12 +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 = "2017-09-06")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-09-08")
public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fields>, java.io.Serializable, Cloneable, Comparable<NetShare> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NetShare");
private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DISPLAYNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayname", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField MOUNTPOINT_FIELD_DESC = new org.apache.thrift.protocol.TField("mountpoint", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)3);
@@ -55,6 +57,8 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
*/
public NetShareAuth auth; // required
public String path; // required
+ public String displayname; // optional
+ public String mountpoint; // optional
public String username; // optional
public String password; // optional
@@ -66,6 +70,8 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
*/
AUTH((short)4, "auth"),
PATH((short)1, "path"),
+ DISPLAYNAME((short)5, "displayname"),
+ MOUNTPOINT((short)6, "mountpoint"),
USERNAME((short)2, "username"),
PASSWORD((short)3, "password");
@@ -86,6 +92,10 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return AUTH;
case 1: // PATH
return PATH;
+ case 5: // DISPLAYNAME
+ return DISPLAYNAME;
+ case 6: // MOUNTPOINT
+ return MOUNTPOINT;
case 2: // USERNAME
return USERNAME;
case 3: // PASSWORD
@@ -130,7 +140,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
// isset id assignments
- private static final _Fields optionals[] = {_Fields.USERNAME,_Fields.PASSWORD};
+ private static final _Fields optionals[] = {_Fields.DISPLAYNAME,_Fields.MOUNTPOINT,_Fields.USERNAME,_Fields.PASSWORD};
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);
@@ -138,6 +148,10 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NetShareAuth.class)));
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DISPLAYNAME, new org.apache.thrift.meta_data.FieldMetaData("displayname", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.MOUNTPOINT, new org.apache.thrift.meta_data.FieldMetaData("mountpoint", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.OPTIONAL,
@@ -168,6 +182,12 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (other.isSetPath()) {
this.path = other.path;
}
+ if (other.isSetDisplayname()) {
+ this.displayname = other.displayname;
+ }
+ if (other.isSetMountpoint()) {
+ this.mountpoint = other.mountpoint;
+ }
if (other.isSetUsername()) {
this.username = other.username;
}
@@ -184,6 +204,8 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
public void clear() {
this.auth = null;
this.path = null;
+ this.displayname = null;
+ this.mountpoint = null;
this.username = null;
this.password = null;
}
@@ -244,6 +266,54 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
+ public String getDisplayname() {
+ return this.displayname;
+ }
+
+ public NetShare setDisplayname(String displayname) {
+ this.displayname = displayname;
+ return this;
+ }
+
+ public void unsetDisplayname() {
+ this.displayname = null;
+ }
+
+ /** Returns true if field displayname is set (has been assigned a value) and false otherwise */
+ public boolean isSetDisplayname() {
+ return this.displayname != null;
+ }
+
+ public void setDisplaynameIsSet(boolean value) {
+ if (!value) {
+ this.displayname = null;
+ }
+ }
+
+ public String getMountpoint() {
+ return this.mountpoint;
+ }
+
+ public NetShare setMountpoint(String mountpoint) {
+ this.mountpoint = mountpoint;
+ return this;
+ }
+
+ public void unsetMountpoint() {
+ this.mountpoint = null;
+ }
+
+ /** Returns true if field mountpoint is set (has been assigned a value) and false otherwise */
+ public boolean isSetMountpoint() {
+ return this.mountpoint != null;
+ }
+
+ public void setMountpointIsSet(boolean value) {
+ if (!value) {
+ this.mountpoint = null;
+ }
+ }
+
public String getUsername() {
return this.username;
}
@@ -310,6 +380,22 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
break;
+ case DISPLAYNAME:
+ if (value == null) {
+ unsetDisplayname();
+ } else {
+ setDisplayname((String)value);
+ }
+ break;
+
+ case MOUNTPOINT:
+ if (value == null) {
+ unsetMountpoint();
+ } else {
+ setMountpoint((String)value);
+ }
+ break;
+
case USERNAME:
if (value == null) {
unsetUsername();
@@ -337,6 +423,12 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
case PATH:
return getPath();
+ case DISPLAYNAME:
+ return getDisplayname();
+
+ case MOUNTPOINT:
+ return getMountpoint();
+
case USERNAME:
return getUsername();
@@ -358,6 +450,10 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return isSetAuth();
case PATH:
return isSetPath();
+ case DISPLAYNAME:
+ return isSetDisplayname();
+ case MOUNTPOINT:
+ return isSetMountpoint();
case USERNAME:
return isSetUsername();
case PASSWORD:
@@ -397,6 +493,24 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return false;
}
+ boolean this_present_displayname = true && this.isSetDisplayname();
+ boolean that_present_displayname = true && that.isSetDisplayname();
+ if (this_present_displayname || that_present_displayname) {
+ if (!(this_present_displayname && that_present_displayname))
+ return false;
+ if (!this.displayname.equals(that.displayname))
+ return false;
+ }
+
+ boolean this_present_mountpoint = true && this.isSetMountpoint();
+ boolean that_present_mountpoint = true && that.isSetMountpoint();
+ if (this_present_mountpoint || that_present_mountpoint) {
+ if (!(this_present_mountpoint && that_present_mountpoint))
+ return false;
+ if (!this.mountpoint.equals(that.mountpoint))
+ return false;
+ }
+
boolean this_present_username = true && this.isSetUsername();
boolean that_present_username = true && that.isSetUsername();
if (this_present_username || that_present_username) {
@@ -432,6 +546,16 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (present_path)
list.add(path);
+ boolean present_displayname = true && (isSetDisplayname());
+ list.add(present_displayname);
+ if (present_displayname)
+ list.add(displayname);
+
+ boolean present_mountpoint = true && (isSetMountpoint());
+ list.add(present_mountpoint);
+ if (present_mountpoint)
+ list.add(mountpoint);
+
boolean present_username = true && (isSetUsername());
list.add(present_username);
if (present_username)
@@ -473,6 +597,26 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetDisplayname()).compareTo(other.isSetDisplayname());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDisplayname()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayname, other.displayname);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetMountpoint()).compareTo(other.isSetMountpoint());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetMountpoint()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mountpoint, other.mountpoint);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
@@ -528,6 +672,26 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
sb.append(this.path);
}
first = false;
+ if (isSetDisplayname()) {
+ if (!first) sb.append(", ");
+ sb.append("displayname:");
+ if (this.displayname == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.displayname);
+ }
+ first = false;
+ }
+ if (isSetMountpoint()) {
+ if (!first) sb.append(", ");
+ sb.append("mountpoint:");
+ if (this.mountpoint == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.mountpoint);
+ }
+ first = false;
+ }
if (isSetUsername()) {
if (!first) sb.append(", ");
sb.append("username:");
@@ -607,6 +771,22 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 5: // DISPLAYNAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.displayname = iprot.readString();
+ struct.setDisplaynameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // MOUNTPOINT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.mountpoint = iprot.readString();
+ struct.setMountpointIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
case 2: // USERNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.username = iprot.readString();
@@ -662,6 +842,20 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
oprot.writeI32(struct.auth.getValue());
oprot.writeFieldEnd();
}
+ if (struct.displayname != null) {
+ if (struct.isSetDisplayname()) {
+ oprot.writeFieldBegin(DISPLAYNAME_FIELD_DESC);
+ oprot.writeString(struct.displayname);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.mountpoint != null) {
+ if (struct.isSetMountpoint()) {
+ oprot.writeFieldBegin(MOUNTPOINT_FIELD_DESC);
+ oprot.writeString(struct.mountpoint);
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -686,19 +880,31 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (struct.isSetPath()) {
optionals.set(1);
}
- if (struct.isSetUsername()) {
+ if (struct.isSetDisplayname()) {
optionals.set(2);
}
- if (struct.isSetPassword()) {
+ if (struct.isSetMountpoint()) {
optionals.set(3);
}
- oprot.writeBitSet(optionals, 4);
+ if (struct.isSetUsername()) {
+ optionals.set(4);
+ }
+ if (struct.isSetPassword()) {
+ optionals.set(5);
+ }
+ oprot.writeBitSet(optionals, 6);
if (struct.isSetAuth()) {
oprot.writeI32(struct.auth.getValue());
}
if (struct.isSetPath()) {
oprot.writeString(struct.path);
}
+ if (struct.isSetDisplayname()) {
+ oprot.writeString(struct.displayname);
+ }
+ if (struct.isSetMountpoint()) {
+ oprot.writeString(struct.mountpoint);
+ }
if (struct.isSetUsername()) {
oprot.writeString(struct.username);
}
@@ -710,7 +916,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NetShare struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.auth = org.openslx.bwlp.thrift.iface.NetShareAuth.findByValue(iprot.readI32());
struct.setAuthIsSet(true);
@@ -720,10 +926,18 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
struct.setPathIsSet(true);
}
if (incoming.get(2)) {
+ struct.displayname = iprot.readString();
+ struct.setDisplaynameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.mountpoint = iprot.readString();
+ struct.setMountpointIsSet(true);
+ }
+ if (incoming.get(4)) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
}
- if (incoming.get(3)) {
+ if (incoming.get(5)) {
struct.password = iprot.readString();
struct.setPasswordIsSet(true);
}
diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift
index c2c7d17..103f8df 100644
--- a/src/main/thrift/bwlp.thrift
+++ b/src/main/thrift/bwlp.thrift
@@ -245,6 +245,8 @@ struct NetRule {
struct NetShare {
4: NetShareAuth auth,
1: string path,
+ 5: optional string displayname,
+ 6: optional string mountpoint,
2: optional string username,
3: optional string password,
}