/** * * 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. */ /* * 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.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.credential.store.cpi; 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 javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") public class CredentialStoreService { public interface Iface { /** * Query CS server to fetch the CPI version */ public String getCSServiceVersion() throws org.apache.thrift.TException; /** * This method is to add SSHCredential which will return the token Id in success * * * @param sshCredential */ public String addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public String addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public String addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public org.apache.airavata.model.credential.store.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public org.apache.airavata.model.credential.store.CredentialSummary getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public org.apache.airavata.model.credential.store.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public org.apache.airavata.model.credential.store.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public Map<String,String> getAllSSHKeysForUser(String username) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public Map<String,String> getAllSSHKeysForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public Map<String,String> getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public boolean deleteSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; public boolean deletePWDCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; } public interface AsyncIface { public void getCSServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getCertificateCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getPasswordCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllSSHKeysForUser(String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllSSHKeysForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void getAllPWDCredentialsForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deleteSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void deletePWDCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { public Factory() {} public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } } public Client(org.apache.thrift.protocol.TProtocol prot) { super(prot, prot); } public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { super(iprot, oprot); } public String getCSServiceVersion() throws org.apache.thrift.TException { send_getCSServiceVersion(); return recv_getCSServiceVersion(); } public void send_getCSServiceVersion() throws org.apache.thrift.TException { getCSServiceVersion_args args = new getCSServiceVersion_args(); sendBase("getCSServiceVersion", args); } public String recv_getCSServiceVersion() throws org.apache.thrift.TException { getCSServiceVersion_result result = new getCSServiceVersion_result(); receiveBase(result, "getCSServiceVersion"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCSServiceVersion failed: unknown result"); } public String addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_addSSHCredential(sshCredential); return recv_addSSHCredential(); } public void send_addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) throws org.apache.thrift.TException { addSSHCredential_args args = new addSSHCredential_args(); args.setSshCredential(sshCredential); sendBase("addSSHCredential", args); } public String recv_addSSHCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { addSSHCredential_result result = new addSSHCredential_result(); receiveBase(result, "addSSHCredential"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSSHCredential failed: unknown result"); } public String addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_addCertificateCredential(certificateCredential); return recv_addCertificateCredential(); } public void send_addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) throws org.apache.thrift.TException { addCertificateCredential_args args = new addCertificateCredential_args(); args.setCertificateCredential(certificateCredential); sendBase("addCertificateCredential", args); } public String recv_addCertificateCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { addCertificateCredential_result result = new addCertificateCredential_result(); receiveBase(result, "addCertificateCredential"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addCertificateCredential failed: unknown result"); } public String addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_addPasswordCredential(passwordCredential); return recv_addPasswordCredential(); } public void send_addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) throws org.apache.thrift.TException { addPasswordCredential_args args = new addPasswordCredential_args(); args.setPasswordCredential(passwordCredential); sendBase("addPasswordCredential", args); } public String recv_addPasswordCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { addPasswordCredential_result result = new addPasswordCredential_result(); receiveBase(result, "addPasswordCredential"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addPasswordCredential failed: unknown result"); } public org.apache.airavata.model.credential.store.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getSSHCredential(tokenId, gatewayId); return recv_getSSHCredential(); } public void send_getSSHCredential(String tokenId, String gatewayId) throws org.apache.thrift.TException { getSSHCredential_args args = new getSSHCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); sendBase("getSSHCredential", args); } public org.apache.airavata.model.credential.store.SSHCredential recv_getSSHCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getSSHCredential_result result = new getSSHCredential_result(); receiveBase(result, "getSSHCredential"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHCredential failed: unknown result"); } public org.apache.airavata.model.credential.store.CredentialSummary getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getCredentialSummary(type, tokenId, gatewayId); return recv_getCredentialSummary(); } public void send_getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId) throws org.apache.thrift.TException { getCredentialSummary_args args = new getCredentialSummary_args(); args.setType(type); args.setTokenId(tokenId); args.setGatewayId(gatewayId); sendBase("getCredentialSummary", args); } public org.apache.airavata.model.credential.store.CredentialSummary recv_getCredentialSummary() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getCredentialSummary_result result = new getCredentialSummary_result(); receiveBase(result, "getCredentialSummary"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCredentialSummary failed: unknown result"); } public org.apache.airavata.model.credential.store.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getCertificateCredential(tokenId, gatewayId); return recv_getCertificateCredential(); } public void send_getCertificateCredential(String tokenId, String gatewayId) throws org.apache.thrift.TException { getCertificateCredential_args args = new getCertificateCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); sendBase("getCertificateCredential", args); } public org.apache.airavata.model.credential.store.CertificateCredential recv_getCertificateCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getCertificateCredential_result result = new getCertificateCredential_result(); receiveBase(result, "getCertificateCredential"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCertificateCredential failed: unknown result"); } public org.apache.airavata.model.credential.store.PasswordCredential getPasswordCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getPasswordCredential(tokenId, gatewayId); return recv_getPasswordCredential(); } public void send_getPasswordCredential(String tokenId, String gatewayId) throws org.apache.thrift.TException { getPasswordCredential_args args = new getPasswordCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); sendBase("getPasswordCredential", args); } public org.apache.airavata.model.credential.store.PasswordCredential recv_getPasswordCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getPasswordCredential_result result = new getPasswordCredential_result(); receiveBase(result, "getPasswordCredential"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPasswordCredential failed: unknown result"); } public Map<String,String> getAllSSHKeysForUser(String username) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getAllSSHKeysForUser(username); return recv_getAllSSHKeysForUser(); } public void send_getAllSSHKeysForUser(String username) throws org.apache.thrift.TException { getAllSSHKeysForUser_args args = new getAllSSHKeysForUser_args(); args.setUsername(username); sendBase("getAllSSHKeysForUser", args); } public Map<String,String> recv_getAllSSHKeysForUser() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getAllSSHKeysForUser_result result = new getAllSSHKeysForUser_result(); receiveBase(result, "getAllSSHKeysForUser"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSSHKeysForUser failed: unknown result"); } public Map<String,String> getAllSSHKeysForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getAllSSHKeysForGateway(gatewayId); return recv_getAllSSHKeysForGateway(); } public void send_getAllSSHKeysForGateway(String gatewayId) throws org.apache.thrift.TException { getAllSSHKeysForGateway_args args = new getAllSSHKeysForGateway_args(); args.setGatewayId(gatewayId); sendBase("getAllSSHKeysForGateway", args); } public Map<String,String> recv_getAllSSHKeysForGateway() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getAllSSHKeysForGateway_result result = new getAllSSHKeysForGateway_result(); receiveBase(result, "getAllSSHKeysForGateway"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllSSHKeysForGateway failed: unknown result"); } public List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getAllCredentialSummaryForGateway(type, gatewayId); return recv_getAllCredentialSummaryForGateway(); } public void send_getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) throws org.apache.thrift.TException { getAllCredentialSummaryForGateway_args args = new getAllCredentialSummaryForGateway_args(); args.setType(type); args.setGatewayId(gatewayId); sendBase("getAllCredentialSummaryForGateway", args); } public List<org.apache.airavata.model.credential.store.CredentialSummary> recv_getAllCredentialSummaryForGateway() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); receiveBase(result, "getAllCredentialSummaryForGateway"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllCredentialSummaryForGateway failed: unknown result"); } public List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getAllCredentialSummaryForUserInGateway(type, gatewayId, userId); return recv_getAllCredentialSummaryForUserInGateway(); } public void send_getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) throws org.apache.thrift.TException { getAllCredentialSummaryForUserInGateway_args args = new getAllCredentialSummaryForUserInGateway_args(); args.setType(type); args.setGatewayId(gatewayId); args.setUserId(userId); sendBase("getAllCredentialSummaryForUserInGateway", args); } public List<org.apache.airavata.model.credential.store.CredentialSummary> recv_getAllCredentialSummaryForUserInGateway() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getAllCredentialSummaryForUserInGateway_result result = new getAllCredentialSummaryForUserInGateway_result(); receiveBase(result, "getAllCredentialSummaryForUserInGateway"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllCredentialSummaryForUserInGateway failed: unknown result"); } public Map<String,String> getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_getAllPWDCredentialsForGateway(gatewayId); return recv_getAllPWDCredentialsForGateway(); } public void send_getAllPWDCredentialsForGateway(String gatewayId) throws org.apache.thrift.TException { getAllPWDCredentialsForGateway_args args = new getAllPWDCredentialsForGateway_args(); args.setGatewayId(gatewayId); sendBase("getAllPWDCredentialsForGateway", args); } public Map<String,String> recv_getAllPWDCredentialsForGateway() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { getAllPWDCredentialsForGateway_result result = new getAllPWDCredentialsForGateway_result(); receiveBase(result, "getAllPWDCredentialsForGateway"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllPWDCredentialsForGateway failed: unknown result"); } public boolean deleteSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_deleteSSHCredential(tokenId, gatewayId); return recv_deleteSSHCredential(); } public void send_deleteSSHCredential(String tokenId, String gatewayId) throws org.apache.thrift.TException { deleteSSHCredential_args args = new deleteSSHCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); sendBase("deleteSSHCredential", args); } public boolean recv_deleteSSHCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { deleteSSHCredential_result result = new deleteSSHCredential_result(); receiveBase(result, "deleteSSHCredential"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteSSHCredential failed: unknown result"); } public boolean deletePWDCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { send_deletePWDCredential(tokenId, gatewayId); return recv_deletePWDCredential(); } public void send_deletePWDCredential(String tokenId, String gatewayId) throws org.apache.thrift.TException { deletePWDCredential_args args = new deletePWDCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); sendBase("deletePWDCredential", args); } public boolean recv_deletePWDCredential() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { deletePWDCredential_result result = new deletePWDCredential_result(); receiveBase(result, "deletePWDCredential"); if (result.isSetSuccess()) { return result.success; } if (result.csException != null) { throw result.csException; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deletePWDCredential failed: unknown result"); } } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { private org.apache.thrift.async.TAsyncClientManager clientManager; private org.apache.thrift.protocol.TProtocolFactory protocolFactory; public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { this.clientManager = clientManager; this.protocolFactory = protocolFactory; } public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } } public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { super(protocolFactory, clientManager, transport); } public void getCSServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getCSServiceVersion_call method_call = new getCSServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getCSServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall { public getCSServiceVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCSServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); getCSServiceVersion_args args = new getCSServiceVersion_args(); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getCSServiceVersion(); } } public void addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); addSSHCredential_call method_call = new addSSHCredential_call(sshCredential, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addSSHCredential_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.credential.store.SSHCredential sshCredential; public addSSHCredential_call(org.apache.airavata.model.credential.store.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.sshCredential = sshCredential; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSSHCredential", org.apache.thrift.protocol.TMessageType.CALL, 0)); addSSHCredential_args args = new addSSHCredential_args(); args.setSshCredential(sshCredential); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_addSSHCredential(); } } public void addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); addCertificateCredential_call method_call = new addCertificateCredential_call(certificateCredential, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addCertificateCredential_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.credential.store.CertificateCredential certificateCredential; public addCertificateCredential_call(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.certificateCredential = certificateCredential; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addCertificateCredential", org.apache.thrift.protocol.TMessageType.CALL, 0)); addCertificateCredential_args args = new addCertificateCredential_args(); args.setCertificateCredential(certificateCredential); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_addCertificateCredential(); } } public void addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); addPasswordCredential_call method_call = new addPasswordCredential_call(passwordCredential, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addPasswordCredential_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.credential.store.PasswordCredential passwordCredential; public addPasswordCredential_call(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.passwordCredential = passwordCredential; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addPasswordCredential", org.apache.thrift.protocol.TMessageType.CALL, 0)); addPasswordCredential_args args = new addPasswordCredential_args(); args.setPasswordCredential(passwordCredential); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_addPasswordCredential(); } } public void getSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getSSHCredential_call method_call = new getSSHCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSSHCredential_call extends org.apache.thrift.async.TAsyncMethodCall { private String tokenId; private String gatewayId; public getSSHCredential_call(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tokenId = tokenId; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHCredential", org.apache.thrift.protocol.TMessageType.CALL, 0)); getSSHCredential_args args = new getSSHCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public org.apache.airavata.model.credential.store.SSHCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getSSHCredential(); } } public void getCredentialSummary(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getCredentialSummary_call method_call = new getCredentialSummary_call(type, tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getCredentialSummary_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.credential.store.SummaryType type; private String tokenId; private String gatewayId; public getCredentialSummary_call(org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.type = type; this.tokenId = tokenId; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0)); getCredentialSummary_args args = new getCredentialSummary_args(); args.setType(type); args.setTokenId(tokenId); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public org.apache.airavata.model.credential.store.CredentialSummary getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getCredentialSummary(); } } public void getCertificateCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getCertificateCredential_call method_call = new getCertificateCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getCertificateCredential_call extends org.apache.thrift.async.TAsyncMethodCall { private String tokenId; private String gatewayId; public getCertificateCredential_call(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tokenId = tokenId; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCertificateCredential", org.apache.thrift.protocol.TMessageType.CALL, 0)); getCertificateCredential_args args = new getCertificateCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public org.apache.airavata.model.credential.store.CertificateCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getCertificateCredential(); } } public void getPasswordCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getPasswordCredential_call method_call = new getPasswordCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getPasswordCredential_call extends org.apache.thrift.async.TAsyncMethodCall { private String tokenId; private String gatewayId; public getPasswordCredential_call(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tokenId = tokenId; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPasswordCredential", org.apache.thrift.protocol.TMessageType.CALL, 0)); getPasswordCredential_args args = new getPasswordCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public org.apache.airavata.model.credential.store.PasswordCredential getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getPasswordCredential(); } } public void getAllSSHKeysForUser(String username, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getAllSSHKeysForUser_call method_call = new getAllSSHKeysForUser_call(username, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getAllSSHKeysForUser_call extends org.apache.thrift.async.TAsyncMethodCall { private String username; public getAllSSHKeysForUser_call(String username, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.username = username; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllSSHKeysForUser", org.apache.thrift.protocol.TMessageType.CALL, 0)); getAllSSHKeysForUser_args args = new getAllSSHKeysForUser_args(); args.setUsername(username); args.write(prot); prot.writeMessageEnd(); } public Map<String,String> getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getAllSSHKeysForUser(); } } public void getAllSSHKeysForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getAllSSHKeysForGateway_call method_call = new getAllSSHKeysForGateway_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getAllSSHKeysForGateway_call extends org.apache.thrift.async.TAsyncMethodCall { private String gatewayId; public getAllSSHKeysForGateway_call(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllSSHKeysForGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); getAllSSHKeysForGateway_args args = new getAllSSHKeysForGateway_args(); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public Map<String,String> getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getAllSSHKeysForGateway(); } } public void getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getAllCredentialSummaryForGateway_call method_call = new getAllCredentialSummaryForGateway_call(type, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getAllCredentialSummaryForGateway_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.credential.store.SummaryType type; private String gatewayId; public getAllCredentialSummaryForGateway_call(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.type = type; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllCredentialSummaryForGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); getAllCredentialSummaryForGateway_args args = new getAllCredentialSummaryForGateway_args(); args.setType(type); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public List<org.apache.airavata.model.credential.store.CredentialSummary> getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getAllCredentialSummaryForGateway(); } } public void getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getAllCredentialSummaryForUserInGateway_call method_call = new getAllCredentialSummaryForUserInGateway_call(type, gatewayId, userId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getAllCredentialSummaryForUserInGateway_call extends org.apache.thrift.async.TAsyncMethodCall { private org.apache.airavata.model.credential.store.SummaryType type; private String gatewayId; private String userId; public getAllCredentialSummaryForUserInGateway_call(org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.type = type; this.gatewayId = gatewayId; this.userId = userId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllCredentialSummaryForUserInGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); getAllCredentialSummaryForUserInGateway_args args = new getAllCredentialSummaryForUserInGateway_args(); args.setType(type); args.setGatewayId(gatewayId); args.setUserId(userId); args.write(prot); prot.writeMessageEnd(); } public List<org.apache.airavata.model.credential.store.CredentialSummary> getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getAllCredentialSummaryForUserInGateway(); } } public void getAllPWDCredentialsForGateway(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getAllPWDCredentialsForGateway_call method_call = new getAllPWDCredentialsForGateway_call(gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getAllPWDCredentialsForGateway_call extends org.apache.thrift.async.TAsyncMethodCall { private String gatewayId; public getAllPWDCredentialsForGateway_call(String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllPWDCredentialsForGateway", org.apache.thrift.protocol.TMessageType.CALL, 0)); getAllPWDCredentialsForGateway_args args = new getAllPWDCredentialsForGateway_args(); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public Map<String,String> getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getAllPWDCredentialsForGateway(); } } public void deleteSSHCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); deleteSSHCredential_call method_call = new deleteSSHCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteSSHCredential_call extends org.apache.thrift.async.TAsyncMethodCall { private String tokenId; private String gatewayId; public deleteSSHCredential_call(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tokenId = tokenId; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteSSHCredential", org.apache.thrift.protocol.TMessageType.CALL, 0)); deleteSSHCredential_args args = new deleteSSHCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_deleteSSHCredential(); } } public void deletePWDCredential(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); deletePWDCredential_call method_call = new deletePWDCredential_call(tokenId, gatewayId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deletePWDCredential_call extends org.apache.thrift.async.TAsyncMethodCall { private String tokenId; private String gatewayId; public deletePWDCredential_call(String tokenId, String gatewayId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tokenId = tokenId; this.gatewayId = gatewayId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deletePWDCredential", org.apache.thrift.protocol.TMessageType.CALL, 0)); deletePWDCredential_args args = new deletePWDCredential_args(); args.setTokenId(tokenId); args.setGatewayId(gatewayId); args.write(prot); prot.writeMessageEnd(); } public boolean getResult() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_deletePWDCredential(); } } } public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); } protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { processMap.put("getCSServiceVersion", new getCSServiceVersion()); processMap.put("addSSHCredential", new addSSHCredential()); processMap.put("addCertificateCredential", new addCertificateCredential()); processMap.put("addPasswordCredential", new addPasswordCredential()); processMap.put("getSSHCredential", new getSSHCredential()); processMap.put("getCredentialSummary", new getCredentialSummary()); processMap.put("getCertificateCredential", new getCertificateCredential()); processMap.put("getPasswordCredential", new getPasswordCredential()); processMap.put("getAllSSHKeysForUser", new getAllSSHKeysForUser()); processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway()); processMap.put("getAllCredentialSummaryForGateway", new getAllCredentialSummaryForGateway()); processMap.put("getAllCredentialSummaryForUserInGateway", new getAllCredentialSummaryForUserInGateway()); processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway()); processMap.put("deleteSSHCredential", new deleteSSHCredential()); processMap.put("deletePWDCredential", new deletePWDCredential()); return processMap; } public static class getCSServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCSServiceVersion_args> { public getCSServiceVersion() { super("getCSServiceVersion"); } public getCSServiceVersion_args getEmptyArgsInstance() { return new getCSServiceVersion_args(); } protected boolean isOneway() { return false; } public getCSServiceVersion_result getResult(I iface, getCSServiceVersion_args args) throws org.apache.thrift.TException { getCSServiceVersion_result result = new getCSServiceVersion_result(); result.success = iface.getCSServiceVersion(); return result; } } public static class addSSHCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addSSHCredential_args> { public addSSHCredential() { super("addSSHCredential"); } public addSSHCredential_args getEmptyArgsInstance() { return new addSSHCredential_args(); } protected boolean isOneway() { return false; } public addSSHCredential_result getResult(I iface, addSSHCredential_args args) throws org.apache.thrift.TException { addSSHCredential_result result = new addSSHCredential_result(); try { result.success = iface.addSSHCredential(args.sshCredential); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class addCertificateCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addCertificateCredential_args> { public addCertificateCredential() { super("addCertificateCredential"); } public addCertificateCredential_args getEmptyArgsInstance() { return new addCertificateCredential_args(); } protected boolean isOneway() { return false; } public addCertificateCredential_result getResult(I iface, addCertificateCredential_args args) throws org.apache.thrift.TException { addCertificateCredential_result result = new addCertificateCredential_result(); try { result.success = iface.addCertificateCredential(args.certificateCredential); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class addPasswordCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addPasswordCredential_args> { public addPasswordCredential() { super("addPasswordCredential"); } public addPasswordCredential_args getEmptyArgsInstance() { return new addPasswordCredential_args(); } protected boolean isOneway() { return false; } public addPasswordCredential_result getResult(I iface, addPasswordCredential_args args) throws org.apache.thrift.TException { addPasswordCredential_result result = new addPasswordCredential_result(); try { result.success = iface.addPasswordCredential(args.passwordCredential); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getSSHCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHCredential_args> { public getSSHCredential() { super("getSSHCredential"); } public getSSHCredential_args getEmptyArgsInstance() { return new getSSHCredential_args(); } protected boolean isOneway() { return false; } public getSSHCredential_result getResult(I iface, getSSHCredential_args args) throws org.apache.thrift.TException { getSSHCredential_result result = new getSSHCredential_result(); try { result.success = iface.getSSHCredential(args.tokenId, args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getCredentialSummary<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCredentialSummary_args> { public getCredentialSummary() { super("getCredentialSummary"); } public getCredentialSummary_args getEmptyArgsInstance() { return new getCredentialSummary_args(); } protected boolean isOneway() { return false; } public getCredentialSummary_result getResult(I iface, getCredentialSummary_args args) throws org.apache.thrift.TException { getCredentialSummary_result result = new getCredentialSummary_result(); try { result.success = iface.getCredentialSummary(args.type, args.tokenId, args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getCertificateCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCertificateCredential_args> { public getCertificateCredential() { super("getCertificateCredential"); } public getCertificateCredential_args getEmptyArgsInstance() { return new getCertificateCredential_args(); } protected boolean isOneway() { return false; } public getCertificateCredential_result getResult(I iface, getCertificateCredential_args args) throws org.apache.thrift.TException { getCertificateCredential_result result = new getCertificateCredential_result(); try { result.success = iface.getCertificateCredential(args.tokenId, args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getPasswordCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPasswordCredential_args> { public getPasswordCredential() { super("getPasswordCredential"); } public getPasswordCredential_args getEmptyArgsInstance() { return new getPasswordCredential_args(); } protected boolean isOneway() { return false; } public getPasswordCredential_result getResult(I iface, getPasswordCredential_args args) throws org.apache.thrift.TException { getPasswordCredential_result result = new getPasswordCredential_result(); try { result.success = iface.getPasswordCredential(args.tokenId, args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getAllSSHKeysForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllSSHKeysForUser_args> { public getAllSSHKeysForUser() { super("getAllSSHKeysForUser"); } public getAllSSHKeysForUser_args getEmptyArgsInstance() { return new getAllSSHKeysForUser_args(); } protected boolean isOneway() { return false; } public getAllSSHKeysForUser_result getResult(I iface, getAllSSHKeysForUser_args args) throws org.apache.thrift.TException { getAllSSHKeysForUser_result result = new getAllSSHKeysForUser_result(); try { result.success = iface.getAllSSHKeysForUser(args.username); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getAllSSHKeysForGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllSSHKeysForGateway_args> { public getAllSSHKeysForGateway() { super("getAllSSHKeysForGateway"); } public getAllSSHKeysForGateway_args getEmptyArgsInstance() { return new getAllSSHKeysForGateway_args(); } protected boolean isOneway() { return false; } public getAllSSHKeysForGateway_result getResult(I iface, getAllSSHKeysForGateway_args args) throws org.apache.thrift.TException { getAllSSHKeysForGateway_result result = new getAllSSHKeysForGateway_result(); try { result.success = iface.getAllSSHKeysForGateway(args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getAllCredentialSummaryForGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllCredentialSummaryForGateway_args> { public getAllCredentialSummaryForGateway() { super("getAllCredentialSummaryForGateway"); } public getAllCredentialSummaryForGateway_args getEmptyArgsInstance() { return new getAllCredentialSummaryForGateway_args(); } protected boolean isOneway() { return false; } public getAllCredentialSummaryForGateway_result getResult(I iface, getAllCredentialSummaryForGateway_args args) throws org.apache.thrift.TException { getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); try { result.success = iface.getAllCredentialSummaryForGateway(args.type, args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getAllCredentialSummaryForUserInGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllCredentialSummaryForUserInGateway_args> { public getAllCredentialSummaryForUserInGateway() { super("getAllCredentialSummaryForUserInGateway"); } public getAllCredentialSummaryForUserInGateway_args getEmptyArgsInstance() { return new getAllCredentialSummaryForUserInGateway_args(); } protected boolean isOneway() { return false; } public getAllCredentialSummaryForUserInGateway_result getResult(I iface, getAllCredentialSummaryForUserInGateway_args args) throws org.apache.thrift.TException { getAllCredentialSummaryForUserInGateway_result result = new getAllCredentialSummaryForUserInGateway_result(); try { result.success = iface.getAllCredentialSummaryForUserInGateway(args.type, args.gatewayId, args.userId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class getAllPWDCredentialsForGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllPWDCredentialsForGateway_args> { public getAllPWDCredentialsForGateway() { super("getAllPWDCredentialsForGateway"); } public getAllPWDCredentialsForGateway_args getEmptyArgsInstance() { return new getAllPWDCredentialsForGateway_args(); } protected boolean isOneway() { return false; } public getAllPWDCredentialsForGateway_result getResult(I iface, getAllPWDCredentialsForGateway_args args) throws org.apache.thrift.TException { getAllPWDCredentialsForGateway_result result = new getAllPWDCredentialsForGateway_result(); try { result.success = iface.getAllPWDCredentialsForGateway(args.gatewayId); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class deleteSSHCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteSSHCredential_args> { public deleteSSHCredential() { super("deleteSSHCredential"); } public deleteSSHCredential_args getEmptyArgsInstance() { return new deleteSSHCredential_args(); } protected boolean isOneway() { return false; } public deleteSSHCredential_result getResult(I iface, deleteSSHCredential_args args) throws org.apache.thrift.TException { deleteSSHCredential_result result = new deleteSSHCredential_result(); try { result.success = iface.deleteSSHCredential(args.tokenId, args.gatewayId); result.setSuccessIsSet(true); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } public static class deletePWDCredential<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deletePWDCredential_args> { public deletePWDCredential() { super("deletePWDCredential"); } public deletePWDCredential_args getEmptyArgsInstance() { return new deletePWDCredential_args(); } protected boolean isOneway() { return false; } public deletePWDCredential_result getResult(I iface, deletePWDCredential_args args) throws org.apache.thrift.TException { deletePWDCredential_result result = new deletePWDCredential_result(); try { result.success = iface.deletePWDCredential(args.tokenId, args.gatewayId); result.setSuccessIsSet(true); } catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) { result.csException = csException; } return result; } } } public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); } protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { processMap.put("getCSServiceVersion", new getCSServiceVersion()); processMap.put("addSSHCredential", new addSSHCredential()); processMap.put("addCertificateCredential", new addCertificateCredential()); processMap.put("addPasswordCredential", new addPasswordCredential()); processMap.put("getSSHCredential", new getSSHCredential()); processMap.put("getCredentialSummary", new getCredentialSummary()); processMap.put("getCertificateCredential", new getCertificateCredential()); processMap.put("getPasswordCredential", new getPasswordCredential()); processMap.put("getAllSSHKeysForUser", new getAllSSHKeysForUser()); processMap.put("getAllSSHKeysForGateway", new getAllSSHKeysForGateway()); processMap.put("getAllCredentialSummaryForGateway", new getAllCredentialSummaryForGateway()); processMap.put("getAllCredentialSummaryForUserInGateway", new getAllCredentialSummaryForUserInGateway()); processMap.put("getAllPWDCredentialsForGateway", new getAllPWDCredentialsForGateway()); processMap.put("deleteSSHCredential", new deleteSSHCredential()); processMap.put("deletePWDCredential", new deletePWDCredential()); return processMap; } public static class getCSServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCSServiceVersion_args, String> { public getCSServiceVersion() { super("getCSServiceVersion"); } public getCSServiceVersion_args getEmptyArgsInstance() { return new getCSServiceVersion_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { getCSServiceVersion_result result = new getCSServiceVersion_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getCSServiceVersion_result result = new getCSServiceVersion_result(); { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getCSServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.getCSServiceVersion(resultHandler); } } public static class addSSHCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addSSHCredential_args, String> { public addSSHCredential() { super("addSSHCredential"); } public addSSHCredential_args getEmptyArgsInstance() { return new addSSHCredential_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { addSSHCredential_result result = new addSSHCredential_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; addSSHCredential_result result = new addSSHCredential_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, addSSHCredential_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.addSSHCredential(args.sshCredential,resultHandler); } } public static class addCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addCertificateCredential_args, String> { public addCertificateCredential() { super("addCertificateCredential"); } public addCertificateCredential_args getEmptyArgsInstance() { return new addCertificateCredential_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { addCertificateCredential_result result = new addCertificateCredential_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; addCertificateCredential_result result = new addCertificateCredential_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, addCertificateCredential_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.addCertificateCredential(args.certificateCredential,resultHandler); } } public static class addPasswordCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addPasswordCredential_args, String> { public addPasswordCredential() { super("addPasswordCredential"); } public addPasswordCredential_args getEmptyArgsInstance() { return new addPasswordCredential_args(); } public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<String>() { public void onComplete(String o) { addPasswordCredential_result result = new addPasswordCredential_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; addPasswordCredential_result result = new addPasswordCredential_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, addPasswordCredential_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.addPasswordCredential(args.passwordCredential,resultHandler); } } public static class getSSHCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHCredential_args, org.apache.airavata.model.credential.store.SSHCredential> { public getSSHCredential() { super("getSSHCredential"); } public getSSHCredential_args getEmptyArgsInstance() { return new getSSHCredential_args(); } public AsyncMethodCallback<org.apache.airavata.model.credential.store.SSHCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<org.apache.airavata.model.credential.store.SSHCredential>() { public void onComplete(org.apache.airavata.model.credential.store.SSHCredential o) { getSSHCredential_result result = new getSSHCredential_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getSSHCredential_result result = new getSSHCredential_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getSSHCredential_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.SSHCredential> resultHandler) throws TException { iface.getSSHCredential(args.tokenId, args.gatewayId,resultHandler); } } public static class getCredentialSummary<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCredentialSummary_args, org.apache.airavata.model.credential.store.CredentialSummary> { public getCredentialSummary() { super("getCredentialSummary"); } public getCredentialSummary_args getEmptyArgsInstance() { return new getCredentialSummary_args(); } public AsyncMethodCallback<org.apache.airavata.model.credential.store.CredentialSummary> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<org.apache.airavata.model.credential.store.CredentialSummary>() { public void onComplete(org.apache.airavata.model.credential.store.CredentialSummary o) { getCredentialSummary_result result = new getCredentialSummary_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getCredentialSummary_result result = new getCredentialSummary_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getCredentialSummary_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CredentialSummary> resultHandler) throws TException { iface.getCredentialSummary(args.type, args.tokenId, args.gatewayId,resultHandler); } } public static class getCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCertificateCredential_args, org.apache.airavata.model.credential.store.CertificateCredential> { public getCertificateCredential() { super("getCertificateCredential"); } public getCertificateCredential_args getEmptyArgsInstance() { return new getCertificateCredential_args(); } public AsyncMethodCallback<org.apache.airavata.model.credential.store.CertificateCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<org.apache.airavata.model.credential.store.CertificateCredential>() { public void onComplete(org.apache.airavata.model.credential.store.CertificateCredential o) { getCertificateCredential_result result = new getCertificateCredential_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getCertificateCredential_result result = new getCertificateCredential_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getCertificateCredential_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CertificateCredential> resultHandler) throws TException { iface.getCertificateCredential(args.tokenId, args.gatewayId,resultHandler); } } public static class getPasswordCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPasswordCredential_args, org.apache.airavata.model.credential.store.PasswordCredential> { public getPasswordCredential() { super("getPasswordCredential"); } public getPasswordCredential_args getEmptyArgsInstance() { return new getPasswordCredential_args(); } public AsyncMethodCallback<org.apache.airavata.model.credential.store.PasswordCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<org.apache.airavata.model.credential.store.PasswordCredential>() { public void onComplete(org.apache.airavata.model.credential.store.PasswordCredential o) { getPasswordCredential_result result = new getPasswordCredential_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getPasswordCredential_result result = new getPasswordCredential_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getPasswordCredential_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.PasswordCredential> resultHandler) throws TException { iface.getPasswordCredential(args.tokenId, args.gatewayId,resultHandler); } } public static class getAllSSHKeysForUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllSSHKeysForUser_args, Map<String,String>> { public getAllSSHKeysForUser() { super("getAllSSHKeysForUser"); } public getAllSSHKeysForUser_args getEmptyArgsInstance() { return new getAllSSHKeysForUser_args(); } public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Map<String,String>>() { public void onComplete(Map<String,String> o) { getAllSSHKeysForUser_result result = new getAllSSHKeysForUser_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getAllSSHKeysForUser_result result = new getAllSSHKeysForUser_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getAllSSHKeysForUser_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { iface.getAllSSHKeysForUser(args.username,resultHandler); } } public static class getAllSSHKeysForGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllSSHKeysForGateway_args, Map<String,String>> { public getAllSSHKeysForGateway() { super("getAllSSHKeysForGateway"); } public getAllSSHKeysForGateway_args getEmptyArgsInstance() { return new getAllSSHKeysForGateway_args(); } public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Map<String,String>>() { public void onComplete(Map<String,String> o) { getAllSSHKeysForGateway_result result = new getAllSSHKeysForGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getAllSSHKeysForGateway_result result = new getAllSSHKeysForGateway_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getAllSSHKeysForGateway_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { iface.getAllSSHKeysForGateway(args.gatewayId,resultHandler); } } public static class getAllCredentialSummaryForGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllCredentialSummaryForGateway_args, List<org.apache.airavata.model.credential.store.CredentialSummary>> { public getAllCredentialSummaryForGateway() { super("getAllCredentialSummaryForGateway"); } public getAllCredentialSummaryForGateway_args getEmptyArgsInstance() { return new getAllCredentialSummaryForGateway_args(); } public AsyncMethodCallback<List<org.apache.airavata.model.credential.store.CredentialSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<org.apache.airavata.model.credential.store.CredentialSummary>>() { public void onComplete(List<org.apache.airavata.model.credential.store.CredentialSummary> o) { getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getAllCredentialSummaryForGateway_result result = new getAllCredentialSummaryForGateway_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getAllCredentialSummaryForGateway_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws TException { iface.getAllCredentialSummaryForGateway(args.type, args.gatewayId,resultHandler); } } public static class getAllCredentialSummaryForUserInGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllCredentialSummaryForUserInGateway_args, List<org.apache.airavata.model.credential.store.CredentialSummary>> { public getAllCredentialSummaryForUserInGateway() { super("getAllCredentialSummaryForUserInGateway"); } public getAllCredentialSummaryForUserInGateway_args getEmptyArgsInstance() { return new getAllCredentialSummaryForUserInGateway_args(); } public AsyncMethodCallback<List<org.apache.airavata.model.credential.store.CredentialSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<org.apache.airavata.model.credential.store.CredentialSummary>>() { public void onComplete(List<org.apache.airavata.model.credential.store.CredentialSummary> o) { getAllCredentialSummaryForUserInGateway_result result = new getAllCredentialSummaryForUserInGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getAllCredentialSummaryForUserInGateway_result result = new getAllCredentialSummaryForUserInGateway_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getAllCredentialSummaryForUserInGateway_args args, org.apache.thrift.async.AsyncMethodCallback<List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws TException { iface.getAllCredentialSummaryForUserInGateway(args.type, args.gatewayId, args.userId,resultHandler); } } public static class getAllPWDCredentialsForGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllPWDCredentialsForGateway_args, Map<String,String>> { public getAllPWDCredentialsForGateway() { super("getAllPWDCredentialsForGateway"); } public getAllPWDCredentialsForGateway_args getEmptyArgsInstance() { return new getAllPWDCredentialsForGateway_args(); } public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Map<String,String>>() { public void onComplete(Map<String,String> o) { getAllPWDCredentialsForGateway_result result = new getAllPWDCredentialsForGateway_result(); result.success = o; try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getAllPWDCredentialsForGateway_result result = new getAllPWDCredentialsForGateway_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, getAllPWDCredentialsForGateway_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { iface.getAllPWDCredentialsForGateway(args.gatewayId,resultHandler); } } public static class deleteSSHCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSSHCredential_args, Boolean> { public deleteSSHCredential() { super("deleteSSHCredential"); } public deleteSSHCredential_args getEmptyArgsInstance() { return new deleteSSHCredential_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { deleteSSHCredential_result result = new deleteSSHCredential_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; deleteSSHCredential_result result = new deleteSSHCredential_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, deleteSSHCredential_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.deleteSSHCredential(args.tokenId, args.gatewayId,resultHandler); } } public static class deletePWDCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePWDCredential_args, Boolean> { public deletePWDCredential() { super("deletePWDCredential"); } public deletePWDCredential_args getEmptyArgsInstance() { return new deletePWDCredential_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { deletePWDCredential_result result = new deletePWDCredential_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; deletePWDCredential_result result = new deletePWDCredential_result(); if (e instanceof org.apache.airavata.credential.store.exception.CredentialStoreException) { result.csException = (org.apache.airavata.credential.store.exception.CredentialStoreException) e; result.setCsExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } }; } protected boolean isOneway() { return false; } public void start(I iface, deletePWDCredential_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.deletePWDCredential(args.tokenId, args.gatewayId,resultHandler); } } } public static class getCSServiceVersion_args implements org.apache.thrift.TBase<getCSServiceVersion_args, getCSServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCSServiceVersion_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCSServiceVersion_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getCSServiceVersion_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getCSServiceVersion_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; 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) { 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; } } 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); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCSServiceVersion_args.class, metaDataMap); } public getCSServiceVersion_args() { } /** * Performs a deep copy on <i>other</i>. */ public getCSServiceVersion_args(getCSServiceVersion_args other) { } public getCSServiceVersion_args deepCopy() { return new getCSServiceVersion_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } 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) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getCSServiceVersion_args) return this.equals((getCSServiceVersion_args)that); return false; } public boolean equals(getCSServiceVersion_args that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(getCSServiceVersion_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; 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("getCSServiceVersion_args("); boolean first = true; 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 getCSServiceVersion_argsStandardSchemeFactory implements SchemeFactory { public getCSServiceVersion_argsStandardScheme getScheme() { return new getCSServiceVersion_argsStandardScheme(); } } private static class getCSServiceVersion_argsStandardScheme extends StandardScheme<getCSServiceVersion_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getCSServiceVersion_args 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) { 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, getCSServiceVersion_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getCSServiceVersion_argsTupleSchemeFactory implements SchemeFactory { public getCSServiceVersion_argsTupleScheme getScheme() { return new getCSServiceVersion_argsTupleScheme(); } } private static class getCSServiceVersion_argsTupleScheme extends TupleScheme<getCSServiceVersion_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getCSServiceVersion_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getCSServiceVersion_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class getCSServiceVersion_result implements org.apache.thrift.TBase<getCSServiceVersion_result, getCSServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCSServiceVersion_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCSServiceVersion_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getCSServiceVersion_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getCSServiceVersion_resultTupleSchemeFactory()); } public String success; // 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 { SUCCESS((short)0, "success"); 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 0: // SUCCESS return SUCCESS; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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(getCSServiceVersion_result.class, metaDataMap); } public getCSServiceVersion_result() { } public getCSServiceVersion_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public getCSServiceVersion_result(getCSServiceVersion_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public getCSServiceVersion_result deepCopy() { return new getCSServiceVersion_result(this); } @Override public void clear() { this.success = null; } public String getSuccess() { return this.success; } public getCSServiceVersion_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } 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 SUCCESS: return isSetSuccess(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getCSServiceVersion_result) return this.equals((getCSServiceVersion_result)that); return false; } public boolean equals(getCSServiceVersion_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(getCSServiceVersion_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); 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("getCSServiceVersion_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } 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 getCSServiceVersion_resultStandardSchemeFactory implements SchemeFactory { public getCSServiceVersion_resultStandardScheme getScheme() { return new getCSServiceVersion_resultStandardScheme(); } } private static class getCSServiceVersion_resultStandardScheme extends StandardScheme<getCSServiceVersion_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getCSServiceVersion_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(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, getCSServiceVersion_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getCSServiceVersion_resultTupleSchemeFactory implements SchemeFactory { public getCSServiceVersion_resultTupleScheme getScheme() { return new getCSServiceVersion_resultTupleScheme(); } } private static class getCSServiceVersion_resultTupleScheme extends TupleScheme<getCSServiceVersion_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getCSServiceVersion_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getCSServiceVersion_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } } } } public static class addSSHCredential_args implements org.apache.thrift.TBase<addSSHCredential_args, addSSHCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addSSHCredential_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSSHCredential_args"); private static final org.apache.thrift.protocol.TField SSH_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("sshCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addSSHCredential_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new addSSHCredential_argsTupleSchemeFactory()); } public org.apache.airavata.model.credential.store.SSHCredential sshCredential; // 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 { SSH_CREDENTIAL((short)1, "sshCredential"); 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: // SSH_CREDENTIAL return SSH_CREDENTIAL; 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.SSH_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("sshCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.SSHCredential.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredential_args.class, metaDataMap); } public addSSHCredential_args() { } public addSSHCredential_args( org.apache.airavata.model.credential.store.SSHCredential sshCredential) { this(); this.sshCredential = sshCredential; } /** * Performs a deep copy on <i>other</i>. */ public addSSHCredential_args(addSSHCredential_args other) { if (other.isSetSshCredential()) { this.sshCredential = new org.apache.airavata.model.credential.store.SSHCredential(other.sshCredential); } } public addSSHCredential_args deepCopy() { return new addSSHCredential_args(this); } @Override public void clear() { this.sshCredential = null; } public org.apache.airavata.model.credential.store.SSHCredential getSshCredential() { return this.sshCredential; } public addSSHCredential_args setSshCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) { this.sshCredential = sshCredential; return this; } public void unsetSshCredential() { this.sshCredential = null; } /** Returns true if field sshCredential is set (has been assigned a value) and false otherwise */ public boolean isSetSshCredential() { return this.sshCredential != null; } public void setSshCredentialIsSet(boolean value) { if (!value) { this.sshCredential = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SSH_CREDENTIAL: if (value == null) { unsetSshCredential(); } else { setSshCredential((org.apache.airavata.model.credential.store.SSHCredential)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SSH_CREDENTIAL: return getSshCredential(); } 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 SSH_CREDENTIAL: return isSetSshCredential(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addSSHCredential_args) return this.equals((addSSHCredential_args)that); return false; } public boolean equals(addSSHCredential_args that) { if (that == null) return false; boolean this_present_sshCredential = true && this.isSetSshCredential(); boolean that_present_sshCredential = true && that.isSetSshCredential(); if (this_present_sshCredential || that_present_sshCredential) { if (!(this_present_sshCredential && that_present_sshCredential)) return false; if (!this.sshCredential.equals(that.sshCredential)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_sshCredential = true && (isSetSshCredential()); list.add(present_sshCredential); if (present_sshCredential) list.add(sshCredential); return list.hashCode(); } @Override public int compareTo(addSSHCredential_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSshCredential()).compareTo(other.isSetSshCredential()); if (lastComparison != 0) { return lastComparison; } if (isSetSshCredential()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sshCredential, other.sshCredential); 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("addSSHCredential_args("); boolean first = true; sb.append("sshCredential:"); if (this.sshCredential == null) { sb.append("null"); } else { sb.append(this.sshCredential); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (sshCredential == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'sshCredential' was not present! Struct: " + toString()); } // check for sub-struct validity if (sshCredential != null) { sshCredential.validate(); } } 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 addSSHCredential_argsStandardSchemeFactory implements SchemeFactory { public addSSHCredential_argsStandardScheme getScheme() { return new addSSHCredential_argsStandardScheme(); } } private static class addSSHCredential_argsStandardScheme extends StandardScheme<addSSHCredential_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, addSSHCredential_args 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: // SSH_CREDENTIAL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.sshCredential = new org.apache.airavata.model.credential.store.SSHCredential(); struct.sshCredential.read(iprot); struct.setSshCredentialIsSet(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, addSSHCredential_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.sshCredential != null) { oprot.writeFieldBegin(SSH_CREDENTIAL_FIELD_DESC); struct.sshCredential.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addSSHCredential_argsTupleSchemeFactory implements SchemeFactory { public addSSHCredential_argsTupleScheme getScheme() { return new addSSHCredential_argsTupleScheme(); } } private static class addSSHCredential_argsTupleScheme extends TupleScheme<addSSHCredential_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.sshCredential.write(oprot); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.sshCredential = new org.apache.airavata.model.credential.store.SSHCredential(); struct.sshCredential.read(iprot); struct.setSshCredentialIsSet(true); } } } public static class addSSHCredential_result implements org.apache.thrift.TBase<addSSHCredential_result, addSSHCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addSSHCredential_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addSSHCredential_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addSSHCredential_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new addSSHCredential_resultTupleSchemeFactory()); } public String success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredential_result.class, metaDataMap); } public addSSHCredential_result() { } public addSSHCredential_result( String success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public addSSHCredential_result(addSSHCredential_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public addSSHCredential_result deepCopy() { return new addSSHCredential_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public String getSuccess() { return this.success; } public addSSHCredential_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public addSSHCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addSSHCredential_result) return this.equals((addSSHCredential_result)that); return false; } public boolean equals(addSSHCredential_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(addSSHCredential_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("addSSHCredential_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 addSSHCredential_resultStandardSchemeFactory implements SchemeFactory { public addSSHCredential_resultStandardScheme getScheme() { return new addSSHCredential_resultStandardScheme(); } } private static class addSSHCredential_resultStandardScheme extends StandardScheme<addSSHCredential_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, addSSHCredential_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, addSSHCredential_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addSSHCredential_resultTupleSchemeFactory implements SchemeFactory { public addSSHCredential_resultTupleScheme getScheme() { return new addSSHCredential_resultTupleScheme(); } } private static class addSSHCredential_resultTupleScheme extends TupleScheme<addSSHCredential_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class addCertificateCredential_args implements org.apache.thrift.TBase<addCertificateCredential_args, addCertificateCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_args"); private static final org.apache.thrift.protocol.TField CERTIFICATE_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("certificateCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addCertificateCredential_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new addCertificateCredential_argsTupleSchemeFactory()); } public org.apache.airavata.model.credential.store.CertificateCredential certificateCredential; // 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 { CERTIFICATE_CREDENTIAL((short)1, "certificateCredential"); 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: // CERTIFICATE_CREDENTIAL return CERTIFICATE_CREDENTIAL; 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.CERTIFICATE_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("certificateCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CertificateCredential.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_args.class, metaDataMap); } public addCertificateCredential_args() { } public addCertificateCredential_args( org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) { this(); this.certificateCredential = certificateCredential; } /** * Performs a deep copy on <i>other</i>. */ public addCertificateCredential_args(addCertificateCredential_args other) { if (other.isSetCertificateCredential()) { this.certificateCredential = new org.apache.airavata.model.credential.store.CertificateCredential(other.certificateCredential); } } public addCertificateCredential_args deepCopy() { return new addCertificateCredential_args(this); } @Override public void clear() { this.certificateCredential = null; } public org.apache.airavata.model.credential.store.CertificateCredential getCertificateCredential() { return this.certificateCredential; } public addCertificateCredential_args setCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) { this.certificateCredential = certificateCredential; return this; } public void unsetCertificateCredential() { this.certificateCredential = null; } /** Returns true if field certificateCredential is set (has been assigned a value) and false otherwise */ public boolean isSetCertificateCredential() { return this.certificateCredential != null; } public void setCertificateCredentialIsSet(boolean value) { if (!value) { this.certificateCredential = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case CERTIFICATE_CREDENTIAL: if (value == null) { unsetCertificateCredential(); } else { setCertificateCredential((org.apache.airavata.model.credential.store.CertificateCredential)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case CERTIFICATE_CREDENTIAL: return getCertificateCredential(); } 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 CERTIFICATE_CREDENTIAL: return isSetCertificateCredential(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addCertificateCredential_args) return this.equals((addCertificateCredential_args)that); return false; } public boolean equals(addCertificateCredential_args that) { if (that == null) return false; boolean this_present_certificateCredential = true && this.isSetCertificateCredential(); boolean that_present_certificateCredential = true && that.isSetCertificateCredential(); if (this_present_certificateCredential || that_present_certificateCredential) { if (!(this_present_certificateCredential && that_present_certificateCredential)) return false; if (!this.certificateCredential.equals(that.certificateCredential)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_certificateCredential = true && (isSetCertificateCredential()); list.add(present_certificateCredential); if (present_certificateCredential) list.add(certificateCredential); return list.hashCode(); } @Override public int compareTo(addCertificateCredential_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetCertificateCredential()).compareTo(other.isSetCertificateCredential()); if (lastComparison != 0) { return lastComparison; } if (isSetCertificateCredential()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.certificateCredential, other.certificateCredential); 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("addCertificateCredential_args("); boolean first = true; sb.append("certificateCredential:"); if (this.certificateCredential == null) { sb.append("null"); } else { sb.append(this.certificateCredential); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (certificateCredential == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'certificateCredential' was not present! Struct: " + toString()); } // check for sub-struct validity if (certificateCredential != null) { certificateCredential.validate(); } } 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 addCertificateCredential_argsStandardSchemeFactory implements SchemeFactory { public addCertificateCredential_argsStandardScheme getScheme() { return new addCertificateCredential_argsStandardScheme(); } } private static class addCertificateCredential_argsStandardScheme extends StandardScheme<addCertificateCredential_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_args 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: // CERTIFICATE_CREDENTIAL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.certificateCredential = new org.apache.airavata.model.credential.store.CertificateCredential(); struct.certificateCredential.read(iprot); struct.setCertificateCredentialIsSet(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, addCertificateCredential_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.certificateCredential != null) { oprot.writeFieldBegin(CERTIFICATE_CREDENTIAL_FIELD_DESC); struct.certificateCredential.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addCertificateCredential_argsTupleSchemeFactory implements SchemeFactory { public addCertificateCredential_argsTupleScheme getScheme() { return new addCertificateCredential_argsTupleScheme(); } } private static class addCertificateCredential_argsTupleScheme extends TupleScheme<addCertificateCredential_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.certificateCredential.write(oprot); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.certificateCredential = new org.apache.airavata.model.credential.store.CertificateCredential(); struct.certificateCredential.read(iprot); struct.setCertificateCredentialIsSet(true); } } } public static class addCertificateCredential_result implements org.apache.thrift.TBase<addCertificateCredential_result, addCertificateCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addCertificateCredential_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addCertificateCredential_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addCertificateCredential_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new addCertificateCredential_resultTupleSchemeFactory()); } public String success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_result.class, metaDataMap); } public addCertificateCredential_result() { } public addCertificateCredential_result( String success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public addCertificateCredential_result(addCertificateCredential_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public addCertificateCredential_result deepCopy() { return new addCertificateCredential_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public String getSuccess() { return this.success; } public addCertificateCredential_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public addCertificateCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addCertificateCredential_result) return this.equals((addCertificateCredential_result)that); return false; } public boolean equals(addCertificateCredential_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(addCertificateCredential_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("addCertificateCredential_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 addCertificateCredential_resultStandardSchemeFactory implements SchemeFactory { public addCertificateCredential_resultStandardScheme getScheme() { return new addCertificateCredential_resultStandardScheme(); } } private static class addCertificateCredential_resultStandardScheme extends StandardScheme<addCertificateCredential_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, addCertificateCredential_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, addCertificateCredential_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addCertificateCredential_resultTupleSchemeFactory implements SchemeFactory { public addCertificateCredential_resultTupleScheme getScheme() { return new addCertificateCredential_resultTupleScheme(); } } private static class addCertificateCredential_resultTupleScheme extends TupleScheme<addCertificateCredential_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class addPasswordCredential_args implements org.apache.thrift.TBase<addPasswordCredential_args, addPasswordCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<addPasswordCredential_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPasswordCredential_args"); private static final org.apache.thrift.protocol.TField PASSWORD_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("passwordCredential", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addPasswordCredential_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new addPasswordCredential_argsTupleSchemeFactory()); } public org.apache.airavata.model.credential.store.PasswordCredential passwordCredential; // 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 { PASSWORD_CREDENTIAL((short)1, "passwordCredential"); 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: // PASSWORD_CREDENTIAL return PASSWORD_CREDENTIAL; 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.PASSWORD_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("passwordCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.PasswordCredential.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPasswordCredential_args.class, metaDataMap); } public addPasswordCredential_args() { } public addPasswordCredential_args( org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) { this(); this.passwordCredential = passwordCredential; } /** * Performs a deep copy on <i>other</i>. */ public addPasswordCredential_args(addPasswordCredential_args other) { if (other.isSetPasswordCredential()) { this.passwordCredential = new org.apache.airavata.model.credential.store.PasswordCredential(other.passwordCredential); } } public addPasswordCredential_args deepCopy() { return new addPasswordCredential_args(this); } @Override public void clear() { this.passwordCredential = null; } public org.apache.airavata.model.credential.store.PasswordCredential getPasswordCredential() { return this.passwordCredential; } public addPasswordCredential_args setPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential) { this.passwordCredential = passwordCredential; return this; } public void unsetPasswordCredential() { this.passwordCredential = null; } /** Returns true if field passwordCredential is set (has been assigned a value) and false otherwise */ public boolean isSetPasswordCredential() { return this.passwordCredential != null; } public void setPasswordCredentialIsSet(boolean value) { if (!value) { this.passwordCredential = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PASSWORD_CREDENTIAL: if (value == null) { unsetPasswordCredential(); } else { setPasswordCredential((org.apache.airavata.model.credential.store.PasswordCredential)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PASSWORD_CREDENTIAL: return getPasswordCredential(); } 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 PASSWORD_CREDENTIAL: return isSetPasswordCredential(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addPasswordCredential_args) return this.equals((addPasswordCredential_args)that); return false; } public boolean equals(addPasswordCredential_args that) { if (that == null) return false; boolean this_present_passwordCredential = true && this.isSetPasswordCredential(); boolean that_present_passwordCredential = true && that.isSetPasswordCredential(); if (this_present_passwordCredential || that_present_passwordCredential) { if (!(this_present_passwordCredential && that_present_passwordCredential)) return false; if (!this.passwordCredential.equals(that.passwordCredential)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_passwordCredential = true && (isSetPasswordCredential()); list.add(present_passwordCredential); if (present_passwordCredential) list.add(passwordCredential); return list.hashCode(); } @Override public int compareTo(addPasswordCredential_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetPasswordCredential()).compareTo(other.isSetPasswordCredential()); if (lastComparison != 0) { return lastComparison; } if (isSetPasswordCredential()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwordCredential, other.passwordCredential); 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("addPasswordCredential_args("); boolean first = true; sb.append("passwordCredential:"); if (this.passwordCredential == null) { sb.append("null"); } else { sb.append(this.passwordCredential); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (passwordCredential == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'passwordCredential' was not present! Struct: " + toString()); } // check for sub-struct validity if (passwordCredential != null) { passwordCredential.validate(); } } 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 addPasswordCredential_argsStandardSchemeFactory implements SchemeFactory { public addPasswordCredential_argsStandardScheme getScheme() { return new addPasswordCredential_argsStandardScheme(); } } private static class addPasswordCredential_argsStandardScheme extends StandardScheme<addPasswordCredential_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, addPasswordCredential_args 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: // PASSWORD_CREDENTIAL if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.passwordCredential = new org.apache.airavata.model.credential.store.PasswordCredential(); struct.passwordCredential.read(iprot); struct.setPasswordCredentialIsSet(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, addPasswordCredential_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.passwordCredential != null) { oprot.writeFieldBegin(PASSWORD_CREDENTIAL_FIELD_DESC); struct.passwordCredential.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addPasswordCredential_argsTupleSchemeFactory implements SchemeFactory { public addPasswordCredential_argsTupleScheme getScheme() { return new addPasswordCredential_argsTupleScheme(); } } private static class addPasswordCredential_argsTupleScheme extends TupleScheme<addPasswordCredential_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; struct.passwordCredential.write(oprot); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.passwordCredential = new org.apache.airavata.model.credential.store.PasswordCredential(); struct.passwordCredential.read(iprot); struct.setPasswordCredentialIsSet(true); } } } public static class addPasswordCredential_result implements org.apache.thrift.TBase<addPasswordCredential_result, addPasswordCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<addPasswordCredential_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addPasswordCredential_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new addPasswordCredential_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new addPasswordCredential_resultTupleSchemeFactory()); } public String success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPasswordCredential_result.class, metaDataMap); } public addPasswordCredential_result() { } public addPasswordCredential_result( String success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public addPasswordCredential_result(addPasswordCredential_result other) { if (other.isSetSuccess()) { this.success = other.success; } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public addPasswordCredential_result deepCopy() { return new addPasswordCredential_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public String getSuccess() { return this.success; } public addPasswordCredential_result setSuccess(String success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public addPasswordCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((String)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof addPasswordCredential_result) return this.equals((addPasswordCredential_result)that); return false; } public boolean equals(addPasswordCredential_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(addPasswordCredential_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("addPasswordCredential_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 addPasswordCredential_resultStandardSchemeFactory implements SchemeFactory { public addPasswordCredential_resultStandardScheme getScheme() { return new addPasswordCredential_resultStandardScheme(); } } private static class addPasswordCredential_resultStandardScheme extends StandardScheme<addPasswordCredential_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, addPasswordCredential_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, addPasswordCredential_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(struct.success); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class addPasswordCredential_resultTupleSchemeFactory implements SchemeFactory { public addPasswordCredential_resultTupleScheme getScheme() { return new addPasswordCredential_resultTupleScheme(); } } private static class addPasswordCredential_resultTupleScheme extends TupleScheme<addPasswordCredential_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeString(struct.success); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readString(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getSSHCredential_args implements org.apache.thrift.TBase<getSSHCredential_args, getSSHCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSSHCredential_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSSHCredential_args"); 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 GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getSSHCredential_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getSSHCredential_argsTupleSchemeFactory()); } public String tokenId; // 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"), GATEWAY_ID((short)2, "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: // 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.REQUIRED, 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.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSSHCredential_args.class, metaDataMap); } public getSSHCredential_args() { } public getSSHCredential_args( String tokenId, String gatewayId) { this(); this.tokenId = tokenId; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getSSHCredential_args(getSSHCredential_args other) { if (other.isSetTokenId()) { this.tokenId = other.tokenId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getSSHCredential_args deepCopy() { return new getSSHCredential_args(this); } @Override public void clear() { this.tokenId = null; this.gatewayId = null; } public String getTokenId() { return this.tokenId; } public getSSHCredential_args 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 getGatewayId() { return this.gatewayId; } public getSSHCredential_args 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 GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_ID: return getTokenId(); 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 GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getSSHCredential_args) return this.equals((getSSHCredential_args)that); return false; } public boolean equals(getSSHCredential_args 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_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() { List<Object> list = new ArrayList<Object>(); boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) list.add(tokenId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getSSHCredential_args 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(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("getSSHCredential_args("); 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("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 if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getSSHCredential_argsStandardSchemeFactory implements SchemeFactory { public getSSHCredential_argsStandardScheme getScheme() { return new getSSHCredential_argsStandardScheme(); } } private static class getSSHCredential_argsStandardScheme extends StandardScheme<getSSHCredential_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredential_args 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: // 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, getSSHCredential_args 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.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getSSHCredential_argsTupleSchemeFactory implements SchemeFactory { public getSSHCredential_argsTupleScheme getScheme() { return new getSSHCredential_argsTupleScheme(); } } private static class getSSHCredential_argsTupleScheme extends TupleScheme<getSSHCredential_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getSSHCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.tokenId); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getSSHCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getSSHCredential_result implements org.apache.thrift.TBase<getSSHCredential_result, getSSHCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSSHCredential_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSSHCredential_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getSSHCredential_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getSSHCredential_resultTupleSchemeFactory()); } public org.apache.airavata.model.credential.store.SSHCredential success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.SSHCredential.class))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSSHCredential_result.class, metaDataMap); } public getSSHCredential_result() { } public getSSHCredential_result( org.apache.airavata.model.credential.store.SSHCredential success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getSSHCredential_result(getSSHCredential_result other) { if (other.isSetSuccess()) { this.success = new org.apache.airavata.model.credential.store.SSHCredential(other.success); } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getSSHCredential_result deepCopy() { return new getSSHCredential_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public org.apache.airavata.model.credential.store.SSHCredential getSuccess() { return this.success; } public getSSHCredential_result setSuccess(org.apache.airavata.model.credential.store.SSHCredential success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getSSHCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((org.apache.airavata.model.credential.store.SSHCredential)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getSSHCredential_result) return this.equals((getSSHCredential_result)that); return false; } public boolean equals(getSSHCredential_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getSSHCredential_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getSSHCredential_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } 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 getSSHCredential_resultStandardSchemeFactory implements SchemeFactory { public getSSHCredential_resultStandardScheme getScheme() { return new getSSHCredential_resultStandardScheme(); } } private static class getSSHCredential_resultStandardScheme extends StandardScheme<getSSHCredential_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHCredential_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new org.apache.airavata.model.credential.store.SSHCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getSSHCredential_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getSSHCredential_resultTupleSchemeFactory implements SchemeFactory { public getSSHCredential_resultTupleScheme getScheme() { return new getSSHCredential_resultTupleScheme(); } } private static class getSSHCredential_resultTupleScheme extends TupleScheme<getSSHCredential_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getSSHCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getSSHCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new org.apache.airavata.model.credential.store.SSHCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getCredentialSummary_args implements org.apache.thrift.TBase<getCredentialSummary_args, getCredentialSummary_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCredentialSummary_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCredentialSummary_args"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); 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)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 getCredentialSummary_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getCredentialSummary_argsTupleSchemeFactory()); } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public org.apache.airavata.model.credential.store.SummaryType type; // required public String tokenId; // 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 { /** * * @see org.apache.airavata.model.credential.store.SummaryType */ TYPE((short)1, "type"), TOKEN_ID((short)2, "tokenId"), 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: // TYPE return TYPE; case 2: // TOKEN_ID return TOKEN_ID; 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.credential.store.SummaryType.class))); tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, 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.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCredentialSummary_args.class, metaDataMap); } public getCredentialSummary_args() { } public getCredentialSummary_args( org.apache.airavata.model.credential.store.SummaryType type, String tokenId, String gatewayId) { this(); this.type = type; this.tokenId = tokenId; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getCredentialSummary_args(getCredentialSummary_args other) { if (other.isSetType()) { this.type = other.type; } if (other.isSetTokenId()) { this.tokenId = other.tokenId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getCredentialSummary_args deepCopy() { return new getCredentialSummary_args(this); } @Override public void clear() { this.type = null; this.tokenId = null; this.gatewayId = null; } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public org.apache.airavata.model.credential.store.SummaryType getType() { return this.type; } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public getCredentialSummary_args setType(org.apache.airavata.model.credential.store.SummaryType type) { this.type = type; return this; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public String getTokenId() { return this.tokenId; } public getCredentialSummary_args 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 getGatewayId() { return this.gatewayId; } public getCredentialSummary_args 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 TYPE: if (value == null) { unsetType(); } else { setType((org.apache.airavata.model.credential.store.SummaryType)value); } break; case TOKEN_ID: if (value == null) { unsetTokenId(); } else { setTokenId((String)value); } break; case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); case TOKEN_ID: return getTokenId(); 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 TYPE: return isSetType(); case TOKEN_ID: return isSetTokenId(); case GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getCredentialSummary_args) return this.equals((getCredentialSummary_args)that); return false; } public boolean equals(getCredentialSummary_args that) { if (that == null) return false; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) 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_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() { List<Object> list = new ArrayList<Object>(); boolean present_type = true && (isSetType()); list.add(present_type); if (present_type) list.add(type.getValue()); boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) list.add(tokenId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getCredentialSummary_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); if (lastComparison != 0) { return lastComparison; } } 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(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("getCredentialSummary_args("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; if (!first) sb.append(", "); sb.append("tokenId:"); if (this.tokenId == null) { sb.append("null"); } else { sb.append(this.tokenId); } 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 if (type == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); } if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getCredentialSummary_argsStandardSchemeFactory implements SchemeFactory { public getCredentialSummary_argsStandardScheme getScheme() { return new getCredentialSummary_argsStandardScheme(); } } private static class getCredentialSummary_argsStandardScheme extends StandardScheme<getCredentialSummary_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getCredentialSummary_args 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: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // 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 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, getCredentialSummary_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.tokenId != null) { oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC); oprot.writeString(struct.tokenId); 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 getCredentialSummary_argsTupleSchemeFactory implements SchemeFactory { public getCredentialSummary_argsTupleScheme getScheme() { return new getCredentialSummary_argsTupleScheme(); } } private static class getCredentialSummary_argsTupleScheme extends TupleScheme<getCredentialSummary_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.tokenId); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getCredentialSummary_result implements org.apache.thrift.TBase<getCredentialSummary_result, getCredentialSummary_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCredentialSummary_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCredentialSummary_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getCredentialSummary_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getCredentialSummary_resultTupleSchemeFactory()); } public org.apache.airavata.model.credential.store.CredentialSummary success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CredentialSummary.class))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCredentialSummary_result.class, metaDataMap); } public getCredentialSummary_result() { } public getCredentialSummary_result( org.apache.airavata.model.credential.store.CredentialSummary success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getCredentialSummary_result(getCredentialSummary_result other) { if (other.isSetSuccess()) { this.success = new org.apache.airavata.model.credential.store.CredentialSummary(other.success); } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getCredentialSummary_result deepCopy() { return new getCredentialSummary_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public org.apache.airavata.model.credential.store.CredentialSummary getSuccess() { return this.success; } public getCredentialSummary_result setSuccess(org.apache.airavata.model.credential.store.CredentialSummary success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getCredentialSummary_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((org.apache.airavata.model.credential.store.CredentialSummary)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getCredentialSummary_result) return this.equals((getCredentialSummary_result)that); return false; } public boolean equals(getCredentialSummary_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getCredentialSummary_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getCredentialSummary_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } 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 getCredentialSummary_resultStandardSchemeFactory implements SchemeFactory { public getCredentialSummary_resultStandardScheme getScheme() { return new getCredentialSummary_resultStandardScheme(); } } private static class getCredentialSummary_resultStandardScheme extends StandardScheme<getCredentialSummary_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getCredentialSummary_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new org.apache.airavata.model.credential.store.CredentialSummary(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getCredentialSummary_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getCredentialSummary_resultTupleSchemeFactory implements SchemeFactory { public getCredentialSummary_resultTupleScheme getScheme() { return new getCredentialSummary_resultTupleScheme(); } } private static class getCredentialSummary_resultTupleScheme extends TupleScheme<getCredentialSummary_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new org.apache.airavata.model.credential.store.CredentialSummary(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getCertificateCredential_args implements org.apache.thrift.TBase<getCertificateCredential_args, getCertificateCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCertificateCredential_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCertificateCredential_args"); 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 GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getCertificateCredential_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getCertificateCredential_argsTupleSchemeFactory()); } public String tokenId; // 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"), GATEWAY_ID((short)2, "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: // 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.REQUIRED, 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.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCertificateCredential_args.class, metaDataMap); } public getCertificateCredential_args() { } public getCertificateCredential_args( String tokenId, String gatewayId) { this(); this.tokenId = tokenId; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getCertificateCredential_args(getCertificateCredential_args other) { if (other.isSetTokenId()) { this.tokenId = other.tokenId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getCertificateCredential_args deepCopy() { return new getCertificateCredential_args(this); } @Override public void clear() { this.tokenId = null; this.gatewayId = null; } public String getTokenId() { return this.tokenId; } public getCertificateCredential_args 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 getGatewayId() { return this.gatewayId; } public getCertificateCredential_args 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 GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_ID: return getTokenId(); 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 GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getCertificateCredential_args) return this.equals((getCertificateCredential_args)that); return false; } public boolean equals(getCertificateCredential_args 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_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() { List<Object> list = new ArrayList<Object>(); boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) list.add(tokenId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getCertificateCredential_args 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(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("getCertificateCredential_args("); 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("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 if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getCertificateCredential_argsStandardSchemeFactory implements SchemeFactory { public getCertificateCredential_argsStandardScheme getScheme() { return new getCertificateCredential_argsStandardScheme(); } } private static class getCertificateCredential_argsStandardScheme extends StandardScheme<getCertificateCredential_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getCertificateCredential_args 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: // 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, getCertificateCredential_args 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.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getCertificateCredential_argsTupleSchemeFactory implements SchemeFactory { public getCertificateCredential_argsTupleScheme getScheme() { return new getCertificateCredential_argsTupleScheme(); } } private static class getCertificateCredential_argsTupleScheme extends TupleScheme<getCertificateCredential_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getCertificateCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.tokenId); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getCertificateCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getCertificateCredential_result implements org.apache.thrift.TBase<getCertificateCredential_result, getCertificateCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCertificateCredential_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCertificateCredential_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getCertificateCredential_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getCertificateCredential_resultTupleSchemeFactory()); } public org.apache.airavata.model.credential.store.CertificateCredential success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CertificateCredential.class))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCertificateCredential_result.class, metaDataMap); } public getCertificateCredential_result() { } public getCertificateCredential_result( org.apache.airavata.model.credential.store.CertificateCredential success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getCertificateCredential_result(getCertificateCredential_result other) { if (other.isSetSuccess()) { this.success = new org.apache.airavata.model.credential.store.CertificateCredential(other.success); } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getCertificateCredential_result deepCopy() { return new getCertificateCredential_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public org.apache.airavata.model.credential.store.CertificateCredential getSuccess() { return this.success; } public getCertificateCredential_result setSuccess(org.apache.airavata.model.credential.store.CertificateCredential success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getCertificateCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((org.apache.airavata.model.credential.store.CertificateCredential)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getCertificateCredential_result) return this.equals((getCertificateCredential_result)that); return false; } public boolean equals(getCertificateCredential_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getCertificateCredential_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getCertificateCredential_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } 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 getCertificateCredential_resultStandardSchemeFactory implements SchemeFactory { public getCertificateCredential_resultStandardScheme getScheme() { return new getCertificateCredential_resultStandardScheme(); } } private static class getCertificateCredential_resultStandardScheme extends StandardScheme<getCertificateCredential_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getCertificateCredential_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new org.apache.airavata.model.credential.store.CertificateCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getCertificateCredential_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getCertificateCredential_resultTupleSchemeFactory implements SchemeFactory { public getCertificateCredential_resultTupleScheme getScheme() { return new getCertificateCredential_resultTupleScheme(); } } private static class getCertificateCredential_resultTupleScheme extends TupleScheme<getCertificateCredential_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getCertificateCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getCertificateCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new org.apache.airavata.model.credential.store.CertificateCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getPasswordCredential_args implements org.apache.thrift.TBase<getPasswordCredential_args, getPasswordCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPasswordCredential_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPasswordCredential_args"); 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 GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getPasswordCredential_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getPasswordCredential_argsTupleSchemeFactory()); } public String tokenId; // 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"), GATEWAY_ID((short)2, "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: // 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.REQUIRED, 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.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPasswordCredential_args.class, metaDataMap); } public getPasswordCredential_args() { } public getPasswordCredential_args( String tokenId, String gatewayId) { this(); this.tokenId = tokenId; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getPasswordCredential_args(getPasswordCredential_args other) { if (other.isSetTokenId()) { this.tokenId = other.tokenId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getPasswordCredential_args deepCopy() { return new getPasswordCredential_args(this); } @Override public void clear() { this.tokenId = null; this.gatewayId = null; } public String getTokenId() { return this.tokenId; } public getPasswordCredential_args 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 getGatewayId() { return this.gatewayId; } public getPasswordCredential_args 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 GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_ID: return getTokenId(); 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 GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getPasswordCredential_args) return this.equals((getPasswordCredential_args)that); return false; } public boolean equals(getPasswordCredential_args 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_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() { List<Object> list = new ArrayList<Object>(); boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) list.add(tokenId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getPasswordCredential_args 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(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("getPasswordCredential_args("); 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("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 if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getPasswordCredential_argsStandardSchemeFactory implements SchemeFactory { public getPasswordCredential_argsStandardScheme getScheme() { return new getPasswordCredential_argsStandardScheme(); } } private static class getPasswordCredential_argsStandardScheme extends StandardScheme<getPasswordCredential_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getPasswordCredential_args 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: // 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, getPasswordCredential_args 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.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getPasswordCredential_argsTupleSchemeFactory implements SchemeFactory { public getPasswordCredential_argsTupleScheme getScheme() { return new getPasswordCredential_argsTupleScheme(); } } private static class getPasswordCredential_argsTupleScheme extends TupleScheme<getPasswordCredential_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getPasswordCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.tokenId); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getPasswordCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getPasswordCredential_result implements org.apache.thrift.TBase<getPasswordCredential_result, getPasswordCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPasswordCredential_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPasswordCredential_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getPasswordCredential_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getPasswordCredential_resultTupleSchemeFactory()); } public org.apache.airavata.model.credential.store.PasswordCredential success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.PasswordCredential.class))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPasswordCredential_result.class, metaDataMap); } public getPasswordCredential_result() { } public getPasswordCredential_result( org.apache.airavata.model.credential.store.PasswordCredential success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getPasswordCredential_result(getPasswordCredential_result other) { if (other.isSetSuccess()) { this.success = new org.apache.airavata.model.credential.store.PasswordCredential(other.success); } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getPasswordCredential_result deepCopy() { return new getPasswordCredential_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public org.apache.airavata.model.credential.store.PasswordCredential getSuccess() { return this.success; } public getPasswordCredential_result setSuccess(org.apache.airavata.model.credential.store.PasswordCredential success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getPasswordCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((org.apache.airavata.model.credential.store.PasswordCredential)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getPasswordCredential_result) return this.equals((getPasswordCredential_result)that); return false; } public boolean equals(getPasswordCredential_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getPasswordCredential_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getPasswordCredential_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } 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 getPasswordCredential_resultStandardSchemeFactory implements SchemeFactory { public getPasswordCredential_resultStandardScheme getScheme() { return new getPasswordCredential_resultStandardScheme(); } } private static class getPasswordCredential_resultStandardScheme extends StandardScheme<getPasswordCredential_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getPasswordCredential_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.success = new org.apache.airavata.model.credential.store.PasswordCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getPasswordCredential_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getPasswordCredential_resultTupleSchemeFactory implements SchemeFactory { public getPasswordCredential_resultTupleScheme getScheme() { return new getPasswordCredential_resultTupleScheme(); } } private static class getPasswordCredential_resultTupleScheme extends TupleScheme<getPasswordCredential_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getPasswordCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getPasswordCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new org.apache.airavata.model.credential.store.PasswordCredential(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getAllSSHKeysForUser_args implements org.apache.thrift.TBase<getAllSSHKeysForUser_args, getAllSSHKeysForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllSSHKeysForUser_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHKeysForUser_args"); private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllSSHKeysForUser_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllSSHKeysForUser_argsTupleSchemeFactory()); } 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 { USERNAME((short)1, "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: // 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.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHKeysForUser_args.class, metaDataMap); } public getAllSSHKeysForUser_args() { } public getAllSSHKeysForUser_args( String username) { this(); this.username = username; } /** * Performs a deep copy on <i>other</i>. */ public getAllSSHKeysForUser_args(getAllSSHKeysForUser_args other) { if (other.isSetUsername()) { this.username = other.username; } } public getAllSSHKeysForUser_args deepCopy() { return new getAllSSHKeysForUser_args(this); } @Override public void clear() { this.username = null; } public String getUsername() { return this.username; } public getAllSSHKeysForUser_args 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 USERNAME: if (value == null) { unsetUsername(); } else { setUsername((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { 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 USERNAME: return isSetUsername(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllSSHKeysForUser_args) return this.equals((getAllSSHKeysForUser_args)that); return false; } public boolean equals(getAllSSHKeysForUser_args 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; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_username = true && (isSetUsername()); list.add(present_username); if (present_username) list.add(username); return list.hashCode(); } @Override public int compareTo(getAllSSHKeysForUser_args 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; } } 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("getAllSSHKeysForUser_args("); boolean first = true; 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 if (username == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'username' was not present! Struct: " + toString()); } // 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 getAllSSHKeysForUser_argsStandardSchemeFactory implements SchemeFactory { public getAllSSHKeysForUser_argsStandardScheme getScheme() { return new getAllSSHKeysForUser_argsStandardScheme(); } } private static class getAllSSHKeysForUser_argsStandardScheme extends StandardScheme<getAllSSHKeysForUser_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHKeysForUser_args 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: // 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, getAllSSHKeysForUser_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.username != null) { oprot.writeFieldBegin(USERNAME_FIELD_DESC); oprot.writeString(struct.username); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllSSHKeysForUser_argsTupleSchemeFactory implements SchemeFactory { public getAllSSHKeysForUser_argsTupleScheme getScheme() { return new getAllSSHKeysForUser_argsTupleScheme(); } } private static class getAllSSHKeysForUser_argsTupleScheme extends TupleScheme<getAllSSHKeysForUser_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForUser_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.username); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForUser_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.username = iprot.readString(); struct.setUsernameIsSet(true); } } } public static class getAllSSHKeysForUser_result implements org.apache.thrift.TBase<getAllSSHKeysForUser_result, getAllSSHKeysForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllSSHKeysForUser_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHKeysForUser_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllSSHKeysForUser_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllSSHKeysForUser_resultTupleSchemeFactory()); } public Map<String,String> success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHKeysForUser_result.class, metaDataMap); } public getAllSSHKeysForUser_result() { } public getAllSSHKeysForUser_result( Map<String,String> success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getAllSSHKeysForUser_result(getAllSSHKeysForUser_result other) { if (other.isSetSuccess()) { Map<String,String> __this__success = new HashMap<String,String>(other.success); this.success = __this__success; } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getAllSSHKeysForUser_result deepCopy() { return new getAllSSHKeysForUser_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(String key, String val) { if (this.success == null) { this.success = new HashMap<String,String>(); } this.success.put(key, val); } public Map<String,String> getSuccess() { return this.success; } public getAllSSHKeysForUser_result setSuccess(Map<String,String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getAllSSHKeysForUser_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map<String,String>)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllSSHKeysForUser_result) return this.equals((getAllSSHKeysForUser_result)that); return false; } public boolean equals(getAllSSHKeysForUser_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getAllSSHKeysForUser_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getAllSSHKeysForUser_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 getAllSSHKeysForUser_resultStandardSchemeFactory implements SchemeFactory { public getAllSSHKeysForUser_resultStandardScheme getScheme() { return new getAllSSHKeysForUser_resultStandardScheme(); } } private static class getAllSSHKeysForUser_resultStandardScheme extends StandardScheme<getAllSSHKeysForUser_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHKeysForUser_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); struct.success = new HashMap<String,String>(2*_map0.size); String _key1; String _val2; for (int _i3 = 0; _i3 < _map0.size; ++_i3) { _key1 = iprot.readString(); _val2 = iprot.readString(); struct.success.put(_key1, _val2); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getAllSSHKeysForUser_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (Map.Entry<String, String> _iter4 : struct.success.entrySet()) { oprot.writeString(_iter4.getKey()); oprot.writeString(_iter4.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllSSHKeysForUser_resultTupleSchemeFactory implements SchemeFactory { public getAllSSHKeysForUser_resultTupleScheme getScheme() { return new getAllSSHKeysForUser_resultTupleScheme(); } } private static class getAllSSHKeysForUser_resultTupleScheme extends TupleScheme<getAllSSHKeysForUser_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForUser_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Map.Entry<String, String> _iter5 : struct.success.entrySet()) { oprot.writeString(_iter5.getKey()); oprot.writeString(_iter5.getValue()); } } } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForUser_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new HashMap<String,String>(2*_map6.size); String _key7; String _val8; for (int _i9 = 0; _i9 < _map6.size; ++_i9) { _key7 = iprot.readString(); _val8 = iprot.readString(); struct.success.put(_key7, _val8); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getAllSSHKeysForGateway_args implements org.apache.thrift.TBase<getAllSSHKeysForGateway_args, getAllSSHKeysForGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllSSHKeysForGateway_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHKeysForGateway_args"); 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)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllSSHKeysForGateway_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllSSHKeysForGateway_argsTupleSchemeFactory()); } 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 { GATEWAY_ID((short)1, "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: // 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.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHKeysForGateway_args.class, metaDataMap); } public getAllSSHKeysForGateway_args() { } public getAllSSHKeysForGateway_args( String gatewayId) { this(); this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getAllSSHKeysForGateway_args(getAllSSHKeysForGateway_args other) { if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getAllSSHKeysForGateway_args deepCopy() { return new getAllSSHKeysForGateway_args(this); } @Override public void clear() { this.gatewayId = null; } public String getGatewayId() { return this.gatewayId; } public getAllSSHKeysForGateway_args 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 GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { 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 GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllSSHKeysForGateway_args) return this.equals((getAllSSHKeysForGateway_args)that); return false; } public boolean equals(getAllSSHKeysForGateway_args that) { if (that == null) 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() { List<Object> list = new ArrayList<Object>(); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getAllSSHKeysForGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; 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("getAllSSHKeysForGateway_args("); boolean first = true; 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 if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getAllSSHKeysForGateway_argsStandardSchemeFactory implements SchemeFactory { public getAllSSHKeysForGateway_argsStandardScheme getScheme() { return new getAllSSHKeysForGateway_argsStandardScheme(); } } private static class getAllSSHKeysForGateway_argsStandardScheme extends StandardScheme<getAllSSHKeysForGateway_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHKeysForGateway_args 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: // 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, getAllSSHKeysForGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllSSHKeysForGateway_argsTupleSchemeFactory implements SchemeFactory { public getAllSSHKeysForGateway_argsTupleScheme getScheme() { return new getAllSSHKeysForGateway_argsTupleScheme(); } } private static class getAllSSHKeysForGateway_argsTupleScheme extends TupleScheme<getAllSSHKeysForGateway_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getAllSSHKeysForGateway_result implements org.apache.thrift.TBase<getAllSSHKeysForGateway_result, getAllSSHKeysForGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllSSHKeysForGateway_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllSSHKeysForGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllSSHKeysForGateway_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllSSHKeysForGateway_resultTupleSchemeFactory()); } public Map<String,String> success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllSSHKeysForGateway_result.class, metaDataMap); } public getAllSSHKeysForGateway_result() { } public getAllSSHKeysForGateway_result( Map<String,String> success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getAllSSHKeysForGateway_result(getAllSSHKeysForGateway_result other) { if (other.isSetSuccess()) { Map<String,String> __this__success = new HashMap<String,String>(other.success); this.success = __this__success; } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getAllSSHKeysForGateway_result deepCopy() { return new getAllSSHKeysForGateway_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(String key, String val) { if (this.success == null) { this.success = new HashMap<String,String>(); } this.success.put(key, val); } public Map<String,String> getSuccess() { return this.success; } public getAllSSHKeysForGateway_result setSuccess(Map<String,String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getAllSSHKeysForGateway_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map<String,String>)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllSSHKeysForGateway_result) return this.equals((getAllSSHKeysForGateway_result)that); return false; } public boolean equals(getAllSSHKeysForGateway_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getAllSSHKeysForGateway_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getAllSSHKeysForGateway_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 getAllSSHKeysForGateway_resultStandardSchemeFactory implements SchemeFactory { public getAllSSHKeysForGateway_resultStandardScheme getScheme() { return new getAllSSHKeysForGateway_resultStandardScheme(); } } private static class getAllSSHKeysForGateway_resultStandardScheme extends StandardScheme<getAllSSHKeysForGateway_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllSSHKeysForGateway_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map10 = iprot.readMapBegin(); struct.success = new HashMap<String,String>(2*_map10.size); String _key11; String _val12; for (int _i13 = 0; _i13 < _map10.size; ++_i13) { _key11 = iprot.readString(); _val12 = iprot.readString(); struct.success.put(_key11, _val12); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getAllSSHKeysForGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (Map.Entry<String, String> _iter14 : struct.success.entrySet()) { oprot.writeString(_iter14.getKey()); oprot.writeString(_iter14.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllSSHKeysForGateway_resultTupleSchemeFactory implements SchemeFactory { public getAllSSHKeysForGateway_resultTupleScheme getScheme() { return new getAllSSHKeysForGateway_resultTupleScheme(); } } private static class getAllSSHKeysForGateway_resultTupleScheme extends TupleScheme<getAllSSHKeysForGateway_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Map.Entry<String, String> _iter15 : struct.success.entrySet()) { oprot.writeString(_iter15.getKey()); oprot.writeString(_iter15.getValue()); } } } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllSSHKeysForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map16 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new HashMap<String,String>(2*_map16.size); String _key17; String _val18; for (int _i19 = 0; _i19 < _map16.size; ++_i19) { _key17 = iprot.readString(); _val18 = iprot.readString(); struct.success.put(_key17, _val18); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getAllCredentialSummaryForGateway_args implements org.apache.thrift.TBase<getAllCredentialSummaryForGateway_args, getAllCredentialSummaryForGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllCredentialSummaryForGateway_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForGateway_args"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); 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)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllCredentialSummaryForGateway_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllCredentialSummaryForGateway_argsTupleSchemeFactory()); } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public org.apache.airavata.model.credential.store.SummaryType type; // 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 { /** * * @see org.apache.airavata.model.credential.store.SummaryType */ TYPE((short)1, "type"), GATEWAY_ID((short)2, "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: // TYPE return TYPE; case 2: // 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.credential.store.SummaryType.class))); tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForGateway_args.class, metaDataMap); } public getAllCredentialSummaryForGateway_args() { } public getAllCredentialSummaryForGateway_args( org.apache.airavata.model.credential.store.SummaryType type, String gatewayId) { this(); this.type = type; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getAllCredentialSummaryForGateway_args(getAllCredentialSummaryForGateway_args other) { if (other.isSetType()) { this.type = other.type; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getAllCredentialSummaryForGateway_args deepCopy() { return new getAllCredentialSummaryForGateway_args(this); } @Override public void clear() { this.type = null; this.gatewayId = null; } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public org.apache.airavata.model.credential.store.SummaryType getType() { return this.type; } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public getAllCredentialSummaryForGateway_args setType(org.apache.airavata.model.credential.store.SummaryType type) { this.type = type; return this; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public String getGatewayId() { return this.gatewayId; } public getAllCredentialSummaryForGateway_args 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 TYPE: if (value == null) { unsetType(); } else { setType((org.apache.airavata.model.credential.store.SummaryType)value); } break; case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); 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 TYPE: return isSetType(); case GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllCredentialSummaryForGateway_args) return this.equals((getAllCredentialSummaryForGateway_args)that); return false; } public boolean equals(getAllCredentialSummaryForGateway_args that) { if (that == null) return false; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) 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() { List<Object> list = new ArrayList<Object>(); boolean present_type = true && (isSetType()); list.add(present_type); if (present_type) list.add(type.getValue()); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getAllCredentialSummaryForGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); 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("getAllCredentialSummaryForGateway_args("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } 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 if (type == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getAllCredentialSummaryForGateway_argsStandardSchemeFactory implements SchemeFactory { public getAllCredentialSummaryForGateway_argsStandardScheme getScheme() { return new getAllCredentialSummaryForGateway_argsStandardScheme(); } } private static class getAllCredentialSummaryForGateway_argsStandardScheme extends StandardScheme<getAllCredentialSummaryForGateway_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForGateway_args 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: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // 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, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); 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 getAllCredentialSummaryForGateway_argsTupleSchemeFactory implements SchemeFactory { public getAllCredentialSummaryForGateway_argsTupleScheme getScheme() { return new getAllCredentialSummaryForGateway_argsTupleScheme(); } } private static class getAllCredentialSummaryForGateway_argsTupleScheme extends TupleScheme<getAllCredentialSummaryForGateway_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getAllCredentialSummaryForGateway_result implements org.apache.thrift.TBase<getAllCredentialSummaryForGateway_result, getAllCredentialSummaryForGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllCredentialSummaryForGateway_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllCredentialSummaryForGateway_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllCredentialSummaryForGateway_resultTupleSchemeFactory()); } public List<org.apache.airavata.model.credential.store.CredentialSummary> success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CredentialSummary.class)))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForGateway_result.class, metaDataMap); } public getAllCredentialSummaryForGateway_result() { } public getAllCredentialSummaryForGateway_result( List<org.apache.airavata.model.credential.store.CredentialSummary> success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getAllCredentialSummaryForGateway_result(getAllCredentialSummaryForGateway_result other) { if (other.isSetSuccess()) { List<org.apache.airavata.model.credential.store.CredentialSummary> __this__success = new ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(other.success.size()); for (org.apache.airavata.model.credential.store.CredentialSummary other_element : other.success) { __this__success.add(new org.apache.airavata.model.credential.store.CredentialSummary(other_element)); } this.success = __this__success; } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getAllCredentialSummaryForGateway_result deepCopy() { return new getAllCredentialSummaryForGateway_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<org.apache.airavata.model.credential.store.CredentialSummary> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(org.apache.airavata.model.credential.store.CredentialSummary elem) { if (this.success == null) { this.success = new ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(); } this.success.add(elem); } public List<org.apache.airavata.model.credential.store.CredentialSummary> getSuccess() { return this.success; } public getAllCredentialSummaryForGateway_result setSuccess(List<org.apache.airavata.model.credential.store.CredentialSummary> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getAllCredentialSummaryForGateway_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<org.apache.airavata.model.credential.store.CredentialSummary>)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllCredentialSummaryForGateway_result) return this.equals((getAllCredentialSummaryForGateway_result)that); return false; } public boolean equals(getAllCredentialSummaryForGateway_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getAllCredentialSummaryForGateway_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getAllCredentialSummaryForGateway_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 getAllCredentialSummaryForGateway_resultStandardSchemeFactory implements SchemeFactory { public getAllCredentialSummaryForGateway_resultStandardScheme getScheme() { return new getAllCredentialSummaryForGateway_resultStandardScheme(); } } private static class getAllCredentialSummaryForGateway_resultStandardScheme extends StandardScheme<getAllCredentialSummaryForGateway_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForGateway_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list20 = iprot.readListBegin(); struct.success = new ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list20.size); org.apache.airavata.model.credential.store.CredentialSummary _elem21; for (int _i22 = 0; _i22 < _list20.size; ++_i22) { _elem21 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem21.read(iprot); struct.success.add(_elem21); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (org.apache.airavata.model.credential.store.CredentialSummary _iter23 : struct.success) { _iter23.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllCredentialSummaryForGateway_resultTupleSchemeFactory implements SchemeFactory { public getAllCredentialSummaryForGateway_resultTupleScheme getScheme() { return new getAllCredentialSummaryForGateway_resultTupleScheme(); } } private static class getAllCredentialSummaryForGateway_resultTupleScheme extends TupleScheme<getAllCredentialSummaryForGateway_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (org.apache.airavata.model.credential.store.CredentialSummary _iter24 : struct.success) { _iter24.write(oprot); } } } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list25 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list25.size); org.apache.airavata.model.credential.store.CredentialSummary _elem26; for (int _i27 = 0; _i27 < _list25.size; ++_i27) { _elem26 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem26.read(iprot); struct.success.add(_elem26); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getAllCredentialSummaryForUserInGateway_args implements org.apache.thrift.TBase<getAllCredentialSummaryForUserInGateway_args, getAllCredentialSummaryForUserInGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllCredentialSummaryForUserInGateway_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForUserInGateway_args"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); 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)2); private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", 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 getAllCredentialSummaryForUserInGateway_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllCredentialSummaryForUserInGateway_argsTupleSchemeFactory()); } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public org.apache.airavata.model.credential.store.SummaryType type; // required public String gatewayId; // required public String userId; // 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 { /** * * @see org.apache.airavata.model.credential.store.SummaryType */ TYPE((short)1, "type"), GATEWAY_ID((short)2, "gatewayId"), USER_ID((short)3, "userId"); 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: // TYPE return TYPE; case 2: // GATEWAY_ID return GATEWAY_ID; case 3: // USER_ID return USER_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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.airavata.model.credential.store.SummaryType.class))); tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForUserInGateway_args.class, metaDataMap); } public getAllCredentialSummaryForUserInGateway_args() { } public getAllCredentialSummaryForUserInGateway_args( org.apache.airavata.model.credential.store.SummaryType type, String gatewayId, String userId) { this(); this.type = type; this.gatewayId = gatewayId; this.userId = userId; } /** * Performs a deep copy on <i>other</i>. */ public getAllCredentialSummaryForUserInGateway_args(getAllCredentialSummaryForUserInGateway_args other) { if (other.isSetType()) { this.type = other.type; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } if (other.isSetUserId()) { this.userId = other.userId; } } public getAllCredentialSummaryForUserInGateway_args deepCopy() { return new getAllCredentialSummaryForUserInGateway_args(this); } @Override public void clear() { this.type = null; this.gatewayId = null; this.userId = null; } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public org.apache.airavata.model.credential.store.SummaryType getType() { return this.type; } /** * * @see org.apache.airavata.model.credential.store.SummaryType */ public getAllCredentialSummaryForUserInGateway_args setType(org.apache.airavata.model.credential.store.SummaryType type) { this.type = type; return this; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public String getGatewayId() { return this.gatewayId; } public getAllCredentialSummaryForUserInGateway_args 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 String getUserId() { return this.userId; } public getAllCredentialSummaryForUserInGateway_args setUserId(String userId) { this.userId = userId; return this; } public void unsetUserId() { this.userId = null; } /** Returns true if field userId is set (has been assigned a value) and false otherwise */ public boolean isSetUserId() { return this.userId != null; } public void setUserIdIsSet(boolean value) { if (!value) { this.userId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TYPE: if (value == null) { unsetType(); } else { setType((org.apache.airavata.model.credential.store.SummaryType)value); } break; case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; case USER_ID: if (value == null) { unsetUserId(); } else { setUserId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); case GATEWAY_ID: return getGatewayId(); case USER_ID: return getUserId(); } 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 TYPE: return isSetType(); case GATEWAY_ID: return isSetGatewayId(); case USER_ID: return isSetUserId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllCredentialSummaryForUserInGateway_args) return this.equals((getAllCredentialSummaryForUserInGateway_args)that); return false; } public boolean equals(getAllCredentialSummaryForUserInGateway_args that) { if (that == null) return false; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) 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; } boolean this_present_userId = true && this.isSetUserId(); boolean that_present_userId = true && that.isSetUserId(); if (this_present_userId || that_present_userId) { if (!(this_present_userId && that_present_userId)) return false; if (!this.userId.equals(that.userId)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_type = true && (isSetType()); list.add(present_type); if (present_type) list.add(type.getValue()); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); boolean present_userId = true && (isSetUserId()); list.add(present_userId); if (present_userId) list.add(userId); return list.hashCode(); } @Override public int compareTo(getAllCredentialSummaryForUserInGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); 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; } } lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId()); if (lastComparison != 0) { return lastComparison; } if (isSetUserId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId); 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("getAllCredentialSummaryForUserInGateway_args("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); } else { sb.append(this.gatewayId); } first = false; if (!first) sb.append(", "); sb.append("userId:"); if (this.userId == null) { sb.append("null"); } else { sb.append(this.userId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (type == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } if (userId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'userId' was not present! Struct: " + toString()); } // 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 getAllCredentialSummaryForUserInGateway_argsStandardSchemeFactory implements SchemeFactory { public getAllCredentialSummaryForUserInGateway_argsStandardScheme getScheme() { return new getAllCredentialSummaryForUserInGateway_argsStandardScheme(); } } private static class getAllCredentialSummaryForUserInGateway_argsStandardScheme extends StandardScheme<getAllCredentialSummaryForUserInGateway_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForUserInGateway_args 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: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // 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; case 3: // USER_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userId = iprot.readString(); struct.setUserIdIsSet(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, getAllCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } if (struct.userId != null) { oprot.writeFieldBegin(USER_ID_FIELD_DESC); oprot.writeString(struct.userId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllCredentialSummaryForUserInGateway_argsTupleSchemeFactory implements SchemeFactory { public getAllCredentialSummaryForUserInGateway_argsTupleScheme getScheme() { return new getAllCredentialSummaryForUserInGateway_argsTupleScheme(); } } private static class getAllCredentialSummaryForUserInGateway_argsTupleScheme extends TupleScheme<getAllCredentialSummaryForUserInGateway_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.type.getValue()); oprot.writeString(struct.gatewayId); oprot.writeString(struct.userId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); struct.userId = iprot.readString(); struct.setUserIdIsSet(true); } } } public static class getAllCredentialSummaryForUserInGateway_result implements org.apache.thrift.TBase<getAllCredentialSummaryForUserInGateway_result, getAllCredentialSummaryForUserInGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllCredentialSummaryForUserInGateway_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaryForUserInGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllCredentialSummaryForUserInGateway_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllCredentialSummaryForUserInGateway_resultTupleSchemeFactory()); } public List<org.apache.airavata.model.credential.store.CredentialSummary> success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.credential.store.CredentialSummary.class)))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForUserInGateway_result.class, metaDataMap); } public getAllCredentialSummaryForUserInGateway_result() { } public getAllCredentialSummaryForUserInGateway_result( List<org.apache.airavata.model.credential.store.CredentialSummary> success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getAllCredentialSummaryForUserInGateway_result(getAllCredentialSummaryForUserInGateway_result other) { if (other.isSetSuccess()) { List<org.apache.airavata.model.credential.store.CredentialSummary> __this__success = new ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(other.success.size()); for (org.apache.airavata.model.credential.store.CredentialSummary other_element : other.success) { __this__success.add(new org.apache.airavata.model.credential.store.CredentialSummary(other_element)); } this.success = __this__success; } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getAllCredentialSummaryForUserInGateway_result deepCopy() { return new getAllCredentialSummaryForUserInGateway_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public java.util.Iterator<org.apache.airavata.model.credential.store.CredentialSummary> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(org.apache.airavata.model.credential.store.CredentialSummary elem) { if (this.success == null) { this.success = new ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(); } this.success.add(elem); } public List<org.apache.airavata.model.credential.store.CredentialSummary> getSuccess() { return this.success; } public getAllCredentialSummaryForUserInGateway_result setSuccess(List<org.apache.airavata.model.credential.store.CredentialSummary> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getAllCredentialSummaryForUserInGateway_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((List<org.apache.airavata.model.credential.store.CredentialSummary>)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllCredentialSummaryForUserInGateway_result) return this.equals((getAllCredentialSummaryForUserInGateway_result)that); return false; } public boolean equals(getAllCredentialSummaryForUserInGateway_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getAllCredentialSummaryForUserInGateway_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getAllCredentialSummaryForUserInGateway_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 getAllCredentialSummaryForUserInGateway_resultStandardSchemeFactory implements SchemeFactory { public getAllCredentialSummaryForUserInGateway_resultStandardScheme getScheme() { return new getAllCredentialSummaryForUserInGateway_resultStandardScheme(); } } private static class getAllCredentialSummaryForUserInGateway_resultStandardScheme extends StandardScheme<getAllCredentialSummaryForUserInGateway_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaryForUserInGateway_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list28 = iprot.readListBegin(); struct.success = new ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list28.size); org.apache.airavata.model.credential.store.CredentialSummary _elem29; for (int _i30 = 0; _i30 < _list28.size; ++_i30) { _elem29 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem29.read(iprot); struct.success.add(_elem29); } iprot.readListEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getAllCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); for (org.apache.airavata.model.credential.store.CredentialSummary _iter31 : struct.success) { _iter31.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllCredentialSummaryForUserInGateway_resultTupleSchemeFactory implements SchemeFactory { public getAllCredentialSummaryForUserInGateway_resultTupleScheme getScheme() { return new getAllCredentialSummaryForUserInGateway_resultTupleScheme(); } } private static class getAllCredentialSummaryForUserInGateway_resultTupleScheme extends TupleScheme<getAllCredentialSummaryForUserInGateway_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (org.apache.airavata.model.credential.store.CredentialSummary _iter32 : struct.success) { _iter32.write(oprot); } } } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list33 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list33.size); org.apache.airavata.model.credential.store.CredentialSummary _elem34; for (int _i35 = 0; _i35 < _list33.size; ++_i35) { _elem34 = new org.apache.airavata.model.credential.store.CredentialSummary(); _elem34.read(iprot); struct.success.add(_elem34); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class getAllPWDCredentialsForGateway_args implements org.apache.thrift.TBase<getAllPWDCredentialsForGateway_args, getAllPWDCredentialsForGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPWDCredentialsForGateway_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPWDCredentialsForGateway_args"); 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)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllPWDCredentialsForGateway_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllPWDCredentialsForGateway_argsTupleSchemeFactory()); } 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 { GATEWAY_ID((short)1, "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: // 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.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPWDCredentialsForGateway_args.class, metaDataMap); } public getAllPWDCredentialsForGateway_args() { } public getAllPWDCredentialsForGateway_args( String gatewayId) { this(); this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public getAllPWDCredentialsForGateway_args(getAllPWDCredentialsForGateway_args other) { if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public getAllPWDCredentialsForGateway_args deepCopy() { return new getAllPWDCredentialsForGateway_args(this); } @Override public void clear() { this.gatewayId = null; } public String getGatewayId() { return this.gatewayId; } public getAllPWDCredentialsForGateway_args 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 GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { 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 GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllPWDCredentialsForGateway_args) return this.equals((getAllPWDCredentialsForGateway_args)that); return false; } public boolean equals(getAllPWDCredentialsForGateway_args that) { if (that == null) 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() { List<Object> list = new ArrayList<Object>(); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(getAllPWDCredentialsForGateway_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; 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("getAllPWDCredentialsForGateway_args("); boolean first = true; 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 if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 getAllPWDCredentialsForGateway_argsStandardSchemeFactory implements SchemeFactory { public getAllPWDCredentialsForGateway_argsStandardScheme getScheme() { return new getAllPWDCredentialsForGateway_argsStandardScheme(); } } private static class getAllPWDCredentialsForGateway_argsStandardScheme extends StandardScheme<getAllPWDCredentialsForGateway_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllPWDCredentialsForGateway_args 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: // 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, getAllPWDCredentialsForGateway_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllPWDCredentialsForGateway_argsTupleSchemeFactory implements SchemeFactory { public getAllPWDCredentialsForGateway_argsTupleScheme getScheme() { return new getAllPWDCredentialsForGateway_argsTupleScheme(); } } private static class getAllPWDCredentialsForGateway_argsTupleScheme extends TupleScheme<getAllPWDCredentialsForGateway_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllPWDCredentialsForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllPWDCredentialsForGateway_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class getAllPWDCredentialsForGateway_result implements org.apache.thrift.TBase<getAllPWDCredentialsForGateway_result, getAllPWDCredentialsForGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPWDCredentialsForGateway_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllPWDCredentialsForGateway_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getAllPWDCredentialsForGateway_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getAllPWDCredentialsForGateway_resultTupleSchemeFactory()); } public Map<String,String> success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPWDCredentialsForGateway_result.class, metaDataMap); } public getAllPWDCredentialsForGateway_result() { } public getAllPWDCredentialsForGateway_result( Map<String,String> success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public getAllPWDCredentialsForGateway_result(getAllPWDCredentialsForGateway_result other) { if (other.isSetSuccess()) { Map<String,String> __this__success = new HashMap<String,String>(other.success); this.success = __this__success; } if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public getAllPWDCredentialsForGateway_result deepCopy() { return new getAllPWDCredentialsForGateway_result(this); } @Override public void clear() { this.success = null; this.csException = null; } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } public void putToSuccess(String key, String val) { if (this.success == null) { this.success = new HashMap<String,String>(); } this.success.put(key, val); } public Map<String,String> getSuccess() { return this.success; } public getAllPWDCredentialsForGateway_result setSuccess(Map<String,String> success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public getAllPWDCredentialsForGateway_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Map<String,String>)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getAllPWDCredentialsForGateway_result) return this.equals((getAllPWDCredentialsForGateway_result)that); return false; } public boolean equals(getAllPWDCredentialsForGateway_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(getAllPWDCredentialsForGateway_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("getAllPWDCredentialsForGateway_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 getAllPWDCredentialsForGateway_resultStandardSchemeFactory implements SchemeFactory { public getAllPWDCredentialsForGateway_resultStandardScheme getScheme() { return new getAllPWDCredentialsForGateway_resultStandardScheme(); } } private static class getAllPWDCredentialsForGateway_resultStandardScheme extends StandardScheme<getAllPWDCredentialsForGateway_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getAllPWDCredentialsForGateway_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map36 = iprot.readMapBegin(); struct.success = new HashMap<String,String>(2*_map36.size); String _key37; String _val38; for (int _i39 = 0; _i39 < _map36.size; ++_i39) { _key37 = iprot.readString(); _val38 = iprot.readString(); struct.success.put(_key37, _val38); } iprot.readMapEnd(); } struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, getAllPWDCredentialsForGateway_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); for (Map.Entry<String, String> _iter40 : struct.success.entrySet()) { oprot.writeString(_iter40.getKey()); oprot.writeString(_iter40.getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getAllPWDCredentialsForGateway_resultTupleSchemeFactory implements SchemeFactory { public getAllPWDCredentialsForGateway_resultTupleScheme getScheme() { return new getAllPWDCredentialsForGateway_resultTupleScheme(); } } private static class getAllPWDCredentialsForGateway_resultTupleScheme extends TupleScheme<getAllPWDCredentialsForGateway_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getAllPWDCredentialsForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); for (Map.Entry<String, String> _iter41 : struct.success.entrySet()) { oprot.writeString(_iter41.getKey()); oprot.writeString(_iter41.getValue()); } } } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getAllPWDCredentialsForGateway_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TMap _map42 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.success = new HashMap<String,String>(2*_map42.size); String _key43; String _val44; for (int _i45 = 0; _i45 < _map42.size; ++_i45) { _key43 = iprot.readString(); _val44 = iprot.readString(); struct.success.put(_key43, _val44); } } struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class deleteSSHCredential_args implements org.apache.thrift.TBase<deleteSSHCredential_args, deleteSSHCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSSHCredential_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSSHCredential_args"); 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 GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deleteSSHCredential_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new deleteSSHCredential_argsTupleSchemeFactory()); } public String tokenId; // 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"), GATEWAY_ID((short)2, "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: // 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.REQUIRED, 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.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSSHCredential_args.class, metaDataMap); } public deleteSSHCredential_args() { } public deleteSSHCredential_args( String tokenId, String gatewayId) { this(); this.tokenId = tokenId; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public deleteSSHCredential_args(deleteSSHCredential_args other) { if (other.isSetTokenId()) { this.tokenId = other.tokenId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public deleteSSHCredential_args deepCopy() { return new deleteSSHCredential_args(this); } @Override public void clear() { this.tokenId = null; this.gatewayId = null; } public String getTokenId() { return this.tokenId; } public deleteSSHCredential_args 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 getGatewayId() { return this.gatewayId; } public deleteSSHCredential_args 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 GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_ID: return getTokenId(); 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 GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deleteSSHCredential_args) return this.equals((deleteSSHCredential_args)that); return false; } public boolean equals(deleteSSHCredential_args 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_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() { List<Object> list = new ArrayList<Object>(); boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) list.add(tokenId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(deleteSSHCredential_args 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(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("deleteSSHCredential_args("); 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("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 if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 deleteSSHCredential_argsStandardSchemeFactory implements SchemeFactory { public deleteSSHCredential_argsStandardScheme getScheme() { return new deleteSSHCredential_argsStandardScheme(); } } private static class deleteSSHCredential_argsStandardScheme extends StandardScheme<deleteSSHCredential_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSSHCredential_args 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: // 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, deleteSSHCredential_args 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.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteSSHCredential_argsTupleSchemeFactory implements SchemeFactory { public deleteSSHCredential_argsTupleScheme getScheme() { return new deleteSSHCredential_argsTupleScheme(); } } private static class deleteSSHCredential_argsTupleScheme extends TupleScheme<deleteSSHCredential_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteSSHCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.tokenId); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteSSHCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class deleteSSHCredential_result implements org.apache.thrift.TBase<deleteSSHCredential_result, deleteSSHCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteSSHCredential_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteSSHCredential_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deleteSSHCredential_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deleteSSHCredential_resultTupleSchemeFactory()); } public boolean success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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 static final int __SUCCESS_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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSSHCredential_result.class, metaDataMap); } public deleteSSHCredential_result() { } public deleteSSHCredential_result( boolean success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; setSuccessIsSet(true); this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public deleteSSHCredential_result(deleteSSHCredential_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public deleteSSHCredential_result deepCopy() { return new deleteSSHCredential_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.csException = null; } public boolean isSuccess() { return this.success; } public deleteSSHCredential_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public deleteSSHCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deleteSSHCredential_result) return this.equals((deleteSSHCredential_result)that); return false; } public boolean equals(deleteSSHCredential_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(deleteSSHCredential_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("deleteSSHCredential_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 deleteSSHCredential_resultStandardSchemeFactory implements SchemeFactory { public deleteSSHCredential_resultStandardScheme getScheme() { return new deleteSSHCredential_resultStandardScheme(); } } private static class deleteSSHCredential_resultStandardScheme extends StandardScheme<deleteSSHCredential_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSSHCredential_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, deleteSSHCredential_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteSSHCredential_resultTupleSchemeFactory implements SchemeFactory { public deleteSSHCredential_resultTupleScheme getScheme() { return new deleteSSHCredential_resultTupleScheme(); } } private static class deleteSSHCredential_resultTupleScheme extends TupleScheme<deleteSSHCredential_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deleteSSHCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deleteSSHCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } public static class deletePWDCredential_args implements org.apache.thrift.TBase<deletePWDCredential_args, deletePWDCredential_args._Fields>, java.io.Serializable, Cloneable, Comparable<deletePWDCredential_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePWDCredential_args"); 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 GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deletePWDCredential_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new deletePWDCredential_argsTupleSchemeFactory()); } public String tokenId; // 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"), GATEWAY_ID((short)2, "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: // 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.REQUIRED, 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.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePWDCredential_args.class, metaDataMap); } public deletePWDCredential_args() { } public deletePWDCredential_args( String tokenId, String gatewayId) { this(); this.tokenId = tokenId; this.gatewayId = gatewayId; } /** * Performs a deep copy on <i>other</i>. */ public deletePWDCredential_args(deletePWDCredential_args other) { if (other.isSetTokenId()) { this.tokenId = other.tokenId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } } public deletePWDCredential_args deepCopy() { return new deletePWDCredential_args(this); } @Override public void clear() { this.tokenId = null; this.gatewayId = null; } public String getTokenId() { return this.tokenId; } public deletePWDCredential_args 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 getGatewayId() { return this.gatewayId; } public deletePWDCredential_args 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 GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TOKEN_ID: return getTokenId(); 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 GATEWAY_ID: return isSetGatewayId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deletePWDCredential_args) return this.equals((deletePWDCredential_args)that); return false; } public boolean equals(deletePWDCredential_args 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_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() { List<Object> list = new ArrayList<Object>(); boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) list.add(tokenId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); return list.hashCode(); } @Override public int compareTo(deletePWDCredential_args 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(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("deletePWDCredential_args("); 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("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 if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } // 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 deletePWDCredential_argsStandardSchemeFactory implements SchemeFactory { public deletePWDCredential_argsStandardScheme getScheme() { return new deletePWDCredential_argsStandardScheme(); } } private static class deletePWDCredential_argsStandardScheme extends StandardScheme<deletePWDCredential_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, deletePWDCredential_args 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: // 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, deletePWDCredential_args 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.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deletePWDCredential_argsTupleSchemeFactory implements SchemeFactory { public deletePWDCredential_argsTupleScheme getScheme() { return new deletePWDCredential_argsTupleScheme(); } } private static class deletePWDCredential_argsTupleScheme extends TupleScheme<deletePWDCredential_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deletePWDCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.tokenId); oprot.writeString(struct.gatewayId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deletePWDCredential_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } } } public static class deletePWDCredential_result implements org.apache.thrift.TBase<deletePWDCredential_result, deletePWDCredential_result._Fields>, java.io.Serializable, Cloneable, Comparable<deletePWDCredential_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deletePWDCredential_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final org.apache.thrift.protocol.TField CS_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("csException", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deletePWDCredential_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deletePWDCredential_resultTupleSchemeFactory()); } public boolean success; // required public org.apache.airavata.credential.store.exception.CredentialStoreException csException; // 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 { SUCCESS((short)0, "success"), CS_EXCEPTION((short)1, "csException"); 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 0: // SUCCESS return SUCCESS; case 1: // CS_EXCEPTION return CS_EXCEPTION; 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 static final int __SUCCESS_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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.CS_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("csException", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePWDCredential_result.class, metaDataMap); } public deletePWDCredential_result() { } public deletePWDCredential_result( boolean success, org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this(); this.success = success; setSuccessIsSet(true); this.csException = csException; } /** * Performs a deep copy on <i>other</i>. */ public deletePWDCredential_result(deletePWDCredential_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; if (other.isSetCsException()) { this.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(other.csException); } } public deletePWDCredential_result deepCopy() { return new deletePWDCredential_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; this.csException = null; } public boolean isSuccess() { return this.success; } public deletePWDCredential_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public org.apache.airavata.credential.store.exception.CredentialStoreException getCsException() { return this.csException; } public deletePWDCredential_result setCsException(org.apache.airavata.credential.store.exception.CredentialStoreException csException) { this.csException = csException; return this; } public void unsetCsException() { this.csException = null; } /** Returns true if field csException is set (has been assigned a value) and false otherwise */ public boolean isSetCsException() { return this.csException != null; } public void setCsExceptionIsSet(boolean value) { if (!value) { this.csException = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; case CS_EXCEPTION: if (value == null) { unsetCsException(); } else { setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); case CS_EXCEPTION: return getCsException(); } 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 SUCCESS: return isSetSuccess(); case CS_EXCEPTION: return isSetCsException(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deletePWDCredential_result) return this.equals((deletePWDCredential_result)that); return false; } public boolean equals(deletePWDCredential_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } boolean this_present_csException = true && this.isSetCsException(); boolean that_present_csException = true && that.isSetCsException(); if (this_present_csException || that_present_csException) { if (!(this_present_csException && that_present_csException)) return false; if (!this.csException.equals(that.csException)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); boolean present_csException = true && (isSetCsException()); list.add(present_csException); if (present_csException) list.add(csException); return list.hashCode(); } @Override public int compareTo(deletePWDCredential_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCsException()).compareTo(other.isSetCsException()); if (lastComparison != 0) { return lastComparison; } if (isSetCsException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.csException, other.csException); 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("deletePWDCredential_result("); boolean first = true; sb.append("success:"); sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("csException:"); if (this.csException == null) { sb.append("null"); } else { sb.append(this.csException); } 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 deletePWDCredential_resultStandardSchemeFactory implements SchemeFactory { public deletePWDCredential_resultStandardScheme getScheme() { return new deletePWDCredential_resultStandardScheme(); } } private static class deletePWDCredential_resultStandardScheme extends StandardScheme<deletePWDCredential_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, deletePWDCredential_result 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 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // CS_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(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, deletePWDCredential_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } if (struct.csException != null) { oprot.writeFieldBegin(CS_EXCEPTION_FIELD_DESC); struct.csException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deletePWDCredential_resultTupleSchemeFactory implements SchemeFactory { public deletePWDCredential_resultTupleScheme getScheme() { return new deletePWDCredential_resultTupleScheme(); } } private static class deletePWDCredential_resultTupleScheme extends TupleScheme<deletePWDCredential_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, deletePWDCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetCsException()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { oprot.writeBool(struct.success); } if (struct.isSetCsException()) { struct.csException.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, deletePWDCredential_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException(); struct.csException.read(iprot); struct.setCsExceptionIsSet(true); } } } } }