airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1550285 [7/11] - in /airavata/trunk/modules/thrift: ./ interpreter-service/src/main/java/org/apache/airavata/experiment/execution/ interpreter-service/src/main/resources/
Date Wed, 11 Dec 2013 22:07:22 GMT
Modified: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java?rev=1550285&r1=1550284&r2=1550285&view=diff
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java (original)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java Wed Dec 11 22:07:21 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
 /**
  * Autogenerated by Thrift Compiler (0.9.1)
  *
@@ -33,654 +54,657 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class MyProxyRepositorySettings implements org.apache.thrift.TBase<MyProxyRepositorySettings, MyProxyRepositorySettings._Fields>, java.io.Serializable, Cloneable, Comparable<MyProxyRepositorySettings> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MyProxyRepositorySettings");
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MyProxyRepositorySettings");
+
+    private static final org.apache.thrift.protocol.TField USER_NAME_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 MYPROXY_SERVER_FIELD_DESC = new org.apache.thrift.protocol.TField("myproxyServer", org.apache.thrift.protocol.TType.STRING, (short)3);
+    private static final org.apache.thrift.protocol.TField LIFETIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lifetime", org.apache.thrift.protocol.TType.I32, (short)4);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+        schemes.put(StandardScheme.class, new MyProxyRepositorySettingsStandardSchemeFactory());
+        schemes.put(TupleScheme.class, new MyProxyRepositorySettingsTupleSchemeFactory());
+    }
+
+    public String userName; // optional
+    public String password; // optional
+    public String myproxyServer; // optional
+    public int lifetime; // optional
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+        USER_NAME((short)1, "userName"),
+        PASSWORD((short)2, "password"),
+        MYPROXY_SERVER((short)3, "myproxyServer"),
+        LIFETIME((short)4, "lifetime");
+
+        private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+        static {
+            for (_Fields field : EnumSet.allOf(_Fields.class)) {
+                byName.put(field.getFieldName(), field);
+            }
+        }
 
-  private static final org.apache.thrift.protocol.TField USER_NAME_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 MYPROXY_SERVER_FIELD_DESC = new org.apache.thrift.protocol.TField("myproxyServer", org.apache.thrift.protocol.TType.STRING, (short)3);
-  private static final org.apache.thrift.protocol.TField LIFETIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lifetime", org.apache.thrift.protocol.TType.I32, (short)4);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-  static {
-    schemes.put(StandardScheme.class, new MyProxyRepositorySettingsStandardSchemeFactory());
-    schemes.put(TupleScheme.class, new MyProxyRepositorySettingsTupleSchemeFactory());
-  }
-
-  public String userName; // required
-  public String password; // required
-  public String myproxyServer; // required
-  public int lifetime; // 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 {
-    USER_NAME((short)1, "userName"),
-    PASSWORD((short)2, "password"),
-    MYPROXY_SERVER((short)3, "myproxyServer"),
-    LIFETIME((short)4, "lifetime");
+        /**
+         * Find the _Fields constant that matches fieldId, or null if its not found.
+         */
+        public static _Fields findByThriftId(int fieldId) {
+            switch(fieldId) {
+                case 1: // USER_NAME
+                    return USER_NAME;
+                case 2: // PASSWORD
+                    return PASSWORD;
+                case 3: // MYPROXY_SERVER
+                    return MYPROXY_SERVER;
+                case 4: // LIFETIME
+                    return LIFETIME;
+                default:
+                    return null;
+            }
+        }
 
-    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+        /**
+         * Find the _Fields constant that matches fieldId, throwing an exception
+         * if it is not found.
+         */
+        public static _Fields findByThriftIdOrThrow(int fieldId) {
+            _Fields fields = findByThriftId(fieldId);
+            if (fields == null) throw new 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) {
+            return byName.get(name);
+        }
+
+        private final short _thriftId;
+        private final String _fieldName;
+
+        _Fields(short thriftId, String fieldName) {
+            _thriftId = thriftId;
+            _fieldName = fieldName;
+        }
+
+        public short getThriftFieldId() {
+            return _thriftId;
+        }
+
+        public String getFieldName() {
+            return _fieldName;
+        }
+    }
+
+    // isset id assignments
+    private static final int __LIFETIME_ISSET_ID = 0;
+    private byte __isset_bitfield = 0;
+    private _Fields optionals[] = {_Fields.USER_NAME,_Fields.PASSWORD,_Fields.MYPROXY_SERVER,_Fields.LIFETIME};
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
-      for (_Fields field : EnumSet.allOf(_Fields.class)) {
-        byName.put(field.getFieldName(), field);
-      }
+        Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+        tmpMap.put(_Fields.USER_NAME, 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,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        tmpMap.put(_Fields.MYPROXY_SERVER, new org.apache.thrift.meta_data.FieldMetaData("myproxyServer", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        tmpMap.put(_Fields.LIFETIME, new org.apache.thrift.meta_data.FieldMetaData("lifetime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+        metaDataMap = Collections.unmodifiableMap(tmpMap);
+        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MyProxyRepositorySettings.class, metaDataMap);
     }
 
-    /**
-     * Find the _Fields constant that matches fieldId, or null if its not found.
-     */
-    public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
-        case 1: // USER_NAME
-          return USER_NAME;
-        case 2: // PASSWORD
-          return PASSWORD;
-        case 3: // MYPROXY_SERVER
-          return MYPROXY_SERVER;
-        case 4: // LIFETIME
-          return LIFETIME;
-        default:
-          return null;
-      }
+    public MyProxyRepositorySettings() {
     }
 
     /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
+     * Performs a deep copy on <i>other</i>.
      */
-    public static _Fields findByThriftIdOrThrow(int fieldId) {
-      _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-      return fields;
+    public MyProxyRepositorySettings(MyProxyRepositorySettings other) {
+        __isset_bitfield = other.__isset_bitfield;
+        if (other.isSetUserName()) {
+            this.userName = other.userName;
+        }
+        if (other.isSetPassword()) {
+            this.password = other.password;
+        }
+        if (other.isSetMyproxyServer()) {
+            this.myproxyServer = other.myproxyServer;
+        }
+        this.lifetime = other.lifetime;
     }
 
-    /**
-     * Find the _Fields constant that matches name, or null if its not found.
-     */
-    public static _Fields findByName(String name) {
-      return byName.get(name);
+    public MyProxyRepositorySettings deepCopy() {
+        return new MyProxyRepositorySettings(this);
     }
 
-    private final short _thriftId;
-    private final String _fieldName;
+    @Override
+    public void clear() {
+        this.userName = null;
+        this.password = null;
+        this.myproxyServer = null;
+        setLifetimeIsSet(false);
+        this.lifetime = 0;
+    }
 
-    _Fields(short thriftId, String fieldName) {
-      _thriftId = thriftId;
-      _fieldName = fieldName;
-    }
-
-    public short getThriftFieldId() {
-      return _thriftId;
-    }
-
-    public String getFieldName() {
-      return _fieldName;
-    }
-  }
-
-  // isset id assignments
-  private static final int __LIFETIME_ISSET_ID = 0;
-  private byte __isset_bitfield = 0;
-  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);
-    tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        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.MYPROXY_SERVER, new org.apache.thrift.meta_data.FieldMetaData("myproxyServer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.LIFETIME, new org.apache.thrift.meta_data.FieldMetaData("lifetime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
-    metaDataMap = Collections.unmodifiableMap(tmpMap);
-    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MyProxyRepositorySettings.class, metaDataMap);
-  }
-
-  public MyProxyRepositorySettings() {
-  }
-
-  public MyProxyRepositorySettings(
-    String userName,
-    String password,
-    String myproxyServer,
-    int lifetime)
-  {
-    this();
-    this.userName = userName;
-    this.password = password;
-    this.myproxyServer = myproxyServer;
-    this.lifetime = lifetime;
-    setLifetimeIsSet(true);
-  }
-
-  /**
-   * Performs a deep copy on <i>other</i>.
-   */
-  public MyProxyRepositorySettings(MyProxyRepositorySettings other) {
-    __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetUserName()) {
-      this.userName = other.userName;
-    }
-    if (other.isSetPassword()) {
-      this.password = other.password;
-    }
-    if (other.isSetMyproxyServer()) {
-      this.myproxyServer = other.myproxyServer;
-    }
-    this.lifetime = other.lifetime;
-  }
-
-  public MyProxyRepositorySettings deepCopy() {
-    return new MyProxyRepositorySettings(this);
-  }
-
-  @Override
-  public void clear() {
-    this.userName = null;
-    this.password = null;
-    this.myproxyServer = null;
-    setLifetimeIsSet(false);
-    this.lifetime = 0;
-  }
-
-  public String getUserName() {
-    return this.userName;
-  }
-
-  public MyProxyRepositorySettings setUserName(String userName) {
-    this.userName = userName;
-    return this;
-  }
-
-  public void unsetUserName() {
-    this.userName = null;
-  }
-
-  /** Returns true if field userName is set (has been assigned a value) and false otherwise */
-  public boolean isSetUserName() {
-    return this.userName != null;
-  }
-
-  public void setUserNameIsSet(boolean value) {
-    if (!value) {
-      this.userName = null;
-    }
-  }
-
-  public String getPassword() {
-    return this.password;
-  }
-
-  public MyProxyRepositorySettings setPassword(String password) {
-    this.password = password;
-    return this;
-  }
-
-  public void unsetPassword() {
-    this.password = null;
-  }
-
-  /** Returns true if field password is set (has been assigned a value) and false otherwise */
-  public boolean isSetPassword() {
-    return this.password != null;
-  }
-
-  public void setPasswordIsSet(boolean value) {
-    if (!value) {
-      this.password = null;
-    }
-  }
-
-  public String getMyproxyServer() {
-    return this.myproxyServer;
-  }
-
-  public MyProxyRepositorySettings setMyproxyServer(String myproxyServer) {
-    this.myproxyServer = myproxyServer;
-    return this;
-  }
-
-  public void unsetMyproxyServer() {
-    this.myproxyServer = null;
-  }
-
-  /** Returns true if field myproxyServer is set (has been assigned a value) and false otherwise */
-  public boolean isSetMyproxyServer() {
-    return this.myproxyServer != null;
-  }
-
-  public void setMyproxyServerIsSet(boolean value) {
-    if (!value) {
-      this.myproxyServer = null;
-    }
-  }
-
-  public int getLifetime() {
-    return this.lifetime;
-  }
-
-  public MyProxyRepositorySettings setLifetime(int lifetime) {
-    this.lifetime = lifetime;
-    setLifetimeIsSet(true);
-    return this;
-  }
-
-  public void unsetLifetime() {
-    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIFETIME_ISSET_ID);
-  }
-
-  /** Returns true if field lifetime is set (has been assigned a value) and false otherwise */
-  public boolean isSetLifetime() {
-    return EncodingUtils.testBit(__isset_bitfield, __LIFETIME_ISSET_ID);
-  }
-
-  public void setLifetimeIsSet(boolean value) {
-    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIFETIME_ISSET_ID, value);
-  }
-
-  public void setFieldValue(_Fields field, Object value) {
-    switch (field) {
-    case USER_NAME:
-      if (value == null) {
-        unsetUserName();
-      } else {
-        setUserName((String)value);
-      }
-      break;
-
-    case PASSWORD:
-      if (value == null) {
-        unsetPassword();
-      } else {
-        setPassword((String)value);
-      }
-      break;
-
-    case MYPROXY_SERVER:
-      if (value == null) {
-        unsetMyproxyServer();
-      } else {
-        setMyproxyServer((String)value);
-      }
-      break;
-
-    case LIFETIME:
-      if (value == null) {
-        unsetLifetime();
-      } else {
-        setLifetime((Integer)value);
-      }
-      break;
-
-    }
-  }
-
-  public Object getFieldValue(_Fields field) {
-    switch (field) {
-    case USER_NAME:
-      return getUserName();
-
-    case PASSWORD:
-      return getPassword();
-
-    case MYPROXY_SERVER:
-      return getMyproxyServer();
-
-    case LIFETIME:
-      return Integer.valueOf(getLifetime());
-
-    }
-    throw new 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();
-    }
-
-    switch (field) {
-    case USER_NAME:
-      return isSetUserName();
-    case PASSWORD:
-      return isSetPassword();
-    case MYPROXY_SERVER:
-      return isSetMyproxyServer();
-    case LIFETIME:
-      return isSetLifetime();
-    }
-    throw new IllegalStateException();
-  }
-
-  @Override
-  public boolean equals(Object that) {
-    if (that == null)
-      return false;
-    if (that instanceof MyProxyRepositorySettings)
-      return this.equals((MyProxyRepositorySettings)that);
-    return false;
-  }
-
-  public boolean equals(MyProxyRepositorySettings that) {
-    if (that == null)
-      return false;
-
-    boolean this_present_userName = true && this.isSetUserName();
-    boolean that_present_userName = true && that.isSetUserName();
-    if (this_present_userName || that_present_userName) {
-      if (!(this_present_userName && that_present_userName))
-        return false;
-      if (!this.userName.equals(that.userName))
-        return false;
+    public String getUserName() {
+        return this.userName;
     }
 
-    boolean this_present_password = true && this.isSetPassword();
-    boolean that_present_password = true && that.isSetPassword();
-    if (this_present_password || that_present_password) {
-      if (!(this_present_password && that_present_password))
-        return false;
-      if (!this.password.equals(that.password))
-        return false;
+    public MyProxyRepositorySettings setUserName(String userName) {
+        this.userName = userName;
+        return this;
     }
 
-    boolean this_present_myproxyServer = true && this.isSetMyproxyServer();
-    boolean that_present_myproxyServer = true && that.isSetMyproxyServer();
-    if (this_present_myproxyServer || that_present_myproxyServer) {
-      if (!(this_present_myproxyServer && that_present_myproxyServer))
-        return false;
-      if (!this.myproxyServer.equals(that.myproxyServer))
-        return false;
+    public void unsetUserName() {
+        this.userName = null;
     }
 
-    boolean this_present_lifetime = true;
-    boolean that_present_lifetime = true;
-    if (this_present_lifetime || that_present_lifetime) {
-      if (!(this_present_lifetime && that_present_lifetime))
-        return false;
-      if (this.lifetime != that.lifetime)
+    /** Returns true if field userName is set (has been assigned a value) and false otherwise */
+    public boolean isSetUserName() {
+        return this.userName != null;
+    }
+
+    public void setUserNameIsSet(boolean value) {
+        if (!value) {
+            this.userName = null;
+        }
+    }
+
+    public String getPassword() {
+        return this.password;
+    }
+
+    public MyProxyRepositorySettings setPassword(String password) {
+        this.password = password;
+        return this;
+    }
+
+    public void unsetPassword() {
+        this.password = null;
+    }
+
+    /** Returns true if field password is set (has been assigned a value) and false otherwise */
+    public boolean isSetPassword() {
+        return this.password != null;
+    }
+
+    public void setPasswordIsSet(boolean value) {
+        if (!value) {
+            this.password = null;
+        }
+    }
+
+    public String getMyproxyServer() {
+        return this.myproxyServer;
+    }
+
+    public MyProxyRepositorySettings setMyproxyServer(String myproxyServer) {
+        this.myproxyServer = myproxyServer;
+        return this;
+    }
+
+    public void unsetMyproxyServer() {
+        this.myproxyServer = null;
+    }
+
+    /** Returns true if field myproxyServer is set (has been assigned a value) and false otherwise */
+    public boolean isSetMyproxyServer() {
+        return this.myproxyServer != null;
+    }
+
+    public void setMyproxyServerIsSet(boolean value) {
+        if (!value) {
+            this.myproxyServer = null;
+        }
+    }
+
+    public int getLifetime() {
+        return this.lifetime;
+    }
+
+    public MyProxyRepositorySettings setLifetime(int lifetime) {
+        this.lifetime = lifetime;
+        setLifetimeIsSet(true);
+        return this;
+    }
+
+    public void unsetLifetime() {
+        __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIFETIME_ISSET_ID);
+    }
+
+    /** Returns true if field lifetime is set (has been assigned a value) and false otherwise */
+    public boolean isSetLifetime() {
+        return EncodingUtils.testBit(__isset_bitfield, __LIFETIME_ISSET_ID);
+    }
+
+    public void setLifetimeIsSet(boolean value) {
+        __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIFETIME_ISSET_ID, value);
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+        switch (field) {
+            case USER_NAME:
+                if (value == null) {
+                    unsetUserName();
+                } else {
+                    setUserName((String)value);
+                }
+                break;
+
+            case PASSWORD:
+                if (value == null) {
+                    unsetPassword();
+                } else {
+                    setPassword((String)value);
+                }
+                break;
+
+            case MYPROXY_SERVER:
+                if (value == null) {
+                    unsetMyproxyServer();
+                } else {
+                    setMyproxyServer((String)value);
+                }
+                break;
+
+            case LIFETIME:
+                if (value == null) {
+                    unsetLifetime();
+                } else {
+                    setLifetime((Integer)value);
+                }
+                break;
+
+        }
+    }
+
+    public Object getFieldValue(_Fields field) {
+        switch (field) {
+            case USER_NAME:
+                return getUserName();
+
+            case PASSWORD:
+                return getPassword();
+
+            case MYPROXY_SERVER:
+                return getMyproxyServer();
+
+            case LIFETIME:
+                return Integer.valueOf(getLifetime());
+
+        }
+        throw new 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();
+        }
+
+        switch (field) {
+            case USER_NAME:
+                return isSetUserName();
+            case PASSWORD:
+                return isSetPassword();
+            case MYPROXY_SERVER:
+                return isSetMyproxyServer();
+            case LIFETIME:
+                return isSetLifetime();
+        }
+        throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (that == null)
+            return false;
+        if (that instanceof MyProxyRepositorySettings)
+            return this.equals((MyProxyRepositorySettings)that);
         return false;
     }
 
-    return true;
-  }
+    public boolean equals(MyProxyRepositorySettings that) {
+        if (that == null)
+            return false;
+
+        boolean this_present_userName = true && this.isSetUserName();
+        boolean that_present_userName = true && that.isSetUserName();
+        if (this_present_userName || that_present_userName) {
+            if (!(this_present_userName && that_present_userName))
+                return false;
+            if (!this.userName.equals(that.userName))
+                return false;
+        }
+
+        boolean this_present_password = true && this.isSetPassword();
+        boolean that_present_password = true && that.isSetPassword();
+        if (this_present_password || that_present_password) {
+            if (!(this_present_password && that_present_password))
+                return false;
+            if (!this.password.equals(that.password))
+                return false;
+        }
 
-  @Override
-  public int hashCode() {
-    return 0;
-  }
-
-  @Override
-  public int compareTo(MyProxyRepositorySettings other) {
-    if (!getClass().equals(other.getClass())) {
-      return getClass().getName().compareTo(other.getClass().getName());
-    }
-
-    int lastComparison = 0;
-
-    lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetUserName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetPassword()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetMyproxyServer()).compareTo(other.isSetMyproxyServer());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetMyproxyServer()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myproxyServer, other.myproxyServer);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetLifetime()).compareTo(other.isSetLifetime());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetLifetime()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lifetime, other.lifetime);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    return 0;
-  }
-
-  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);
-  }
-
-  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder("MyProxyRepositorySettings(");
-    boolean first = true;
-
-    sb.append("userName:");
-    if (this.userName == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.userName);
-    }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("password:");
-    if (this.password == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.password);
-    }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("myproxyServer:");
-    if (this.myproxyServer == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.myproxyServer);
-    }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("lifetime:");
-    sb.append(this.lifetime);
-    first = false;
-    sb.append(")");
-    return sb.toString();
-  }
-
-  public void validate() throws org.apache.thrift.TException {
-    // check for required fields
-    // check for sub-struct validity
-  }
-
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-      __isset_bitfield = 0;
-      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private static class MyProxyRepositorySettingsStandardSchemeFactory implements SchemeFactory {
-    public MyProxyRepositorySettingsStandardScheme getScheme() {
-      return new MyProxyRepositorySettingsStandardScheme();
-    }
-  }
-
-  private static class MyProxyRepositorySettingsStandardScheme extends StandardScheme<MyProxyRepositorySettings> {
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField schemeField;
-      iprot.readStructBegin();
-      while (true)
-      {
-        schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (schemeField.id) {
-          case 1: // USER_NAME
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.userName = iprot.readString();
-              struct.setUserNameIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 2: // PASSWORD
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.password = iprot.readString();
-              struct.setPasswordIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 3: // MYPROXY_SERVER
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.myproxyServer = iprot.readString();
-              struct.setMyproxyServerIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // LIFETIME
-            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.lifetime = iprot.readI32();
-              struct.setLifetimeIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      struct.validate();
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
-      struct.validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.userName != null) {
-        oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
-        oprot.writeString(struct.userName);
-        oprot.writeFieldEnd();
-      }
-      if (struct.password != null) {
-        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
-        oprot.writeString(struct.password);
-        oprot.writeFieldEnd();
-      }
-      if (struct.myproxyServer != null) {
-        oprot.writeFieldBegin(MYPROXY_SERVER_FIELD_DESC);
-        oprot.writeString(struct.myproxyServer);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldBegin(LIFETIME_FIELD_DESC);
-      oprot.writeI32(struct.lifetime);
-      oprot.writeFieldEnd();
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
-
-  }
-
-  private static class MyProxyRepositorySettingsTupleSchemeFactory implements SchemeFactory {
-    public MyProxyRepositorySettingsTupleScheme getScheme() {
-      return new MyProxyRepositorySettingsTupleScheme();
+        boolean this_present_myproxyServer = true && this.isSetMyproxyServer();
+        boolean that_present_myproxyServer = true && that.isSetMyproxyServer();
+        if (this_present_myproxyServer || that_present_myproxyServer) {
+            if (!(this_present_myproxyServer && that_present_myproxyServer))
+                return false;
+            if (!this.myproxyServer.equals(that.myproxyServer))
+                return false;
+        }
+
+        boolean this_present_lifetime = true && this.isSetLifetime();
+        boolean that_present_lifetime = true && that.isSetLifetime();
+        if (this_present_lifetime || that_present_lifetime) {
+            if (!(this_present_lifetime && that_present_lifetime))
+                return false;
+            if (this.lifetime != that.lifetime)
+                return false;
+        }
+
+        return true;
     }
-  }
 
-  private static class MyProxyRepositorySettingsTupleScheme extends TupleScheme<MyProxyRepositorySettings> {
+    @Override
+    public int hashCode() {
+        return 0;
+    }
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
-      TTupleProtocol oprot = (TTupleProtocol) prot;
-      BitSet optionals = new BitSet();
-      if (struct.isSetUserName()) {
-        optionals.set(0);
-      }
-      if (struct.isSetPassword()) {
-        optionals.set(1);
-      }
-      if (struct.isSetMyproxyServer()) {
-        optionals.set(2);
-      }
-      if (struct.isSetLifetime()) {
-        optionals.set(3);
-      }
-      oprot.writeBitSet(optionals, 4);
-      if (struct.isSetUserName()) {
-        oprot.writeString(struct.userName);
-      }
-      if (struct.isSetPassword()) {
-        oprot.writeString(struct.password);
-      }
-      if (struct.isSetMyproxyServer()) {
-        oprot.writeString(struct.myproxyServer);
-      }
-      if (struct.isSetLifetime()) {
-        oprot.writeI32(struct.lifetime);
-      }
+    public int compareTo(MyProxyRepositorySettings other) {
+        if (!getClass().equals(other.getClass())) {
+            return getClass().getName().compareTo(other.getClass().getName());
+        }
+
+        int lastComparison = 0;
+
+        lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetUserName()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetPassword()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        lastComparison = Boolean.valueOf(isSetMyproxyServer()).compareTo(other.isSetMyproxyServer());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetMyproxyServer()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myproxyServer, other.myproxyServer);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        lastComparison = Boolean.valueOf(isSetLifetime()).compareTo(other.isSetLifetime());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetLifetime()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lifetime, other.lifetime);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        return 0;
+    }
+
+    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);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+        schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
-      TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(4);
-      if (incoming.get(0)) {
-        struct.userName = iprot.readString();
-        struct.setUserNameIsSet(true);
-      }
-      if (incoming.get(1)) {
-        struct.password = iprot.readString();
-        struct.setPasswordIsSet(true);
-      }
-      if (incoming.get(2)) {
-        struct.myproxyServer = iprot.readString();
-        struct.setMyproxyServerIsSet(true);
-      }
-      if (incoming.get(3)) {
-        struct.lifetime = iprot.readI32();
-        struct.setLifetimeIsSet(true);
-      }
+    public String toString() {
+        StringBuilder sb = new StringBuilder("MyProxyRepositorySettings(");
+        boolean first = true;
+
+        if (isSetUserName()) {
+            sb.append("userName:");
+            if (this.userName == null) {
+                sb.append("null");
+            } else {
+                sb.append(this.userName);
+            }
+            first = false;
+        }
+        if (isSetPassword()) {
+            if (!first) sb.append(", ");
+            sb.append("password:");
+            if (this.password == null) {
+                sb.append("null");
+            } else {
+                sb.append(this.password);
+            }
+            first = false;
+        }
+        if (isSetMyproxyServer()) {
+            if (!first) sb.append(", ");
+            sb.append("myproxyServer:");
+            if (this.myproxyServer == null) {
+                sb.append("null");
+            } else {
+                sb.append(this.myproxyServer);
+            }
+            first = false;
+        }
+        if (isSetLifetime()) {
+            if (!first) sb.append(", ");
+            sb.append("lifetime:");
+            sb.append(this.lifetime);
+            first = false;
+        }
+        sb.append(")");
+        return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+        // check for required fields
+        // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+        try {
+            write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+        } catch (org.apache.thrift.TException te) {
+            throw new java.io.IOException(te);
+        }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+        try {
+            // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+            __isset_bitfield = 0;
+            read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+        } catch (org.apache.thrift.TException te) {
+            throw new java.io.IOException(te);
+        }
+    }
+
+    private static class MyProxyRepositorySettingsStandardSchemeFactory implements SchemeFactory {
+        public MyProxyRepositorySettingsStandardScheme getScheme() {
+            return new MyProxyRepositorySettingsStandardScheme();
+        }
+    }
+
+    private static class MyProxyRepositorySettingsStandardScheme extends StandardScheme<MyProxyRepositorySettings> {
+
+        public void read(org.apache.thrift.protocol.TProtocol iprot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
+            org.apache.thrift.protocol.TField schemeField;
+            iprot.readStructBegin();
+            while (true)
+            {
+                schemeField = iprot.readFieldBegin();
+                if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+                    break;
+                }
+                switch (schemeField.id) {
+                    case 1: // USER_NAME
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.userName = iprot.readString();
+                            struct.setUserNameIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    case 2: // PASSWORD
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.password = iprot.readString();
+                            struct.setPasswordIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    case 3: // MYPROXY_SERVER
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.myproxyServer = iprot.readString();
+                            struct.setMyproxyServerIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    case 4: // LIFETIME
+                        if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+                            struct.lifetime = iprot.readI32();
+                            struct.setLifetimeIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    default:
+                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                }
+                iprot.readFieldEnd();
+            }
+            iprot.readStructEnd();
+
+            // check for required fields of primitive type, which can't be checked in the validate method
+            struct.validate();
+        }
+
+        public void write(org.apache.thrift.protocol.TProtocol oprot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
+            struct.validate();
+
+            oprot.writeStructBegin(STRUCT_DESC);
+            if (struct.userName != null) {
+                if (struct.isSetUserName()) {
+                    oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
+                    oprot.writeString(struct.userName);
+                    oprot.writeFieldEnd();
+                }
+            }
+            if (struct.password != null) {
+                if (struct.isSetPassword()) {
+                    oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
+                    oprot.writeString(struct.password);
+                    oprot.writeFieldEnd();
+                }
+            }
+            if (struct.myproxyServer != null) {
+                if (struct.isSetMyproxyServer()) {
+                    oprot.writeFieldBegin(MYPROXY_SERVER_FIELD_DESC);
+                    oprot.writeString(struct.myproxyServer);
+                    oprot.writeFieldEnd();
+                }
+            }
+            if (struct.isSetLifetime()) {
+                oprot.writeFieldBegin(LIFETIME_FIELD_DESC);
+                oprot.writeI32(struct.lifetime);
+                oprot.writeFieldEnd();
+            }
+            oprot.writeFieldStop();
+            oprot.writeStructEnd();
+        }
+
+    }
+
+    private static class MyProxyRepositorySettingsTupleSchemeFactory implements SchemeFactory {
+        public MyProxyRepositorySettingsTupleScheme getScheme() {
+            return new MyProxyRepositorySettingsTupleScheme();
+        }
+    }
+
+    private static class MyProxyRepositorySettingsTupleScheme extends TupleScheme<MyProxyRepositorySettings> {
+
+        @Override
+        public void write(org.apache.thrift.protocol.TProtocol prot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
+            TTupleProtocol oprot = (TTupleProtocol) prot;
+            BitSet optionals = new BitSet();
+            if (struct.isSetUserName()) {
+                optionals.set(0);
+            }
+            if (struct.isSetPassword()) {
+                optionals.set(1);
+            }
+            if (struct.isSetMyproxyServer()) {
+                optionals.set(2);
+            }
+            if (struct.isSetLifetime()) {
+                optionals.set(3);
+            }
+            oprot.writeBitSet(optionals, 4);
+            if (struct.isSetUserName()) {
+                oprot.writeString(struct.userName);
+            }
+            if (struct.isSetPassword()) {
+                oprot.writeString(struct.password);
+            }
+            if (struct.isSetMyproxyServer()) {
+                oprot.writeString(struct.myproxyServer);
+            }
+            if (struct.isSetLifetime()) {
+                oprot.writeI32(struct.lifetime);
+            }
+        }
+
+        @Override
+        public void read(org.apache.thrift.protocol.TProtocol prot, MyProxyRepositorySettings struct) throws org.apache.thrift.TException {
+            TTupleProtocol iprot = (TTupleProtocol) prot;
+            BitSet incoming = iprot.readBitSet(4);
+            if (incoming.get(0)) {
+                struct.userName = iprot.readString();
+                struct.setUserNameIsSet(true);
+            }
+            if (incoming.get(1)) {
+                struct.password = iprot.readString();
+                struct.setPasswordIsSet(true);
+            }
+            if (incoming.get(2)) {
+                struct.myproxyServer = iprot.readString();
+                struct.setMyproxyServerIsSet(true);
+            }
+            if (incoming.get(3)) {
+                struct.lifetime = iprot.readI32();
+                struct.setLifetimeIsSet(true);
+            }
+        }
     }
-  }
 
 }
 

Modified: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java?rev=1550285&r1=1550284&r2=1550285&view=diff
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java (original)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java Wed Dec 11 22:07:21 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
 /**
  * Autogenerated by Thrift Compiler (0.9.1)
  *
@@ -33,556 +54,558 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class NameValuePairType implements org.apache.thrift.TBase<NameValuePairType, NameValuePairType._Fields>, java.io.Serializable, Cloneable, Comparable<NameValuePairType> {
-  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NameValuePairType");
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NameValuePairType");
+
+    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
+    private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
+    private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+    static {
+        schemes.put(StandardScheme.class, new NameValuePairTypeStandardSchemeFactory());
+        schemes.put(TupleScheme.class, new NameValuePairTypeTupleSchemeFactory());
+    }
+
+    public String name; // optional
+    public String value; // optional
+    public String description; // optional
 
-  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)3);
-
-  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-  static {
-    schemes.put(StandardScheme.class, new NameValuePairTypeStandardSchemeFactory());
-    schemes.put(TupleScheme.class, new NameValuePairTypeTupleSchemeFactory());
-  }
-
-  public String name; // required
-  public String value; // required
-  public String description; // 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 {
-    NAME((short)1, "name"),
-    VALUE((short)2, "value"),
-    DESCRIPTION((short)3, "description");
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+        NAME((short)1, "name"),
+        VALUE((short)2, "value"),
+        DESCRIPTION((short)3, "description");
 
-    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+        private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+        static {
+            for (_Fields field : EnumSet.allOf(_Fields.class)) {
+                byName.put(field.getFieldName(), field);
+            }
+        }
+
+        /**
+         * Find the _Fields constant that matches fieldId, or null if its not found.
+         */
+        public static _Fields findByThriftId(int fieldId) {
+            switch(fieldId) {
+                case 1: // NAME
+                    return NAME;
+                case 2: // VALUE
+                    return VALUE;
+                case 3: // DESCRIPTION
+                    return DESCRIPTION;
+                default:
+                    return null;
+            }
+        }
+
+        /**
+         * Find the _Fields constant that matches fieldId, throwing an exception
+         * if it is not found.
+         */
+        public static _Fields findByThriftIdOrThrow(int fieldId) {
+            _Fields fields = findByThriftId(fieldId);
+            if (fields == null) throw new 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) {
+            return byName.get(name);
+        }
 
+        private final short _thriftId;
+        private final String _fieldName;
+
+        _Fields(short thriftId, String fieldName) {
+            _thriftId = thriftId;
+            _fieldName = fieldName;
+        }
+
+        public short getThriftFieldId() {
+            return _thriftId;
+        }
+
+        public String getFieldName() {
+            return _fieldName;
+        }
+    }
+
+    // isset id assignments
+    private _Fields optionals[] = {_Fields.NAME,_Fields.VALUE,_Fields.DESCRIPTION};
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
     static {
-      for (_Fields field : EnumSet.allOf(_Fields.class)) {
-        byName.put(field.getFieldName(), field);
-      }
+        Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+        tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+        metaDataMap = Collections.unmodifiableMap(tmpMap);
+        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NameValuePairType.class, metaDataMap);
     }
 
-    /**
-     * Find the _Fields constant that matches fieldId, or null if its not found.
-     */
-    public static _Fields findByThriftId(int fieldId) {
-      switch(fieldId) {
-        case 1: // NAME
-          return NAME;
-        case 2: // VALUE
-          return VALUE;
-        case 3: // DESCRIPTION
-          return DESCRIPTION;
-        default:
-          return null;
-      }
+    public NameValuePairType() {
     }
 
     /**
-     * Find the _Fields constant that matches fieldId, throwing an exception
-     * if it is not found.
+     * Performs a deep copy on <i>other</i>.
      */
-    public static _Fields findByThriftIdOrThrow(int fieldId) {
-      _Fields fields = findByThriftId(fieldId);
-      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-      return fields;
+    public NameValuePairType(NameValuePairType other) {
+        if (other.isSetName()) {
+            this.name = other.name;
+        }
+        if (other.isSetValue()) {
+            this.value = other.value;
+        }
+        if (other.isSetDescription()) {
+            this.description = other.description;
+        }
     }
 
-    /**
-     * Find the _Fields constant that matches name, or null if its not found.
-     */
-    public static _Fields findByName(String name) {
-      return byName.get(name);
+    public NameValuePairType deepCopy() {
+        return new NameValuePairType(this);
     }
 
-    private final short _thriftId;
-    private final String _fieldName;
+    @Override
+    public void clear() {
+        this.name = null;
+        this.value = null;
+        this.description = null;
+    }
 
-    _Fields(short thriftId, String fieldName) {
-      _thriftId = thriftId;
-      _fieldName = fieldName;
-    }
-
-    public short getThriftFieldId() {
-      return _thriftId;
-    }
-
-    public String getFieldName() {
-      return _fieldName;
-    }
-  }
-
-  // isset id assignments
-  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);
-    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", 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(NameValuePairType.class, metaDataMap);
-  }
-
-  public NameValuePairType() {
-  }
-
-  public NameValuePairType(
-    String name,
-    String value,
-    String description)
-  {
-    this();
-    this.name = name;
-    this.value = value;
-    this.description = description;
-  }
-
-  /**
-   * Performs a deep copy on <i>other</i>.
-   */
-  public NameValuePairType(NameValuePairType other) {
-    if (other.isSetName()) {
-      this.name = other.name;
-    }
-    if (other.isSetValue()) {
-      this.value = other.value;
-    }
-    if (other.isSetDescription()) {
-      this.description = other.description;
-    }
-  }
-
-  public NameValuePairType deepCopy() {
-    return new NameValuePairType(this);
-  }
-
-  @Override
-  public void clear() {
-    this.name = null;
-    this.value = null;
-    this.description = null;
-  }
-
-  public String getName() {
-    return this.name;
-  }
-
-  public NameValuePairType setName(String name) {
-    this.name = name;
-    return this;
-  }
-
-  public void unsetName() {
-    this.name = null;
-  }
-
-  /** Returns true if field name is set (has been assigned a value) and false otherwise */
-  public boolean isSetName() {
-    return this.name != null;
-  }
-
-  public void setNameIsSet(boolean value) {
-    if (!value) {
-      this.name = null;
-    }
-  }
-
-  public String getValue() {
-    return this.value;
-  }
-
-  public NameValuePairType setValue(String value) {
-    this.value = value;
-    return this;
-  }
-
-  public void unsetValue() {
-    this.value = null;
-  }
-
-  /** Returns true if field value is set (has been assigned a value) and false otherwise */
-  public boolean isSetValue() {
-    return this.value != null;
-  }
-
-  public void setValueIsSet(boolean value) {
-    if (!value) {
-      this.value = null;
-    }
-  }
-
-  public String getDescription() {
-    return this.description;
-  }
-
-  public NameValuePairType setDescription(String description) {
-    this.description = description;
-    return this;
-  }
-
-  public void unsetDescription() {
-    this.description = null;
-  }
-
-  /** Returns true if field description is set (has been assigned a value) and false otherwise */
-  public boolean isSetDescription() {
-    return this.description != null;
-  }
-
-  public void setDescriptionIsSet(boolean value) {
-    if (!value) {
-      this.description = null;
-    }
-  }
-
-  public void setFieldValue(_Fields field, Object value) {
-    switch (field) {
-    case NAME:
-      if (value == null) {
-        unsetName();
-      } else {
-        setName((String)value);
-      }
-      break;
-
-    case VALUE:
-      if (value == null) {
-        unsetValue();
-      } else {
-        setValue((String)value);
-      }
-      break;
-
-    case DESCRIPTION:
-      if (value == null) {
-        unsetDescription();
-      } else {
-        setDescription((String)value);
-      }
-      break;
-
-    }
-  }
-
-  public Object getFieldValue(_Fields field) {
-    switch (field) {
-    case NAME:
-      return getName();
-
-    case VALUE:
-      return getValue();
-
-    case DESCRIPTION:
-      return getDescription();
-
-    }
-    throw new 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();
-    }
-
-    switch (field) {
-    case NAME:
-      return isSetName();
-    case VALUE:
-      return isSetValue();
-    case DESCRIPTION:
-      return isSetDescription();
-    }
-    throw new IllegalStateException();
-  }
-
-  @Override
-  public boolean equals(Object that) {
-    if (that == null)
-      return false;
-    if (that instanceof NameValuePairType)
-      return this.equals((NameValuePairType)that);
-    return false;
-  }
-
-  public boolean equals(NameValuePairType that) {
-    if (that == null)
-      return false;
-
-    boolean this_present_name = true && this.isSetName();
-    boolean that_present_name = true && that.isSetName();
-    if (this_present_name || that_present_name) {
-      if (!(this_present_name && that_present_name))
-        return false;
-      if (!this.name.equals(that.name))
-        return false;
+    public String getName() {
+        return this.name;
     }
 
-    boolean this_present_value = true && this.isSetValue();
-    boolean that_present_value = true && that.isSetValue();
-    if (this_present_value || that_present_value) {
-      if (!(this_present_value && that_present_value))
-        return false;
-      if (!this.value.equals(that.value))
-        return false;
+    public NameValuePairType setName(String name) {
+        this.name = name;
+        return this;
     }
 
-    boolean this_present_description = true && this.isSetDescription();
-    boolean that_present_description = true && that.isSetDescription();
-    if (this_present_description || that_present_description) {
-      if (!(this_present_description && that_present_description))
-        return false;
-      if (!this.description.equals(that.description))
+    public void unsetName() {
+        this.name = null;
+    }
+
+    /** Returns true if field name is set (has been assigned a value) and false otherwise */
+    public boolean isSetName() {
+        return this.name != null;
+    }
+
+    public void setNameIsSet(boolean value) {
+        if (!value) {
+            this.name = null;
+        }
+    }
+
+    public String getValue() {
+        return this.value;
+    }
+
+    public NameValuePairType setValue(String value) {
+        this.value = value;
+        return this;
+    }
+
+    public void unsetValue() {
+        this.value = null;
+    }
+
+    /** Returns true if field value is set (has been assigned a value) and false otherwise */
+    public boolean isSetValue() {
+        return this.value != null;
+    }
+
+    public void setValueIsSet(boolean value) {
+        if (!value) {
+            this.value = null;
+        }
+    }
+
+    public String getDescription() {
+        return this.description;
+    }
+
+    public NameValuePairType setDescription(String description) {
+        this.description = description;
+        return this;
+    }
+
+    public void unsetDescription() {
+        this.description = null;
+    }
+
+    /** Returns true if field description is set (has been assigned a value) and false otherwise */
+    public boolean isSetDescription() {
+        return this.description != null;
+    }
+
+    public void setDescriptionIsSet(boolean value) {
+        if (!value) {
+            this.description = null;
+        }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+        switch (field) {
+            case NAME:
+                if (value == null) {
+                    unsetName();
+                } else {
+                    setName((String)value);
+                }
+                break;
+
+            case VALUE:
+                if (value == null) {
+                    unsetValue();
+                } else {
+                    setValue((String)value);
+                }
+                break;
+
+            case DESCRIPTION:
+                if (value == null) {
+                    unsetDescription();
+                } else {
+                    setDescription((String)value);
+                }
+                break;
+
+        }
+    }
+
+    public Object getFieldValue(_Fields field) {
+        switch (field) {
+            case NAME:
+                return getName();
+
+            case VALUE:
+                return getValue();
+
+            case DESCRIPTION:
+                return getDescription();
+
+        }
+        throw new 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();
+        }
+
+        switch (field) {
+            case NAME:
+                return isSetName();
+            case VALUE:
+                return isSetValue();
+            case DESCRIPTION:
+                return isSetDescription();
+        }
+        throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (that == null)
+            return false;
+        if (that instanceof NameValuePairType)
+            return this.equals((NameValuePairType)that);
         return false;
     }
 
-    return true;
-  }
+    public boolean equals(NameValuePairType that) {
+        if (that == null)
+            return false;
+
+        boolean this_present_name = true && this.isSetName();
+        boolean that_present_name = true && that.isSetName();
+        if (this_present_name || that_present_name) {
+            if (!(this_present_name && that_present_name))
+                return false;
+            if (!this.name.equals(that.name))
+                return false;
+        }
+
+        boolean this_present_value = true && this.isSetValue();
+        boolean that_present_value = true && that.isSetValue();
+        if (this_present_value || that_present_value) {
+            if (!(this_present_value && that_present_value))
+                return false;
+            if (!this.value.equals(that.value))
+                return false;
+        }
+
+        boolean this_present_description = true && this.isSetDescription();
+        boolean that_present_description = true && that.isSetDescription();
+        if (this_present_description || that_present_description) {
+            if (!(this_present_description && that_present_description))
+                return false;
+            if (!this.description.equals(that.description))
+                return false;
+        }
 
-  @Override
-  public int hashCode() {
-    return 0;
-  }
-
-  @Override
-  public int compareTo(NameValuePairType other) {
-    if (!getClass().equals(other.getClass())) {
-      return getClass().getName().compareTo(other.getClass().getName());
-    }
-
-    int lastComparison = 0;
-
-    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetValue()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetDescription()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
-    return 0;
-  }
-
-  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);
-  }
-
-  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder("NameValuePairType(");
-    boolean first = true;
-
-    sb.append("name:");
-    if (this.name == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.name);
-    }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("value:");
-    if (this.value == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.value);
-    }
-    first = false;
-    if (!first) sb.append(", ");
-    sb.append("description:");
-    if (this.description == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.description);
-    }
-    first = false;
-    sb.append(")");
-    return sb.toString();
-  }
-
-  public void validate() throws org.apache.thrift.TException {
-    // check for required fields
-    // check for sub-struct validity
-  }
-
-  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-    try {
-      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-    try {
-      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-    } catch (org.apache.thrift.TException te) {
-      throw new java.io.IOException(te);
-    }
-  }
-
-  private static class NameValuePairTypeStandardSchemeFactory implements SchemeFactory {
-    public NameValuePairTypeStandardScheme getScheme() {
-      return new NameValuePairTypeStandardScheme();
-    }
-  }
-
-  private static class NameValuePairTypeStandardScheme extends StandardScheme<NameValuePairType> {
-
-    public void read(org.apache.thrift.protocol.TProtocol iprot, NameValuePairType struct) throws org.apache.thrift.TException {
-      org.apache.thrift.protocol.TField schemeField;
-      iprot.readStructBegin();
-      while (true)
-      {
-        schemeField = iprot.readFieldBegin();
-        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
-          break;
-        }
-        switch (schemeField.id) {
-          case 1: // NAME
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.name = iprot.readString();
-              struct.setNameIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 2: // VALUE
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.value = iprot.readString();
-              struct.setValueIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 3: // DESCRIPTION
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.description = iprot.readString();
-              struct.setDescriptionIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          default:
-            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-        }
-        iprot.readFieldEnd();
-      }
-      iprot.readStructEnd();
-
-      // check for required fields of primitive type, which can't be checked in the validate method
-      struct.validate();
-    }
-
-    public void write(org.apache.thrift.protocol.TProtocol oprot, NameValuePairType struct) throws org.apache.thrift.TException {
-      struct.validate();
-
-      oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.name != null) {
-        oprot.writeFieldBegin(NAME_FIELD_DESC);
-        oprot.writeString(struct.name);
-        oprot.writeFieldEnd();
-      }
-      if (struct.value != null) {
-        oprot.writeFieldBegin(VALUE_FIELD_DESC);
-        oprot.writeString(struct.value);
-        oprot.writeFieldEnd();
-      }
-      if (struct.description != null) {
-        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
-        oprot.writeString(struct.description);
-        oprot.writeFieldEnd();
-      }
-      oprot.writeFieldStop();
-      oprot.writeStructEnd();
-    }
-
-  }
-
-  private static class NameValuePairTypeTupleSchemeFactory implements SchemeFactory {
-    public NameValuePairTypeTupleScheme getScheme() {
-      return new NameValuePairTypeTupleScheme();
+        return true;
     }
-  }
 
-  private static class NameValuePairTypeTupleScheme extends TupleScheme<NameValuePairType> {
+    @Override
+    public int hashCode() {
+        return 0;
+    }
 
     @Override
-    public void write(org.apache.thrift.protocol.TProtocol prot, NameValuePairType struct) throws org.apache.thrift.TException {
-      TTupleProtocol oprot = (TTupleProtocol) prot;
-      BitSet optionals = new BitSet();
-      if (struct.isSetName()) {
-        optionals.set(0);
-      }
-      if (struct.isSetValue()) {
-        optionals.set(1);
-      }
-      if (struct.isSetDescription()) {
-        optionals.set(2);
-      }
-      oprot.writeBitSet(optionals, 3);
-      if (struct.isSetName()) {
-        oprot.writeString(struct.name);
-      }
-      if (struct.isSetValue()) {
-        oprot.writeString(struct.value);
-      }
-      if (struct.isSetDescription()) {
-        oprot.writeString(struct.description);
-      }
+    public int compareTo(NameValuePairType other) {
+        if (!getClass().equals(other.getClass())) {
+            return getClass().getName().compareTo(other.getClass().getName());
+        }
+
+        int lastComparison = 0;
+
+        lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetName()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetValue()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+        if (lastComparison != 0) {
+            return lastComparison;
+        }
+        if (isSetDescription()) {
+            lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description);
+            if (lastComparison != 0) {
+                return lastComparison;
+            }
+        }
+        return 0;
+    }
+
+    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);
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+        schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
     }
 
     @Override
-    public void read(org.apache.thrift.protocol.TProtocol prot, NameValuePairType struct) throws org.apache.thrift.TException {
-      TTupleProtocol iprot = (TTupleProtocol) prot;
-      BitSet incoming = iprot.readBitSet(3);
-      if (incoming.get(0)) {
-        struct.name = iprot.readString();
-        struct.setNameIsSet(true);
-      }
-      if (incoming.get(1)) {
-        struct.value = iprot.readString();
-        struct.setValueIsSet(true);
-      }
-      if (incoming.get(2)) {
-        struct.description = iprot.readString();
-        struct.setDescriptionIsSet(true);
-      }
+    public String toString() {
+        StringBuilder sb = new StringBuilder("NameValuePairType(");
+        boolean first = true;
+
+        if (isSetName()) {
+            sb.append("name:");
+            if (this.name == null) {
+                sb.append("null");
+            } else {
+                sb.append(this.name);
+            }
+            first = false;
+        }
+        if (isSetValue()) {
+            if (!first) sb.append(", ");
+            sb.append("value:");
+            if (this.value == null) {
+                sb.append("null");
+            } else {
+                sb.append(this.value);
+            }
+            first = false;
+        }
+        if (isSetDescription()) {
+            if (!first) sb.append(", ");
+            sb.append("description:");
+            if (this.description == null) {
+                sb.append("null");
+            } else {
+                sb.append(this.description);
+            }
+            first = false;
+        }
+        sb.append(")");
+        return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+        // check for required fields
+        // check for sub-struct validity
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+        try {
+            write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+        } catch (org.apache.thrift.TException te) {
+            throw new java.io.IOException(te);
+        }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+        try {
+            read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+        } catch (org.apache.thrift.TException te) {
+            throw new java.io.IOException(te);
+        }
+    }
+
+    private static class NameValuePairTypeStandardSchemeFactory implements SchemeFactory {
+        public NameValuePairTypeStandardScheme getScheme() {
+            return new NameValuePairTypeStandardScheme();
+        }
+    }
+
+    private static class NameValuePairTypeStandardScheme extends StandardScheme<NameValuePairType> {
+
+        public void read(org.apache.thrift.protocol.TProtocol iprot, NameValuePairType struct) throws org.apache.thrift.TException {
+            org.apache.thrift.protocol.TField schemeField;
+            iprot.readStructBegin();
+            while (true)
+            {
+                schemeField = iprot.readFieldBegin();
+                if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+                    break;
+                }
+                switch (schemeField.id) {
+                    case 1: // NAME
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.name = iprot.readString();
+                            struct.setNameIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    case 2: // VALUE
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.value = iprot.readString();
+                            struct.setValueIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    case 3: // DESCRIPTION
+                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+                            struct.description = iprot.readString();
+                            struct.setDescriptionIsSet(true);
+                        } else {
+                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                        }
+                        break;
+                    default:
+                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+                }
+                iprot.readFieldEnd();
+            }
+            iprot.readStructEnd();
+
+            // check for required fields of primitive type, which can't be checked in the validate method
+            struct.validate();
+        }
+
+        public void write(org.apache.thrift.protocol.TProtocol oprot, NameValuePairType struct) throws org.apache.thrift.TException {
+            struct.validate();
+
+            oprot.writeStructBegin(STRUCT_DESC);
+            if (struct.name != null) {
+                if (struct.isSetName()) {
+                    oprot.writeFieldBegin(NAME_FIELD_DESC);
+                    oprot.writeString(struct.name);
+                    oprot.writeFieldEnd();
+                }
+            }
+            if (struct.value != null) {
+                if (struct.isSetValue()) {
+                    oprot.writeFieldBegin(VALUE_FIELD_DESC);
+                    oprot.writeString(struct.value);
+                    oprot.writeFieldEnd();
+                }
+            }
+            if (struct.description != null) {
+                if (struct.isSetDescription()) {
+                    oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+                    oprot.writeString(struct.description);
+                    oprot.writeFieldEnd();
+                }
+            }
+            oprot.writeFieldStop();
+            oprot.writeStructEnd();
+        }
+
+    }
+
+    private static class NameValuePairTypeTupleSchemeFactory implements SchemeFactory {
+        public NameValuePairTypeTupleScheme getScheme() {
+            return new NameValuePairTypeTupleScheme();
+        }
+    }
+
+    private static class NameValuePairTypeTupleScheme extends TupleScheme<NameValuePairType> {
+
+        @Override
+        public void write(org.apache.thrift.protocol.TProtocol prot, NameValuePairType struct) throws org.apache.thrift.TException {
+            TTupleProtocol oprot = (TTupleProtocol) prot;
+            BitSet optionals = new BitSet();
+            if (struct.isSetName()) {
+                optionals.set(0);
+            }
+            if (struct.isSetValue()) {
+                optionals.set(1);
+            }
+            if (struct.isSetDescription()) {
+                optionals.set(2);
+            }
+            oprot.writeBitSet(optionals, 3);
+            if (struct.isSetName()) {
+                oprot.writeString(struct.name);
+            }
+            if (struct.isSetValue()) {
+                oprot.writeString(struct.value);
+            }
+            if (struct.isSetDescription()) {
+                oprot.writeString(struct.description);
+            }
+        }
+
+        @Override
+        public void read(org.apache.thrift.protocol.TProtocol prot, NameValuePairType struct) throws org.apache.thrift.TException {
+            TTupleProtocol iprot = (TTupleProtocol) prot;
+            BitSet incoming = iprot.readBitSet(3);
+            if (incoming.get(0)) {
+                struct.name = iprot.readString();
+                struct.setNameIsSet(true);
+            }
+            if (incoming.get(1)) {
+                struct.value = iprot.readString();
+                struct.setValueIsSet(true);
+            }
+            if (incoming.get(2)) {
+                struct.description = iprot.readString();
+                struct.setDescriptionIsSet(true);
+            }
+        }
     }
-  }
 
 }
 



Mime
View raw message