http://git-wip-us.apache.org/repos/asf/airavata/blob/b25e0a5d/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java ---------------------------------------------------------------------- diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java deleted file mode 100644 index 5d9c05c..0000000 --- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/cpi/CredentialStoreService.java +++ /dev/null @@ -1,6888 +0,0 @@ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * Autogenerated by Thrift Compiler (0.9.1) - * - * 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 org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings("all") 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.credential.store.datamodel.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - - public String addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - - public String addPasswordCredential(org.apache.airavata.credential.store.datamodel.PasswordCredential passwordCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - - public org.apache.airavata.credential.store.datamodel.SSHCredential getSSHCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - - public org.apache.airavata.credential.store.datamodel.CertificateCredential getCertificateCredential(String tokenId, String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException; - - public org.apache.airavata.credential.store.datamodel.PasswordCredential getPasswordCredential(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.credential.store.datamodel.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void addCertificateCredential(org.apache.airavata.credential.store.datamodel.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void addPasswordCredential(org.apache.airavata.credential.store.datamodel.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 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 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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.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 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.credential.store.datamodel.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.credential.store.datamodel.SSHCredential sshCredential; - public addSSHCredential_call(org.apache.airavata.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.CertificateCredential certificateCredential; - public addCertificateCredential_call(org.apache.airavata.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.PasswordCredential passwordCredential; - public addPasswordCredential_call(org.apache.airavata.credential.store.datamodel.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.credential.store.datamodel.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 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.credential.store.datamodel.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.credential.store.datamodel.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 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("getCertificateCredential", new getCertificateCredential()); - processMap.put("getPasswordCredential", new getPasswordCredential()); - 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 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 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("getCertificateCredential", new getCertificateCredential()); - processMap.put("getPasswordCredential", new getPasswordCredential()); - 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.credential.store.datamodel.SSHCredential> { - public getSSHCredential() { - super("getSSHCredential"); - } - - public getSSHCredential_args getEmptyArgsInstance() { - return new getSSHCredential_args(); - } - - public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.SSHCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.SSHCredential>() { - public void onComplete(org.apache.airavata.credential.store.datamodel.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.credential.store.datamodel.SSHCredential> resultHandler) throws TException { - iface.getSSHCredential(args.tokenId, args.gatewayId,resultHandler); - } - } - - public static class getCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCertificateCredential_args, org.apache.airavata.credential.store.datamodel.CertificateCredential> { - public getCertificateCredential() { - super("getCertificateCredential"); - } - - public getCertificateCredential_args getEmptyArgsInstance() { - return new getCertificateCredential_args(); - } - - public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.CertificateCredential>() { - public void onComplete(org.apache.airavata.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.PasswordCredential> { - public getPasswordCredential() { - super("getPasswordCredential"); - } - - public getPasswordCredential_args getEmptyArgsInstance() { - return new getPasswordCredential_args(); - } - - public AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<org.apache.airavata.credential.store.datamodel.PasswordCredential>() { - public void onComplete(org.apache.airavata.credential.store.datamodel.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.credential.store.datamodel.PasswordCredential> resultHandler) throws TException { - iface.getPasswordCredential(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. */ - @SuppressWarnings("all") 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() { - return 0; - } - - @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. */ - @SuppressWarnings("all") 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() { - return 0; - } - - @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.credential.store.datamodel.SSHCredential sshCredential; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - @SuppressWarnings("all") 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.credential.store.datamodel.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.credential.store.datamodel.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.credential.store.datamodel.SSHCredential(other.sshCredential); - } - } - - public addSSHCredential_args deepCopy() { - return new addSSHCredential_args(this); - } - - @Override - public void clear() { - this.sshCredential = null; - } - - public org.apache.airavata.credential.store.datamodel.SSHCredential getSshCredential() { - return this.sshCredential; - } - - public addSSHCredential_args setSshCredential(org.apache.airavata.credential.store.datamodel.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.credential.store.datamodel.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() { - return 0; - } - - @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); - } - } - - p
<TRUNCATED>
