You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2013/11/13 19:14:51 UTC

svn commit: r1541646 [1/6] - in /airavata/trunk: ./ modules/thrift/ modules/thrift/interpreter-service-client/ modules/thrift/interpreter-service-client/src/ modules/thrift/interpreter-service-client/src/main/ modules/thrift/interpreter-service-client/...

Author: chathuri
Date: Wed Nov 13 18:14:50 2013
New Revision: 1541646

URL: http://svn.apache.org/r1541646
Log:
initial thrift commit

Added:
    airavata/trunk/modules/thrift/
    airavata/trunk/modules/thrift/interpreter-service/
    airavata/trunk/modules/thrift/interpreter-service-client/
    airavata/trunk/modules/thrift/interpreter-service-client/pom.xml
    airavata/trunk/modules/thrift/interpreter-service-client/src/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/
    airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java
    airavata/trunk/modules/thrift/interpreter-service/pom.xml
    airavata/trunk/modules/thrift/interpreter-service/src/
    airavata/trunk/modules/thrift/interpreter-service/src/main/
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/ExperimentAdvanceOptions.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HPCSettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/HostSchedulingSettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/InterpreterService.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/MyProxyRepositorySettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NameValuePairType.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/NodeSettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/OutputDataSettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SSHAuthenticationSettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/SecuritySettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowOutputDataSettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/WorkflowSchedulingSettings.java
    airavata/trunk/modules/thrift/interpreter-service/src/main/resources/
    airavata/trunk/modules/thrift/interpreter-service/src/main/resources/interpreter.thrift
    airavata/trunk/modules/thrift/pom.xml
Modified:
    airavata/trunk/pom.xml

Added: airavata/trunk/modules/thrift/interpreter-service-client/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service-client/pom.xml?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service-client/pom.xml (added)
+++ airavata/trunk/modules/thrift/interpreter-service-client/pom.xml Wed Nov 13 18:14:50 2013
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>thrift</artifactId>
+        <version>0.11-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>airavata-interpreter-service-client</artifactId>
+    <packaging>jar</packaging>
+    <name>Airavata Interpreter Service Client</name>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>0.9.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-interpreter-service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-common-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.7.5</version>
+        </dependency>
+    </dependencies>
+</project>

Added: airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service-client/src/main/java/org/apache/airavata/interpreter/service/client/ExecutionClient.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+package org.apache.airavata.interpreter.service.client;
+
+import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.experiment.execution.InterpreterService;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.apache.airavata.common.utils.ClientSettings;
+
+public class ExecutionClient {
+    public static final String THRIFT_SERVER_PORT = "thrift.server.port";
+
+    public InterpreterService.Client getInterpreterServiceClient (){
+        try {
+            String thriftPort = ClientSettings.getSetting(THRIFT_SERVER_PORT);
+            TTransport transport = new TSocket("localhost", Integer.parseInt(thriftPort));
+            transport.open();
+            TProtocol protocol = new TBinaryProtocol(transport);
+            return new InterpreterService.Client(protocol);
+        } catch (TTransportException e) {
+            e.printStackTrace();
+        } catch (ApplicationSettingsException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+}

Added: airavata/trunk/modules/thrift/interpreter-service/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/pom.xml?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/pom.xml (added)
+++ airavata/trunk/modules/thrift/interpreter-service/pom.xml Wed Nov 13 18:14:50 2013
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>thrift</artifactId>
+        <version>0.11-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>airavata-interpreter-service</artifactId>
+    <packaging>jar</packaging>
+    <name>Airavata Interpreter Service</name>
+    <url>http://airavata.apache.org/</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>0.9.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.7.5</version>
+        </dependency>
+
+    </dependencies>
+</project>

Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/AmazonWebServicesSettings.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,888 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.experiment.execution;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AmazonWebServicesSettings implements org.apache.thrift.TBase<AmazonWebServicesSettings, AmazonWebServicesSettings._Fields>, java.io.Serializable, Cloneable, Comparable<AmazonWebServicesSettings> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AmazonWebServicesSettings");
+
+  private static final org.apache.thrift.protocol.TField ACCESS_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("accessKey", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField AMI_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("amiID", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("instanceID", org.apache.thrift.protocol.TType.STRING, (short)3);
+  private static final org.apache.thrift.protocol.TField INSTANCE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("instanceType", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField SECRET_ACCESS_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("secretAccessKey", org.apache.thrift.protocol.TType.STRING, (short)5);
+  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)6);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new AmazonWebServicesSettingsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new AmazonWebServicesSettingsTupleSchemeFactory());
+  }
+
+  public String accessKey; // required
+  public String amiID; // required
+  public String instanceID; // required
+  public String instanceType; // required
+  public String secretAccessKey; // required
+  public String username; // 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 {
+    ACCESS_KEY((short)1, "accessKey"),
+    AMI_ID((short)2, "amiID"),
+    INSTANCE_ID((short)3, "instanceID"),
+    INSTANCE_TYPE((short)4, "instanceType"),
+    SECRET_ACCESS_KEY((short)5, "secretAccessKey"),
+    USERNAME((short)6, "username");
+
+    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: // ACCESS_KEY
+          return ACCESS_KEY;
+        case 2: // AMI_ID
+          return AMI_ID;
+        case 3: // INSTANCE_ID
+          return INSTANCE_ID;
+        case 4: // INSTANCE_TYPE
+          return INSTANCE_TYPE;
+        case 5: // SECRET_ACCESS_KEY
+          return SECRET_ACCESS_KEY;
+        case 6: // USERNAME
+          return USERNAME;
+        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
+  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.ACCESS_KEY, new org.apache.thrift.meta_data.FieldMetaData("accessKey", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.AMI_ID, new org.apache.thrift.meta_data.FieldMetaData("amiID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("instanceID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.INSTANCE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("instanceType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.SECRET_ACCESS_KEY, new org.apache.thrift.meta_data.FieldMetaData("secretAccessKey", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.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(AmazonWebServicesSettings.class, metaDataMap);
+  }
+
+  public AmazonWebServicesSettings() {
+  }
+
+  public AmazonWebServicesSettings(
+    String accessKey,
+    String amiID,
+    String instanceID,
+    String instanceType,
+    String secretAccessKey,
+    String username)
+  {
+    this();
+    this.accessKey = accessKey;
+    this.amiID = amiID;
+    this.instanceID = instanceID;
+    this.instanceType = instanceType;
+    this.secretAccessKey = secretAccessKey;
+    this.username = username;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public AmazonWebServicesSettings(AmazonWebServicesSettings other) {
+    if (other.isSetAccessKey()) {
+      this.accessKey = other.accessKey;
+    }
+    if (other.isSetAmiID()) {
+      this.amiID = other.amiID;
+    }
+    if (other.isSetInstanceID()) {
+      this.instanceID = other.instanceID;
+    }
+    if (other.isSetInstanceType()) {
+      this.instanceType = other.instanceType;
+    }
+    if (other.isSetSecretAccessKey()) {
+      this.secretAccessKey = other.secretAccessKey;
+    }
+    if (other.isSetUsername()) {
+      this.username = other.username;
+    }
+  }
+
+  public AmazonWebServicesSettings deepCopy() {
+    return new AmazonWebServicesSettings(this);
+  }
+
+  @Override
+  public void clear() {
+    this.accessKey = null;
+    this.amiID = null;
+    this.instanceID = null;
+    this.instanceType = null;
+    this.secretAccessKey = null;
+    this.username = null;
+  }
+
+  public String getAccessKey() {
+    return this.accessKey;
+  }
+
+  public AmazonWebServicesSettings setAccessKey(String accessKey) {
+    this.accessKey = accessKey;
+    return this;
+  }
+
+  public void unsetAccessKey() {
+    this.accessKey = null;
+  }
+
+  /** Returns true if field accessKey is set (has been assigned a value) and false otherwise */
+  public boolean isSetAccessKey() {
+    return this.accessKey != null;
+  }
+
+  public void setAccessKeyIsSet(boolean value) {
+    if (!value) {
+      this.accessKey = null;
+    }
+  }
+
+  public String getAmiID() {
+    return this.amiID;
+  }
+
+  public AmazonWebServicesSettings setAmiID(String amiID) {
+    this.amiID = amiID;
+    return this;
+  }
+
+  public void unsetAmiID() {
+    this.amiID = null;
+  }
+
+  /** Returns true if field amiID is set (has been assigned a value) and false otherwise */
+  public boolean isSetAmiID() {
+    return this.amiID != null;
+  }
+
+  public void setAmiIDIsSet(boolean value) {
+    if (!value) {
+      this.amiID = null;
+    }
+  }
+
+  public String getInstanceID() {
+    return this.instanceID;
+  }
+
+  public AmazonWebServicesSettings setInstanceID(String instanceID) {
+    this.instanceID = instanceID;
+    return this;
+  }
+
+  public void unsetInstanceID() {
+    this.instanceID = null;
+  }
+
+  /** Returns true if field instanceID is set (has been assigned a value) and false otherwise */
+  public boolean isSetInstanceID() {
+    return this.instanceID != null;
+  }
+
+  public void setInstanceIDIsSet(boolean value) {
+    if (!value) {
+      this.instanceID = null;
+    }
+  }
+
+  public String getInstanceType() {
+    return this.instanceType;
+  }
+
+  public AmazonWebServicesSettings setInstanceType(String instanceType) {
+    this.instanceType = instanceType;
+    return this;
+  }
+
+  public void unsetInstanceType() {
+    this.instanceType = null;
+  }
+
+  /** Returns true if field instanceType is set (has been assigned a value) and false otherwise */
+  public boolean isSetInstanceType() {
+    return this.instanceType != null;
+  }
+
+  public void setInstanceTypeIsSet(boolean value) {
+    if (!value) {
+      this.instanceType = null;
+    }
+  }
+
+  public String getSecretAccessKey() {
+    return this.secretAccessKey;
+  }
+
+  public AmazonWebServicesSettings setSecretAccessKey(String secretAccessKey) {
+    this.secretAccessKey = secretAccessKey;
+    return this;
+  }
+
+  public void unsetSecretAccessKey() {
+    this.secretAccessKey = null;
+  }
+
+  /** Returns true if field secretAccessKey is set (has been assigned a value) and false otherwise */
+  public boolean isSetSecretAccessKey() {
+    return this.secretAccessKey != null;
+  }
+
+  public void setSecretAccessKeyIsSet(boolean value) {
+    if (!value) {
+      this.secretAccessKey = null;
+    }
+  }
+
+  public String getUsername() {
+    return this.username;
+  }
+
+  public AmazonWebServicesSettings 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 void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case ACCESS_KEY:
+      if (value == null) {
+        unsetAccessKey();
+      } else {
+        setAccessKey((String)value);
+      }
+      break;
+
+    case AMI_ID:
+      if (value == null) {
+        unsetAmiID();
+      } else {
+        setAmiID((String)value);
+      }
+      break;
+
+    case INSTANCE_ID:
+      if (value == null) {
+        unsetInstanceID();
+      } else {
+        setInstanceID((String)value);
+      }
+      break;
+
+    case INSTANCE_TYPE:
+      if (value == null) {
+        unsetInstanceType();
+      } else {
+        setInstanceType((String)value);
+      }
+      break;
+
+    case SECRET_ACCESS_KEY:
+      if (value == null) {
+        unsetSecretAccessKey();
+      } else {
+        setSecretAccessKey((String)value);
+      }
+      break;
+
+    case USERNAME:
+      if (value == null) {
+        unsetUsername();
+      } else {
+        setUsername((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case ACCESS_KEY:
+      return getAccessKey();
+
+    case AMI_ID:
+      return getAmiID();
+
+    case INSTANCE_ID:
+      return getInstanceID();
+
+    case INSTANCE_TYPE:
+      return getInstanceType();
+
+    case SECRET_ACCESS_KEY:
+      return getSecretAccessKey();
+
+    case USERNAME:
+      return getUsername();
+
+    }
+    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 ACCESS_KEY:
+      return isSetAccessKey();
+    case AMI_ID:
+      return isSetAmiID();
+    case INSTANCE_ID:
+      return isSetInstanceID();
+    case INSTANCE_TYPE:
+      return isSetInstanceType();
+    case SECRET_ACCESS_KEY:
+      return isSetSecretAccessKey();
+    case USERNAME:
+      return isSetUsername();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof AmazonWebServicesSettings)
+      return this.equals((AmazonWebServicesSettings)that);
+    return false;
+  }
+
+  public boolean equals(AmazonWebServicesSettings that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_accessKey = true && this.isSetAccessKey();
+    boolean that_present_accessKey = true && that.isSetAccessKey();
+    if (this_present_accessKey || that_present_accessKey) {
+      if (!(this_present_accessKey && that_present_accessKey))
+        return false;
+      if (!this.accessKey.equals(that.accessKey))
+        return false;
+    }
+
+    boolean this_present_amiID = true && this.isSetAmiID();
+    boolean that_present_amiID = true && that.isSetAmiID();
+    if (this_present_amiID || that_present_amiID) {
+      if (!(this_present_amiID && that_present_amiID))
+        return false;
+      if (!this.amiID.equals(that.amiID))
+        return false;
+    }
+
+    boolean this_present_instanceID = true && this.isSetInstanceID();
+    boolean that_present_instanceID = true && that.isSetInstanceID();
+    if (this_present_instanceID || that_present_instanceID) {
+      if (!(this_present_instanceID && that_present_instanceID))
+        return false;
+      if (!this.instanceID.equals(that.instanceID))
+        return false;
+    }
+
+    boolean this_present_instanceType = true && this.isSetInstanceType();
+    boolean that_present_instanceType = true && that.isSetInstanceType();
+    if (this_present_instanceType || that_present_instanceType) {
+      if (!(this_present_instanceType && that_present_instanceType))
+        return false;
+      if (!this.instanceType.equals(that.instanceType))
+        return false;
+    }
+
+    boolean this_present_secretAccessKey = true && this.isSetSecretAccessKey();
+    boolean that_present_secretAccessKey = true && that.isSetSecretAccessKey();
+    if (this_present_secretAccessKey || that_present_secretAccessKey) {
+      if (!(this_present_secretAccessKey && that_present_secretAccessKey))
+        return false;
+      if (!this.secretAccessKey.equals(that.secretAccessKey))
+        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;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  @Override
+  public int compareTo(AmazonWebServicesSettings other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetAccessKey()).compareTo(other.isSetAccessKey());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAccessKey()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accessKey, other.accessKey);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetAmiID()).compareTo(other.isSetAmiID());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetAmiID()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amiID, other.amiID);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetInstanceID()).compareTo(other.isSetInstanceID());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetInstanceID()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instanceID, other.instanceID);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetInstanceType()).compareTo(other.isSetInstanceType());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetInstanceType()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instanceType, other.instanceType);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSecretAccessKey()).compareTo(other.isSetSecretAccessKey());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSecretAccessKey()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secretAccessKey, other.secretAccessKey);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    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;
+      }
+    }
+    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("AmazonWebServicesSettings(");
+    boolean first = true;
+
+    sb.append("accessKey:");
+    if (this.accessKey == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.accessKey);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("amiID:");
+    if (this.amiID == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.amiID);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("instanceID:");
+    if (this.instanceID == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.instanceID);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("instanceType:");
+    if (this.instanceType == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.instanceType);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("secretAccessKey:");
+    if (this.secretAccessKey == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.secretAccessKey);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("username:");
+    if (this.username == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.username);
+    }
+    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 AmazonWebServicesSettingsStandardSchemeFactory implements SchemeFactory {
+    public AmazonWebServicesSettingsStandardScheme getScheme() {
+      return new AmazonWebServicesSettingsStandardScheme();
+    }
+  }
+
+  private static class AmazonWebServicesSettingsStandardScheme extends StandardScheme<AmazonWebServicesSettings> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, AmazonWebServicesSettings 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: // ACCESS_KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.accessKey = iprot.readString();
+              struct.setAccessKeyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // AMI_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.amiID = iprot.readString();
+              struct.setAmiIDIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // INSTANCE_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.instanceID = iprot.readString();
+              struct.setInstanceIDIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // INSTANCE_TYPE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.instanceType = iprot.readString();
+              struct.setInstanceTypeIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // SECRET_ACCESS_KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.secretAccessKey = iprot.readString();
+              struct.setSecretAccessKeyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // USERNAME
+            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;
+          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, AmazonWebServicesSettings struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.accessKey != null) {
+        oprot.writeFieldBegin(ACCESS_KEY_FIELD_DESC);
+        oprot.writeString(struct.accessKey);
+        oprot.writeFieldEnd();
+      }
+      if (struct.amiID != null) {
+        oprot.writeFieldBegin(AMI_ID_FIELD_DESC);
+        oprot.writeString(struct.amiID);
+        oprot.writeFieldEnd();
+      }
+      if (struct.instanceID != null) {
+        oprot.writeFieldBegin(INSTANCE_ID_FIELD_DESC);
+        oprot.writeString(struct.instanceID);
+        oprot.writeFieldEnd();
+      }
+      if (struct.instanceType != null) {
+        oprot.writeFieldBegin(INSTANCE_TYPE_FIELD_DESC);
+        oprot.writeString(struct.instanceType);
+        oprot.writeFieldEnd();
+      }
+      if (struct.secretAccessKey != null) {
+        oprot.writeFieldBegin(SECRET_ACCESS_KEY_FIELD_DESC);
+        oprot.writeString(struct.secretAccessKey);
+        oprot.writeFieldEnd();
+      }
+      if (struct.username != null) {
+        oprot.writeFieldBegin(USERNAME_FIELD_DESC);
+        oprot.writeString(struct.username);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class AmazonWebServicesSettingsTupleSchemeFactory implements SchemeFactory {
+    public AmazonWebServicesSettingsTupleScheme getScheme() {
+      return new AmazonWebServicesSettingsTupleScheme();
+    }
+  }
+
+  private static class AmazonWebServicesSettingsTupleScheme extends TupleScheme<AmazonWebServicesSettings> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, AmazonWebServicesSettings struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetAccessKey()) {
+        optionals.set(0);
+      }
+      if (struct.isSetAmiID()) {
+        optionals.set(1);
+      }
+      if (struct.isSetInstanceID()) {
+        optionals.set(2);
+      }
+      if (struct.isSetInstanceType()) {
+        optionals.set(3);
+      }
+      if (struct.isSetSecretAccessKey()) {
+        optionals.set(4);
+      }
+      if (struct.isSetUsername()) {
+        optionals.set(5);
+      }
+      oprot.writeBitSet(optionals, 6);
+      if (struct.isSetAccessKey()) {
+        oprot.writeString(struct.accessKey);
+      }
+      if (struct.isSetAmiID()) {
+        oprot.writeString(struct.amiID);
+      }
+      if (struct.isSetInstanceID()) {
+        oprot.writeString(struct.instanceID);
+      }
+      if (struct.isSetInstanceType()) {
+        oprot.writeString(struct.instanceType);
+      }
+      if (struct.isSetSecretAccessKey()) {
+        oprot.writeString(struct.secretAccessKey);
+      }
+      if (struct.isSetUsername()) {
+        oprot.writeString(struct.username);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, AmazonWebServicesSettings struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(6);
+      if (incoming.get(0)) {
+        struct.accessKey = iprot.readString();
+        struct.setAccessKeyIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.amiID = iprot.readString();
+        struct.setAmiIDIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.instanceID = iprot.readString();
+        struct.setInstanceIDIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.instanceType = iprot.readString();
+        struct.setInstanceTypeIsSet(true);
+      }
+      if (incoming.get(4)) {
+        struct.secretAccessKey = iprot.readString();
+        struct.setSecretAccessKeyIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.username = iprot.readString();
+        struct.setUsernameIsSet(true);
+      }
+    }
+  }
+
+}
+

Added: airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java?rev=1541646&view=auto
==============================================================================
--- airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java (added)
+++ airavata/trunk/modules/thrift/interpreter-service/src/main/java/org/apache/airavata/experiment/execution/CredentialStoreSecuritySettings.java Wed Nov 13 18:14:50 2013
@@ -0,0 +1,588 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.experiment.execution;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class CredentialStoreSecuritySettings implements org.apache.thrift.TBase<CredentialStoreSecuritySettings, CredentialStoreSecuritySettings._Fields>, java.io.Serializable, Cloneable, Comparable<CredentialStoreSecuritySettings> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CredentialStoreSecuritySettings");
+
+  private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField PORTAL_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("portalUser", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayID", 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 CredentialStoreSecuritySettingsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new CredentialStoreSecuritySettingsTupleSchemeFactory());
+  }
+
+  public String tokenId; // required
+  public String portalUser; // required
+  public String gatewayID; // 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 {
+    TOKEN_ID((short)1, "tokenId"),
+    PORTAL_USER((short)2, "portalUser"),
+    GATEWAY_ID((short)3, "gatewayID");
+
+    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: // TOKEN_ID
+          return TOKEN_ID;
+        case 2: // PORTAL_USER
+          return PORTAL_USER;
+        case 3: // GATEWAY_ID
+          return GATEWAY_ID;
+        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
+  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.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.PORTAL_USER, new org.apache.thrift.meta_data.FieldMetaData("portalUser", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayID", 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(CredentialStoreSecuritySettings.class, metaDataMap);
+  }
+
+  public CredentialStoreSecuritySettings() {
+  }
+
+  public CredentialStoreSecuritySettings(
+    String tokenId,
+    String portalUser,
+    String gatewayID)
+  {
+    this();
+    this.tokenId = tokenId;
+    this.portalUser = portalUser;
+    this.gatewayID = gatewayID;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public CredentialStoreSecuritySettings(CredentialStoreSecuritySettings other) {
+    if (other.isSetTokenId()) {
+      this.tokenId = other.tokenId;
+    }
+    if (other.isSetPortalUser()) {
+      this.portalUser = other.portalUser;
+    }
+    if (other.isSetGatewayID()) {
+      this.gatewayID = other.gatewayID;
+    }
+  }
+
+  public CredentialStoreSecuritySettings deepCopy() {
+    return new CredentialStoreSecuritySettings(this);
+  }
+
+  @Override
+  public void clear() {
+    this.tokenId = null;
+    this.portalUser = null;
+    this.gatewayID = null;
+  }
+
+  public String getTokenId() {
+    return this.tokenId;
+  }
+
+  public CredentialStoreSecuritySettings setTokenId(String tokenId) {
+    this.tokenId = tokenId;
+    return this;
+  }
+
+  public void unsetTokenId() {
+    this.tokenId = null;
+  }
+
+  /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */
+  public boolean isSetTokenId() {
+    return this.tokenId != null;
+  }
+
+  public void setTokenIdIsSet(boolean value) {
+    if (!value) {
+      this.tokenId = null;
+    }
+  }
+
+  public String getPortalUser() {
+    return this.portalUser;
+  }
+
+  public CredentialStoreSecuritySettings setPortalUser(String portalUser) {
+    this.portalUser = portalUser;
+    return this;
+  }
+
+  public void unsetPortalUser() {
+    this.portalUser = null;
+  }
+
+  /** Returns true if field portalUser is set (has been assigned a value) and false otherwise */
+  public boolean isSetPortalUser() {
+    return this.portalUser != null;
+  }
+
+  public void setPortalUserIsSet(boolean value) {
+    if (!value) {
+      this.portalUser = null;
+    }
+  }
+
+  public String getGatewayID() {
+    return this.gatewayID;
+  }
+
+  public CredentialStoreSecuritySettings setGatewayID(String gatewayID) {
+    this.gatewayID = gatewayID;
+    return this;
+  }
+
+  public void unsetGatewayID() {
+    this.gatewayID = null;
+  }
+
+  /** Returns true if field gatewayID is set (has been assigned a value) and false otherwise */
+  public boolean isSetGatewayID() {
+    return this.gatewayID != null;
+  }
+
+  public void setGatewayIDIsSet(boolean value) {
+    if (!value) {
+      this.gatewayID = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case TOKEN_ID:
+      if (value == null) {
+        unsetTokenId();
+      } else {
+        setTokenId((String)value);
+      }
+      break;
+
+    case PORTAL_USER:
+      if (value == null) {
+        unsetPortalUser();
+      } else {
+        setPortalUser((String)value);
+      }
+      break;
+
+    case GATEWAY_ID:
+      if (value == null) {
+        unsetGatewayID();
+      } else {
+        setGatewayID((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case TOKEN_ID:
+      return getTokenId();
+
+    case PORTAL_USER:
+      return getPortalUser();
+
+    case GATEWAY_ID:
+      return getGatewayID();
+
+    }
+    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 TOKEN_ID:
+      return isSetTokenId();
+    case PORTAL_USER:
+      return isSetPortalUser();
+    case GATEWAY_ID:
+      return isSetGatewayID();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof CredentialStoreSecuritySettings)
+      return this.equals((CredentialStoreSecuritySettings)that);
+    return false;
+  }
+
+  public boolean equals(CredentialStoreSecuritySettings that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_tokenId = true && this.isSetTokenId();
+    boolean that_present_tokenId = true && that.isSetTokenId();
+    if (this_present_tokenId || that_present_tokenId) {
+      if (!(this_present_tokenId && that_present_tokenId))
+        return false;
+      if (!this.tokenId.equals(that.tokenId))
+        return false;
+    }
+
+    boolean this_present_portalUser = true && this.isSetPortalUser();
+    boolean that_present_portalUser = true && that.isSetPortalUser();
+    if (this_present_portalUser || that_present_portalUser) {
+      if (!(this_present_portalUser && that_present_portalUser))
+        return false;
+      if (!this.portalUser.equals(that.portalUser))
+        return false;
+    }
+
+    boolean this_present_gatewayID = true && this.isSetGatewayID();
+    boolean that_present_gatewayID = true && that.isSetGatewayID();
+    if (this_present_gatewayID || that_present_gatewayID) {
+      if (!(this_present_gatewayID && that_present_gatewayID))
+        return false;
+      if (!this.gatewayID.equals(that.gatewayID))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  @Override
+  public int compareTo(CredentialStoreSecuritySettings other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetTokenId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetPortalUser()).compareTo(other.isSetPortalUser());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetPortalUser()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.portalUser, other.portalUser);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetGatewayID()).compareTo(other.isSetGatewayID());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGatewayID()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayID, other.gatewayID);
+      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("CredentialStoreSecuritySettings(");
+    boolean first = true;
+
+    sb.append("tokenId:");
+    if (this.tokenId == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.tokenId);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("portalUser:");
+    if (this.portalUser == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.portalUser);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("gatewayID:");
+    if (this.gatewayID == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.gatewayID);
+    }
+    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 CredentialStoreSecuritySettingsStandardSchemeFactory implements SchemeFactory {
+    public CredentialStoreSecuritySettingsStandardScheme getScheme() {
+      return new CredentialStoreSecuritySettingsStandardScheme();
+    }
+  }
+
+  private static class CredentialStoreSecuritySettingsStandardScheme extends StandardScheme<CredentialStoreSecuritySettings> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, CredentialStoreSecuritySettings 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: // TOKEN_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.tokenId = iprot.readString();
+              struct.setTokenIdIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // PORTAL_USER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.portalUser = iprot.readString();
+              struct.setPortalUserIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // GATEWAY_ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.gatewayID = iprot.readString();
+              struct.setGatewayIDIsSet(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, CredentialStoreSecuritySettings struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.tokenId != null) {
+        oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC);
+        oprot.writeString(struct.tokenId);
+        oprot.writeFieldEnd();
+      }
+      if (struct.portalUser != null) {
+        oprot.writeFieldBegin(PORTAL_USER_FIELD_DESC);
+        oprot.writeString(struct.portalUser);
+        oprot.writeFieldEnd();
+      }
+      if (struct.gatewayID != null) {
+        oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
+        oprot.writeString(struct.gatewayID);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class CredentialStoreSecuritySettingsTupleSchemeFactory implements SchemeFactory {
+    public CredentialStoreSecuritySettingsTupleScheme getScheme() {
+      return new CredentialStoreSecuritySettingsTupleScheme();
+    }
+  }
+
+  private static class CredentialStoreSecuritySettingsTupleScheme extends TupleScheme<CredentialStoreSecuritySettings> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, CredentialStoreSecuritySettings struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetTokenId()) {
+        optionals.set(0);
+      }
+      if (struct.isSetPortalUser()) {
+        optionals.set(1);
+      }
+      if (struct.isSetGatewayID()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetTokenId()) {
+        oprot.writeString(struct.tokenId);
+      }
+      if (struct.isSetPortalUser()) {
+        oprot.writeString(struct.portalUser);
+      }
+      if (struct.isSetGatewayID()) {
+        oprot.writeString(struct.gatewayID);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, CredentialStoreSecuritySettings struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        struct.tokenId = iprot.readString();
+        struct.setTokenIdIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.portalUser = iprot.readString();
+        struct.setPortalUserIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.gatewayID = iprot.readString();
+        struct.setGatewayIDIsSet(true);
+      }
+    }
+  }
+
+}
+