summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java')
-rw-r--r--src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java108
1 files changed, 104 insertions, 4 deletions
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java b/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java
index fccb7b3..7b74425 100644
--- a/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java
+++ b/src/main/java/org/openslx/imagemaster/thrift/iface/FtpCredentials.java
@@ -37,6 +37,7 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
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)1);
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)2);
+ private static final org.apache.thrift.protocol.TField FILENAME_FIELD_DESC = new org.apache.thrift.protocol.TField("filename", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -46,11 +47,13 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
public String username; // required
public String password; // required
+ public String filename; // 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 {
USERNAME((short)1, "username"),
- PASSWORD((short)2, "password");
+ PASSWORD((short)2, "password"),
+ FILENAME((short)3, "filename");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -69,6 +72,8 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
return USERNAME;
case 2: // PASSWORD
return PASSWORD;
+ case 3: // FILENAME
+ return FILENAME;
default:
return null;
}
@@ -116,6 +121,8 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
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.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.FILENAME, new org.apache.thrift.meta_data.FieldMetaData("filename", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FtpCredentials.class, metaDataMap);
}
@@ -125,11 +132,13 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
public FtpCredentials(
String username,
- String password)
+ String password,
+ String filename)
{
this();
this.username = username;
this.password = password;
+ this.filename = filename;
}
/**
@@ -142,6 +151,9 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
if (other.isSetPassword()) {
this.password = other.password;
}
+ if (other.isSetFilename()) {
+ this.filename = other.filename;
+ }
}
public FtpCredentials deepCopy() {
@@ -152,6 +164,7 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
public void clear() {
this.username = null;
this.password = null;
+ this.filename = null;
}
public String getUsername() {
@@ -202,6 +215,30 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
}
}
+ public String getFilename() {
+ return this.filename;
+ }
+
+ public FtpCredentials setFilename(String filename) {
+ this.filename = filename;
+ return this;
+ }
+
+ public void unsetFilename() {
+ this.filename = null;
+ }
+
+ /** Returns true if field filename is set (has been assigned a value) and false otherwise */
+ public boolean isSetFilename() {
+ return this.filename != null;
+ }
+
+ public void setFilenameIsSet(boolean value) {
+ if (!value) {
+ this.filename = null;
+ }
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USERNAME:
@@ -220,6 +257,14 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
}
break;
+ case FILENAME:
+ if (value == null) {
+ unsetFilename();
+ } else {
+ setFilename((String)value);
+ }
+ break;
+
}
}
@@ -231,6 +276,9 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
case PASSWORD:
return getPassword();
+ case FILENAME:
+ return getFilename();
+
}
throw new IllegalStateException();
}
@@ -246,6 +294,8 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
return isSetUsername();
case PASSWORD:
return isSetPassword();
+ case FILENAME:
+ return isSetFilename();
}
throw new IllegalStateException();
}
@@ -281,6 +331,15 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
return false;
}
+ boolean this_present_filename = true && this.isSetFilename();
+ boolean that_present_filename = true && that.isSetFilename();
+ if (this_present_filename || that_present_filename) {
+ if (!(this_present_filename && that_present_filename))
+ return false;
+ if (!this.filename.equals(that.filename))
+ return false;
+ }
+
return true;
}
@@ -317,6 +376,16 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetFilename()).compareTo(other.isSetFilename());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFilename()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filename, other.filename);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -352,6 +421,14 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
sb.append(this.password);
}
first = false;
+ if (!first) sb.append(", ");
+ sb.append("filename:");
+ if (this.filename == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.filename);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
@@ -411,6 +488,14 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 3: // FILENAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.filename = iprot.readString();
+ struct.setFilenameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -436,6 +521,11 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
oprot.writeString(struct.password);
oprot.writeFieldEnd();
}
+ if (struct.filename != null) {
+ oprot.writeFieldBegin(FILENAME_FIELD_DESC);
+ oprot.writeString(struct.filename);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -460,19 +550,25 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
if (struct.isSetPassword()) {
optionals.set(1);
}
- oprot.writeBitSet(optionals, 2);
+ if (struct.isSetFilename()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
if (struct.isSetUsername()) {
oprot.writeString(struct.username);
}
if (struct.isSetPassword()) {
oprot.writeString(struct.password);
}
+ if (struct.isSetFilename()) {
+ oprot.writeString(struct.filename);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, FtpCredentials struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.username = iprot.readString();
struct.setUsernameIsSet(true);
@@ -481,6 +577,10 @@ public class FtpCredentials implements org.apache.thrift.TBase<FtpCredentials, F
struct.password = iprot.readString();
struct.setPasswordIsSet(true);
}
+ if (incoming.get(2)) {
+ struct.filename = iprot.readString();
+ struct.setFilenameIsSet(true);
+ }
}
}