blob: 73076314a00ed45d639135213968079882fea87a [file] [log] [blame]
/**
* 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.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.credential.store.cpi;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class CredentialStoreService {
public interface Iface extends org.apache.airavata.base.api.BaseAPI.Iface {
public org.apache.airavata.model.credential.store.CredentialSummary getCredentialSummary(java.lang.String tokenId, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaries(org.apache.airavata.model.credential.store.SummaryType type, java.util.List<java.lang.String> accessibleTokenIds, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
/**
* This method is to add SSHCredential which will return the token Id in success
*
*
* @param sshCredential
*/
public java.lang.String addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public java.lang.String addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public java.lang.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(java.lang.String tokenId, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public org.apache.airavata.model.credential.store.CertificateCredential getCertificateCredential(java.lang.String tokenId, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public org.apache.airavata.model.credential.store.PasswordCredential getPasswordCredential(java.lang.String tokenId, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, java.lang.String userId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public java.util.Map<java.lang.String,java.lang.String> getAllPWDCredentialsForGateway(java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public boolean deleteSSHCredential(java.lang.String tokenId, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
public boolean deletePWDCredential(java.lang.String tokenId, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException;
}
public interface AsyncIface extends org.apache.airavata.base.api.BaseAPI .AsyncIface {
public void getCredentialSummary(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CredentialSummary> resultHandler) throws org.apache.thrift.TException;
public void getAllCredentialSummaries(org.apache.airavata.model.credential.store.SummaryType type, java.util.List<java.lang.String> accessibleTokenIds, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.TException;
public void addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void addCertificateCredential(org.apache.airavata.model.credential.store.CertificateCredential certificateCredential, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void addPasswordCredential(org.apache.airavata.model.credential.store.PasswordCredential passwordCredential, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
public void getSSHCredential(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.SSHCredential> resultHandler) throws org.apache.thrift.TException;
public void getCertificateCredential(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CertificateCredential> resultHandler) throws org.apache.thrift.TException;
public void getPasswordCredential(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.PasswordCredential> resultHandler) throws org.apache.thrift.TException;
public void getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.TException;
public void getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.TException;
public void getAllPWDCredentialsForGateway(java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException;
public void deleteSSHCredential(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void deletePWDCredential(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.airavata.base.api.BaseAPI.Client 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 org.apache.airavata.model.credential.store.CredentialSummary getCredentialSummary(java.lang.String tokenId, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
{
send_getCredentialSummary(tokenId, gatewayId);
return recv_getCredentialSummary();
}
public void send_getCredentialSummary(java.lang.String tokenId, java.lang.String gatewayId) throws org.apache.thrift.TException
{
getCredentialSummary_args args = new getCredentialSummary_args();
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 java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaries(org.apache.airavata.model.credential.store.SummaryType type, java.util.List<java.lang.String> accessibleTokenIds, java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
{
send_getAllCredentialSummaries(type, accessibleTokenIds, gatewayId);
return recv_getAllCredentialSummaries();
}
public void send_getAllCredentialSummaries(org.apache.airavata.model.credential.store.SummaryType type, java.util.List<java.lang.String> accessibleTokenIds, java.lang.String gatewayId) throws org.apache.thrift.TException
{
getAllCredentialSummaries_args args = new getAllCredentialSummaries_args();
args.setType(type);
args.setAccessibleTokenIds(accessibleTokenIds);
args.setGatewayId(gatewayId);
sendBase("getAllCredentialSummaries", args);
}
public java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> recv_getAllCredentialSummaries() throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
{
getAllCredentialSummaries_result result = new getAllCredentialSummaries_result();
receiveBase(result, "getAllCredentialSummaries");
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, "getAllCredentialSummaries failed: unknown result");
}
public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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(java.lang.String tokenId, java.lang.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(java.lang.String tokenId, java.lang.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.CertificateCredential getCertificateCredential(java.lang.String tokenId, java.lang.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(java.lang.String tokenId, java.lang.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(java.lang.String tokenId, java.lang.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(java.lang.String tokenId, java.lang.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 java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, java.lang.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, java.lang.String gatewayId) throws org.apache.thrift.TException
{
getAllCredentialSummaryForGateway_args args = new getAllCredentialSummaryForGateway_args();
args.setType(type);
args.setGatewayId(gatewayId);
sendBase("getAllCredentialSummaryForGateway", args);
}
public java.util.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 java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getAllCredentialSummaryForUserInGateway(org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, java.lang.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, java.lang.String gatewayId, java.lang.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 java.util.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 java.util.Map<java.lang.String,java.lang.String> getAllPWDCredentialsForGateway(java.lang.String gatewayId) throws org.apache.airavata.credential.store.exception.CredentialStoreException, org.apache.thrift.TException
{
send_getAllPWDCredentialsForGateway(gatewayId);
return recv_getAllPWDCredentialsForGateway();
}
public void send_getAllPWDCredentialsForGateway(java.lang.String gatewayId) throws org.apache.thrift.TException
{
getAllPWDCredentialsForGateway_args args = new getAllPWDCredentialsForGateway_args();
args.setGatewayId(gatewayId);
sendBase("getAllPWDCredentialsForGateway", args);
}
public java.util.Map<java.lang.String,java.lang.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(java.lang.String tokenId, java.lang.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(java.lang.String tokenId, java.lang.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(java.lang.String tokenId, java.lang.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(java.lang.String tokenId, java.lang.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.airavata.base.api.BaseAPI.AsyncClient 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 getCredentialSummary(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CredentialSummary> resultHandler) throws org.apache.thrift.TException {
checkReady();
getCredentialSummary_call method_call = new getCredentialSummary_call(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<org.apache.airavata.model.credential.store.CredentialSummary> {
private java.lang.String tokenId;
private java.lang.String gatewayId;
public getCredentialSummary_call(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CredentialSummary> 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("getCredentialSummary", org.apache.thrift.protocol.TMessageType.CALL, 0));
getCredentialSummary_args args = new getCredentialSummary_args();
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 java.lang.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 getAllCredentialSummaries(org.apache.airavata.model.credential.store.SummaryType type, java.util.List<java.lang.String> accessibleTokenIds, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllCredentialSummaries_call method_call = new getAllCredentialSummaries_call(type, accessibleTokenIds, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class getAllCredentialSummaries_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> {
private org.apache.airavata.model.credential.store.SummaryType type;
private java.util.List<java.lang.String> accessibleTokenIds;
private java.lang.String gatewayId;
public getAllCredentialSummaries_call(org.apache.airavata.model.credential.store.SummaryType type, java.util.List<java.lang.String> accessibleTokenIds, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> 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.accessibleTokenIds = accessibleTokenIds;
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("getAllCredentialSummaries", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAllCredentialSummaries_args args = new getAllCredentialSummaries_args();
args.setType(type);
args.setAccessibleTokenIds(accessibleTokenIds);
args.setGatewayId(gatewayId);
args.write(prot);
prot.writeMessageEnd();
}
public java.util.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 java.lang.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_getAllCredentialSummaries();
}
}
public void addSSHCredential(org.apache.airavata.model.credential.store.SSHCredential sshCredential, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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<java.lang.String> {
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<java.lang.String> 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 java.lang.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 java.lang.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<java.lang.String> 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<java.lang.String> {
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<java.lang.String> 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 java.lang.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 java.lang.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<java.lang.String> 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<java.lang.String> {
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<java.lang.String> 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 java.lang.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 java.lang.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(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.SSHCredential> 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<org.apache.airavata.model.credential.store.SSHCredential> {
private java.lang.String tokenId;
private java.lang.String gatewayId;
public getSSHCredential_call(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.SSHCredential> 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 java.lang.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(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CertificateCredential> 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<org.apache.airavata.model.credential.store.CertificateCredential> {
private java.lang.String tokenId;
private java.lang.String gatewayId;
public getCertificateCredential_call(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CertificateCredential> 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 java.lang.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(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.PasswordCredential> 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<org.apache.airavata.model.credential.store.PasswordCredential> {
private java.lang.String tokenId;
private java.lang.String gatewayId;
public getPasswordCredential_call(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.PasswordCredential> 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 java.lang.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 getAllCredentialSummaryForGateway(org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> 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<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> {
private org.apache.airavata.model.credential.store.SummaryType type;
private java.lang.String gatewayId;
public getAllCredentialSummaryForGateway_call(org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> 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 java.util.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 java.lang.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, java.lang.String gatewayId, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> 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<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> {
private org.apache.airavata.model.credential.store.SummaryType type;
private java.lang.String gatewayId;
private java.lang.String userId;
public getAllCredentialSummaryForUserInGateway_call(org.apache.airavata.model.credential.store.SummaryType type, java.lang.String gatewayId, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> 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 java.util.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 java.lang.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(java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> 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<java.util.Map<java.lang.String,java.lang.String>> {
private java.lang.String gatewayId;
public getAllPWDCredentialsForGateway_call(java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> 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 java.util.Map<java.lang.String,java.lang.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 java.lang.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(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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<java.lang.Boolean> {
private java.lang.String tokenId;
private java.lang.String gatewayId;
public deleteSSHCredential_call(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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 java.lang.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 java.lang.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(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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<java.lang.Boolean> {
private java.lang.String tokenId;
private java.lang.String gatewayId;
public deletePWDCredential_call(java.lang.String tokenId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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 java.lang.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 java.lang.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.airavata.base.api.BaseAPI.Processor<I> implements org.apache.thrift.TProcessor {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("getCredentialSummary", new getCredentialSummary());
processMap.put("getAllCredentialSummaries", new getAllCredentialSummaries());
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());
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 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.tokenId, args.gatewayId);
} catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
result.csException = csException;
}
return result;
}
}
public static class getAllCredentialSummaries<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllCredentialSummaries_args> {
public getAllCredentialSummaries() {
super("getAllCredentialSummaries");
}
public getAllCredentialSummaries_args getEmptyArgsInstance() {
return new getAllCredentialSummaries_args();
}
protected boolean isOneway() {
return false;
}
public getAllCredentialSummaries_result getResult(I iface, getAllCredentialSummaries_args args) throws org.apache.thrift.TException {
getAllCredentialSummaries_result result = new getAllCredentialSummaries_result();
try {
result.success = iface.getAllCredentialSummaries(args.type, args.accessibleTokenIds, args.gatewayId);
} catch (org.apache.airavata.credential.store.exception.CredentialStoreException csException) {
result.csException = csException;
}
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 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.airavata.base.api.BaseAPI.AsyncProcessor<I> {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("getCredentialSummary", new getCredentialSummary());
processMap.put("getAllCredentialSummaries", new getAllCredentialSummaries());
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());
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 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 org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CredentialSummary> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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 org.apache.thrift.TException {
iface.getCredentialSummary(args.tokenId, args.gatewayId,resultHandler);
}
}
public static class getAllCredentialSummaries<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllCredentialSummaries_args, java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> {
public getAllCredentialSummaries() {
super("getAllCredentialSummaries");
}
public getAllCredentialSummaries_args getEmptyArgsInstance() {
return new getAllCredentialSummaries_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>>() {
public void onComplete(java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> o) {
getAllCredentialSummaries_result result = new getAllCredentialSummaries_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
getAllCredentialSummaries_result result = new getAllCredentialSummaries_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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, getAllCredentialSummaries_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.TException {
iface.getAllCredentialSummaries(args.type, args.accessibleTokenIds, args.gatewayId,resultHandler);
}
}
public static class addSSHCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addSSHCredential_args, java.lang.String> {
public addSSHCredential() {
super("addSSHCredential");
}
public addSSHCredential_args getEmptyArgsInstance() {
return new addSSHCredential_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
public void onComplete(java.lang.String o) {
addSSHCredential_result result = new addSSHCredential_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.addSSHCredential(args.sshCredential,resultHandler);
}
}
public static class addCertificateCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addCertificateCredential_args, java.lang.String> {
public addCertificateCredential() {
super("addCertificateCredential");
}
public addCertificateCredential_args getEmptyArgsInstance() {
return new addCertificateCredential_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
public void onComplete(java.lang.String o) {
addCertificateCredential_result result = new addCertificateCredential_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.addCertificateCredential(args.certificateCredential,resultHandler);
}
}
public static class addPasswordCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addPasswordCredential_args, java.lang.String> {
public addPasswordCredential() {
super("addPasswordCredential");
}
public addPasswordCredential_args getEmptyArgsInstance() {
return new addPasswordCredential_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
public void onComplete(java.lang.String o) {
addPasswordCredential_result result = new addPasswordCredential_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.String> resultHandler) throws org.apache.thrift.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 org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.SSHCredential> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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 org.apache.thrift.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.model.credential.store.CertificateCredential> {
public getCertificateCredential() {
super("getCertificateCredential");
}
public getCertificateCredential_args getEmptyArgsInstance() {
return new getCertificateCredential_args();
}
public org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.CertificateCredential> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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 org.apache.thrift.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 org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.credential.store.PasswordCredential> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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 org.apache.thrift.TException {
iface.getPasswordCredential(args.tokenId, args.gatewayId,resultHandler);
}
}
public static class getAllCredentialSummaryForGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllCredentialSummaryForGateway_args, java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> {
public getAllCredentialSummaryForGateway() {
super("getAllCredentialSummaryForGateway");
}
public getAllCredentialSummaryForGateway_args getEmptyArgsInstance() {
return new getAllCredentialSummaryForGateway_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>>() {
public void onComplete(java.util.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.TException {
iface.getAllCredentialSummaryForGateway(args.type, args.gatewayId,resultHandler);
}
}
public static class getAllCredentialSummaryForUserInGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllCredentialSummaryForUserInGateway_args, java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> {
public getAllCredentialSummaryForUserInGateway() {
super("getAllCredentialSummaryForUserInGateway");
}
public getAllCredentialSummaryForUserInGateway_args getEmptyArgsInstance() {
return new getAllCredentialSummaryForUserInGateway_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>>() {
public void onComplete(java.util.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.util.List<org.apache.airavata.model.credential.store.CredentialSummary>> resultHandler) throws org.apache.thrift.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, java.util.Map<java.lang.String,java.lang.String>> {
public getAllPWDCredentialsForGateway() {
super("getAllPWDCredentialsForGateway");
}
public getAllPWDCredentialsForGateway_args getEmptyArgsInstance() {
return new getAllPWDCredentialsForGateway_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,java.lang.String>>() {
public void onComplete(java.util.Map<java.lang.String,java.lang.String> o) {
getAllPWDCredentialsForGateway_result result = new getAllPWDCredentialsForGateway_result();
result.success = o;
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.util.Map<java.lang.String,java.lang.String>> resultHandler) throws org.apache.thrift.TException {
iface.getAllPWDCredentialsForGateway(args.gatewayId,resultHandler);
}
}
public static class deleteSSHCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteSSHCredential_args, java.lang.Boolean> {
public deleteSSHCredential() {
super("deleteSSHCredential");
}
public deleteSSHCredential_args getEmptyArgsInstance() {
return new deleteSSHCredential_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.deleteSSHCredential(args.tokenId, args.gatewayId,resultHandler);
}
}
public static class deletePWDCredential<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deletePWDCredential_args, java.lang.Boolean> {
public deletePWDCredential() {
super("deletePWDCredential");
}
public deletePWDCredential_args getEmptyArgsInstance() {
return new deletePWDCredential_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.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);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable 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 if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.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<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.deletePWDCredential(args.tokenId, args.gatewayId,resultHandler);
}
}
}
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 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getCredentialSummary_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getCredentialSummary_argsTupleSchemeFactory();
public java.lang.String tokenId; // required
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCredentialSummary_args.class, metaDataMap);
}
public getCredentialSummary_args() {
}
public getCredentialSummary_args(
java.lang.String tokenId,
java.lang.String gatewayId)
{
this();
this.tokenId = tokenId;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getCredentialSummary_args(getCredentialSummary_args other) {
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.tokenId = null;
this.gatewayId = null;
}
public java.lang.String getTokenId() {
return this.tokenId;
}
public getCredentialSummary_args setTokenId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public getCredentialSummary_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case TOKEN_ID:
if (value == null) {
unsetTokenId();
} else {
setTokenId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOKEN_ID:
return getTokenId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TOKEN_ID:
return isSetTokenId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTokenId()) ? 131071 : 524287);
if (isSetTokenId())
hashCode = hashCode * 8191 + tokenId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(getCredentialSummary_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getCredentialSummary_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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getCredentialSummary_argsStandardScheme getScheme() {
return new getCredentialSummary_argsStandardScheme();
}
}
private static class getCredentialSummary_argsStandardScheme extends org.apache.thrift.scheme.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: // 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, getCredentialSummary_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 getCredentialSummary_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getCredentialSummary_argsTupleScheme getScheme() {
return new getCredentialSummary_argsTupleScheme();
}
}
private static class getCredentialSummary_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getCredentialSummary_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tokenId = iprot.readString();
struct.setTokenIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getCredentialSummary_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.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, java.lang.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 java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(getCredentialSummary_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getCredentialSummary_resultStandardScheme getScheme() {
return new getCredentialSummary_resultStandardScheme();
}
}
private static class getCredentialSummary_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getCredentialSummary_resultTupleScheme getScheme() {
return new getCredentialSummary_resultTupleScheme();
}
}
private static class getCredentialSummary_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getCredentialSummary_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getCredentialSummary_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getAllCredentialSummaries_args implements org.apache.thrift.TBase<getAllCredentialSummaries_args, getAllCredentialSummaries_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllCredentialSummaries_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaries_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 ACCESSIBLE_TOKEN_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("accessibleTokenIds", org.apache.thrift.protocol.TType.LIST, (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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllCredentialSummaries_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllCredentialSummaries_argsTupleSchemeFactory();
/**
*
* @see org.apache.airavata.model.credential.store.SummaryType
*/
public org.apache.airavata.model.credential.store.SummaryType type; // required
public java.util.List<java.lang.String> accessibleTokenIds; // required
public java.lang.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"),
ACCESSIBLE_TOKEN_IDS((short)2, "accessibleTokenIds"),
GATEWAY_ID((short)3, "gatewayId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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: // ACCESSIBLE_TOKEN_IDS
return ACCESSIBLE_TOKEN_IDS;
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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ACCESSIBLE_TOKEN_IDS, new org.apache.thrift.meta_data.FieldMetaData("accessibleTokenIds", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaries_args.class, metaDataMap);
}
public getAllCredentialSummaries_args() {
}
public getAllCredentialSummaries_args(
org.apache.airavata.model.credential.store.SummaryType type,
java.util.List<java.lang.String> accessibleTokenIds,
java.lang.String gatewayId)
{
this();
this.type = type;
this.accessibleTokenIds = accessibleTokenIds;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public getAllCredentialSummaries_args(getAllCredentialSummaries_args other) {
if (other.isSetType()) {
this.type = other.type;
}
if (other.isSetAccessibleTokenIds()) {
java.util.List<java.lang.String> __this__accessibleTokenIds = new java.util.ArrayList<java.lang.String>(other.accessibleTokenIds);
this.accessibleTokenIds = __this__accessibleTokenIds;
}
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
}
public getAllCredentialSummaries_args deepCopy() {
return new getAllCredentialSummaries_args(this);
}
@Override
public void clear() {
this.type = null;
this.accessibleTokenIds = 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 getAllCredentialSummaries_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 int getAccessibleTokenIdsSize() {
return (this.accessibleTokenIds == null) ? 0 : this.accessibleTokenIds.size();
}
public java.util.Iterator<java.lang.String> getAccessibleTokenIdsIterator() {
return (this.accessibleTokenIds == null) ? null : this.accessibleTokenIds.iterator();
}
public void addToAccessibleTokenIds(java.lang.String elem) {
if (this.accessibleTokenIds == null) {
this.accessibleTokenIds = new java.util.ArrayList<java.lang.String>();
}
this.accessibleTokenIds.add(elem);
}
public java.util.List<java.lang.String> getAccessibleTokenIds() {
return this.accessibleTokenIds;
}
public getAllCredentialSummaries_args setAccessibleTokenIds(java.util.List<java.lang.String> accessibleTokenIds) {
this.accessibleTokenIds = accessibleTokenIds;
return this;
}
public void unsetAccessibleTokenIds() {
this.accessibleTokenIds = null;
}
/** Returns true if field accessibleTokenIds is set (has been assigned a value) and false otherwise */
public boolean isSetAccessibleTokenIds() {
return this.accessibleTokenIds != null;
}
public void setAccessibleTokenIdsIsSet(boolean value) {
if (!value) {
this.accessibleTokenIds = null;
}
}
public java.lang.String getGatewayId() {
return this.gatewayId;
}
public getAllCredentialSummaries_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case TYPE:
if (value == null) {
unsetType();
} else {
setType((org.apache.airavata.model.credential.store.SummaryType)value);
}
break;
case ACCESSIBLE_TOKEN_IDS:
if (value == null) {
unsetAccessibleTokenIds();
} else {
setAccessibleTokenIds((java.util.List<java.lang.String>)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return getType();
case ACCESSIBLE_TOKEN_IDS:
return getAccessibleTokenIds();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TYPE:
return isSetType();
case ACCESSIBLE_TOKEN_IDS:
return isSetAccessibleTokenIds();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getAllCredentialSummaries_args)
return this.equals((getAllCredentialSummaries_args)that);
return false;
}
public boolean equals(getAllCredentialSummaries_args that) {
if (that == null)
return false;
if (this == that)
return true;
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_accessibleTokenIds = true && this.isSetAccessibleTokenIds();
boolean that_present_accessibleTokenIds = true && that.isSetAccessibleTokenIds();
if (this_present_accessibleTokenIds || that_present_accessibleTokenIds) {
if (!(this_present_accessibleTokenIds && that_present_accessibleTokenIds))
return false;
if (!this.accessibleTokenIds.equals(that.accessibleTokenIds))
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
if (isSetType())
hashCode = hashCode * 8191 + type.getValue();
hashCode = hashCode * 8191 + ((isSetAccessibleTokenIds()) ? 131071 : 524287);
if (isSetAccessibleTokenIds())
hashCode = hashCode * 8191 + accessibleTokenIds.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllCredentialSummaries_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetAccessibleTokenIds()).compareTo(other.isSetAccessibleTokenIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAccessibleTokenIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accessibleTokenIds, other.accessibleTokenIds);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getAllCredentialSummaries_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("accessibleTokenIds:");
if (this.accessibleTokenIds == null) {
sb.append("null");
} else {
sb.append(this.accessibleTokenIds);
}
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 (accessibleTokenIds == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'accessibleTokenIds' 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, java.lang.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 getAllCredentialSummaries_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaries_argsStandardScheme getScheme() {
return new getAllCredentialSummaries_argsStandardScheme();
}
}
private static class getAllCredentialSummaries_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAllCredentialSummaries_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaries_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: // ACCESSIBLE_TOKEN_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.accessibleTokenIds = new java.util.ArrayList<java.lang.String>(_list0.size);
java.lang.String _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readString();
struct.accessibleTokenIds.add(_elem1);
}
iprot.readListEnd();
}
struct.setAccessibleTokenIdsIsSet(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, getAllCredentialSummaries_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.accessibleTokenIds != null) {
oprot.writeFieldBegin(ACCESSIBLE_TOKEN_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.accessibleTokenIds.size()));
for (java.lang.String _iter3 : struct.accessibleTokenIds)
{
oprot.writeString(_iter3);
}
oprot.writeListEnd();
}
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 getAllCredentialSummaries_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaries_argsTupleScheme getScheme() {
return new getAllCredentialSummaries_argsTupleScheme();
}
}
private static class getAllCredentialSummaries_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllCredentialSummaries_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaries_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.type.getValue());
{
oprot.writeI32(struct.accessibleTokenIds.size());
for (java.lang.String _iter4 : struct.accessibleTokenIds)
{
oprot.writeString(_iter4);
}
}
oprot.writeString(struct.gatewayId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaries_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.accessibleTokenIds = new java.util.ArrayList<java.lang.String>(_list5.size);
java.lang.String _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = iprot.readString();
struct.accessibleTokenIds.add(_elem6);
}
}
struct.setAccessibleTokenIdsIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class getAllCredentialSummaries_result implements org.apache.thrift.TBase<getAllCredentialSummaries_result, getAllCredentialSummaries_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllCredentialSummaries_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCredentialSummaries_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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllCredentialSummaries_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllCredentialSummaries_resultTupleSchemeFactory();
public java.util.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaries_result.class, metaDataMap);
}
public getAllCredentialSummaries_result() {
}
public getAllCredentialSummaries_result(
java.util.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 getAllCredentialSummaries_result(getAllCredentialSummaries_result other) {
if (other.isSetSuccess()) {
java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> __this__success = new java.util.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 getAllCredentialSummaries_result deepCopy() {
return new getAllCredentialSummaries_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 java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getSuccess() {
return this.success;
}
public getAllCredentialSummaries_result setSuccess(java.util.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 getAllCredentialSummaries_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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.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 java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof getAllCredentialSummaries_result)
return this.equals((getAllCredentialSummaries_result)that);
return false;
}
public boolean equals(getAllCredentialSummaries_result that) {
if (that == null)
return false;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllCredentialSummaries_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("getAllCredentialSummaries_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, java.lang.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 getAllCredentialSummaries_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaries_resultStandardScheme getScheme() {
return new getAllCredentialSummaries_resultStandardScheme();
}
}
private static class getAllCredentialSummaries_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAllCredentialSummaries_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, getAllCredentialSummaries_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 _list8 = iprot.readListBegin();
struct.success = new java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list8.size);
org.apache.airavata.model.credential.store.CredentialSummary _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = new org.apache.airavata.model.credential.store.CredentialSummary();
_elem9.read(iprot);
struct.success.add(_elem9);
}
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, getAllCredentialSummaries_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 _iter11 : struct.success)
{
_iter11.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 getAllCredentialSummaries_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaries_resultTupleScheme getScheme() {
return new getAllCredentialSummaries_resultTupleScheme();
}
}
private static class getAllCredentialSummaries_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllCredentialSummaries_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaries_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 _iter12 : struct.success)
{
_iter12.write(oprot);
}
}
}
if (struct.isSetCsException()) {
struct.csException.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaries_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list13.size);
org.apache.airavata.model.credential.store.CredentialSummary _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = new org.apache.airavata.model.credential.store.CredentialSummary();
_elem14.read(iprot);
struct.success.add(_elem14);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException();
struct.csException.read(iprot);
struct.setCsExceptionIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addSSHCredential_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.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, java.lang.Object value) {
switch (field) {
case SSH_CREDENTIAL:
if (value == null) {
unsetSshCredential();
} else {
setSshCredential((org.apache.airavata.model.credential.store.SSHCredential)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SSH_CREDENTIAL:
return getSshCredential();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SSH_CREDENTIAL:
return isSetSshCredential();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSshCredential()) ? 131071 : 524287);
if (isSetSshCredential())
hashCode = hashCode * 8191 + sshCredential.hashCode();
return hashCode;
}
@Override
public int compareTo(addSSHCredential_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public addSSHCredential_argsStandardScheme getScheme() {
return new addSSHCredential_argsStandardScheme();
}
}
private static class addSSHCredential_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public addSSHCredential_argsTupleScheme getScheme() {
return new addSSHCredential_argsTupleScheme();
}
}
private static class addSSHCredential_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addSSHCredential_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.sshCredential.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.sshCredential = new org.apache.airavata.model.credential.store.SSHCredential();
struct.sshCredential.read(iprot);
struct.setSshCredentialIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addSSHCredential_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addSSHCredential_resultTupleSchemeFactory();
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addSSHCredential_result.class, metaDataMap);
}
public addSSHCredential_result() {
}
public addSSHCredential_result(
java.lang.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 java.lang.String getSuccess() {
return this.success;
}
public addSSHCredential_result setSuccess(java.lang.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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.String)value);
}
break;
case CS_EXCEPTION:
if (value == null) {
unsetCsException();
} else {
setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(addSSHCredential_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public addSSHCredential_resultStandardScheme getScheme() {
return new addSSHCredential_resultStandardScheme();
}
}
private static class addSSHCredential_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public addSSHCredential_resultTupleScheme getScheme() {
return new addSSHCredential_resultTupleScheme();
}
}
private static class addSSHCredential_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addSSHCredential_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addSSHCredential_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addCertificateCredential_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.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, java.lang.Object value) {
switch (field) {
case CERTIFICATE_CREDENTIAL:
if (value == null) {
unsetCertificateCredential();
} else {
setCertificateCredential((org.apache.airavata.model.credential.store.CertificateCredential)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CERTIFICATE_CREDENTIAL:
return getCertificateCredential();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case CERTIFICATE_CREDENTIAL:
return isSetCertificateCredential();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetCertificateCredential()) ? 131071 : 524287);
if (isSetCertificateCredential())
hashCode = hashCode * 8191 + certificateCredential.hashCode();
return hashCode;
}
@Override
public int compareTo(addCertificateCredential_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public addCertificateCredential_argsStandardScheme getScheme() {
return new addCertificateCredential_argsStandardScheme();
}
}
private static class addCertificateCredential_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public addCertificateCredential_argsTupleScheme getScheme() {
return new addCertificateCredential_argsTupleScheme();
}
}
private static class addCertificateCredential_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addCertificateCredential_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.certificateCredential.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.certificateCredential = new org.apache.airavata.model.credential.store.CertificateCredential();
struct.certificateCredential.read(iprot);
struct.setCertificateCredentialIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addCertificateCredential_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addCertificateCredential_resultTupleSchemeFactory();
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addCertificateCredential_result.class, metaDataMap);
}
public addCertificateCredential_result() {
}
public addCertificateCredential_result(
java.lang.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 java.lang.String getSuccess() {
return this.success;
}
public addCertificateCredential_result setSuccess(java.lang.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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.String)value);
}
break;
case CS_EXCEPTION:
if (value == null) {
unsetCsException();
} else {
setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(addCertificateCredential_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public addCertificateCredential_resultStandardScheme getScheme() {
return new addCertificateCredential_resultStandardScheme();
}
}
private static class addCertificateCredential_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public addCertificateCredential_resultTupleScheme getScheme() {
return new addCertificateCredential_resultTupleScheme();
}
}
private static class addCertificateCredential_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addCertificateCredential_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addCertificateCredential_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addPasswordCredential_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.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, java.lang.Object value) {
switch (field) {
case PASSWORD_CREDENTIAL:
if (value == null) {
unsetPasswordCredential();
} else {
setPasswordCredential((org.apache.airavata.model.credential.store.PasswordCredential)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PASSWORD_CREDENTIAL:
return getPasswordCredential();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case PASSWORD_CREDENTIAL:
return isSetPasswordCredential();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetPasswordCredential()) ? 131071 : 524287);
if (isSetPasswordCredential())
hashCode = hashCode * 8191 + passwordCredential.hashCode();
return hashCode;
}
@Override
public int compareTo(addPasswordCredential_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public addPasswordCredential_argsStandardScheme getScheme() {
return new addPasswordCredential_argsStandardScheme();
}
}
private static class addPasswordCredential_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public addPasswordCredential_argsTupleScheme getScheme() {
return new addPasswordCredential_argsTupleScheme();
}
}
private static class addPasswordCredential_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addPasswordCredential_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.passwordCredential.write(oprot);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.passwordCredential = new org.apache.airavata.model.credential.store.PasswordCredential();
struct.passwordCredential.read(iprot);
struct.setPasswordCredentialIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addPasswordCredential_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addPasswordCredential_resultTupleSchemeFactory();
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addPasswordCredential_result.class, metaDataMap);
}
public addPasswordCredential_result() {
}
public addPasswordCredential_result(
java.lang.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 java.lang.String getSuccess() {
return this.success;
}
public addPasswordCredential_result setSuccess(java.lang.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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.String)value);
}
break;
case CS_EXCEPTION:
if (value == null) {
unsetCsException();
} else {
setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(addPasswordCredential_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public addPasswordCredential_resultStandardScheme getScheme() {
return new addPasswordCredential_resultStandardScheme();
}
}
private static class addPasswordCredential_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public addPasswordCredential_resultTupleScheme getScheme() {
return new addPasswordCredential_resultTupleScheme();
}
}
private static class addPasswordCredential_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addPasswordCredential_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addPasswordCredential_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSSHCredential_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSSHCredential_argsTupleSchemeFactory();
public java.lang.String tokenId; // required
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSSHCredential_args.class, metaDataMap);
}
public getSSHCredential_args() {
}
public getSSHCredential_args(
java.lang.String tokenId,
java.lang.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 java.lang.String getTokenId() {
return this.tokenId;
}
public getSSHCredential_args setTokenId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public getSSHCredential_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case TOKEN_ID:
if (value == null) {
unsetTokenId();
} else {
setTokenId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOKEN_ID:
return getTokenId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TOKEN_ID:
return isSetTokenId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTokenId()) ? 131071 : 524287);
if (isSetTokenId())
hashCode = hashCode * 8191 + tokenId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(getSSHCredential_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getSSHCredential_argsStandardScheme getScheme() {
return new getSSHCredential_argsStandardScheme();
}
}
private static class getSSHCredential_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getSSHCredential_argsTupleScheme getScheme() {
return new getSSHCredential_argsTupleScheme();
}
}
private static class getSSHCredential_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getSSHCredential_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getSSHCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tokenId = iprot.readString();
struct.setTokenIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSSHCredential_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.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, java.lang.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 java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(getSSHCredential_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getSSHCredential_resultStandardScheme getScheme() {
return new getSSHCredential_resultStandardScheme();
}
}
private static class getSSHCredential_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getSSHCredential_resultTupleScheme getScheme() {
return new getSSHCredential_resultTupleScheme();
}
}
private static class getSSHCredential_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getSSHCredential_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getSSHCredential_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getCertificateCredential_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getCertificateCredential_argsTupleSchemeFactory();
public java.lang.String tokenId; // required
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCertificateCredential_args.class, metaDataMap);
}
public getCertificateCredential_args() {
}
public getCertificateCredential_args(
java.lang.String tokenId,
java.lang.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 java.lang.String getTokenId() {
return this.tokenId;
}
public getCertificateCredential_args setTokenId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public getCertificateCredential_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case TOKEN_ID:
if (value == null) {
unsetTokenId();
} else {
setTokenId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOKEN_ID:
return getTokenId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TOKEN_ID:
return isSetTokenId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTokenId()) ? 131071 : 524287);
if (isSetTokenId())
hashCode = hashCode * 8191 + tokenId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(getCertificateCredential_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getCertificateCredential_argsStandardScheme getScheme() {
return new getCertificateCredential_argsStandardScheme();
}
}
private static class getCertificateCredential_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getCertificateCredential_argsTupleScheme getScheme() {
return new getCertificateCredential_argsTupleScheme();
}
}
private static class getCertificateCredential_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getCertificateCredential_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getCertificateCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tokenId = iprot.readString();
struct.setTokenIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getCertificateCredential_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.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, java.lang.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 java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(getCertificateCredential_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getCertificateCredential_resultStandardScheme getScheme() {
return new getCertificateCredential_resultStandardScheme();
}
}
private static class getCertificateCredential_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getCertificateCredential_resultTupleScheme getScheme() {
return new getCertificateCredential_resultTupleScheme();
}
}
private static class getCertificateCredential_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getCertificateCredential_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getCertificateCredential_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPasswordCredential_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPasswordCredential_argsTupleSchemeFactory();
public java.lang.String tokenId; // required
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPasswordCredential_args.class, metaDataMap);
}
public getPasswordCredential_args() {
}
public getPasswordCredential_args(
java.lang.String tokenId,
java.lang.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 java.lang.String getTokenId() {
return this.tokenId;
}
public getPasswordCredential_args setTokenId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public getPasswordCredential_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case TOKEN_ID:
if (value == null) {
unsetTokenId();
} else {
setTokenId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOKEN_ID:
return getTokenId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TOKEN_ID:
return isSetTokenId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTokenId()) ? 131071 : 524287);
if (isSetTokenId())
hashCode = hashCode * 8191 + tokenId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(getPasswordCredential_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getPasswordCredential_argsStandardScheme getScheme() {
return new getPasswordCredential_argsStandardScheme();
}
}
private static class getPasswordCredential_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getPasswordCredential_argsTupleScheme getScheme() {
return new getPasswordCredential_argsTupleScheme();
}
}
private static class getPasswordCredential_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getPasswordCredential_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPasswordCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tokenId = iprot.readString();
struct.setTokenIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPasswordCredential_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.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, java.lang.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 java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(getPasswordCredential_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getPasswordCredential_resultStandardScheme getScheme() {
return new getPasswordCredential_resultStandardScheme();
}
}
private static class getPasswordCredential_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getPasswordCredential_resultTupleScheme getScheme() {
return new getPasswordCredential_resultTupleScheme();
}
}
private static class getPasswordCredential_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getPasswordCredential_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPasswordCredential_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllCredentialSummaryForGateway_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllCredentialSummaryForGateway_argsTupleSchemeFactory();
/**
*
* @see org.apache.airavata.model.credential.store.SummaryType
*/
public org.apache.airavata.model.credential.store.SummaryType type; // required
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.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,
java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public getAllCredentialSummaryForGateway_args setGatewayId(java.lang.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, java.lang.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((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return getType();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TYPE:
return isSetType();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
if (isSetType())
hashCode = hashCode * 8191 + type.getValue();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllCredentialSummaryForGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaryForGateway_argsStandardScheme getScheme() {
return new getAllCredentialSummaryForGateway_argsStandardScheme();
}
}
private static class getAllCredentialSummaryForGateway_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaryForGateway_argsTupleScheme getScheme() {
return new getAllCredentialSummaryForGateway_argsTupleScheme();
}
}
private static class getAllCredentialSummaryForGateway_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllCredentialSummaryForGateway_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.type = org.apache.airavata.model.credential.store.SummaryType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllCredentialSummaryForGateway_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllCredentialSummaryForGateway_resultTupleSchemeFactory();
public java.util.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForGateway_result.class, metaDataMap);
}
public getAllCredentialSummaryForGateway_result() {
}
public getAllCredentialSummaryForGateway_result(
java.util.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()) {
java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> __this__success = new java.util.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 java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getSuccess() {
return this.success;
}
public getAllCredentialSummaryForGateway_result setSuccess(java.util.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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.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 java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllCredentialSummaryForGateway_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaryForGateway_resultStandardScheme getScheme() {
return new getAllCredentialSummaryForGateway_resultStandardScheme();
}
}
private static class getAllCredentialSummaryForGateway_resultStandardScheme extends org.apache.thrift.scheme.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 _list16 = iprot.readListBegin();
struct.success = new java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list16.size);
org.apache.airavata.model.credential.store.CredentialSummary _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
_elem17 = new org.apache.airavata.model.credential.store.CredentialSummary();
_elem17.read(iprot);
struct.success.add(_elem17);
}
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 _iter19 : struct.success)
{
_iter19.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 org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaryForGateway_resultTupleScheme getScheme() {
return new getAllCredentialSummaryForGateway_resultTupleScheme();
}
}
private static class getAllCredentialSummaryForGateway_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllCredentialSummaryForGateway_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 _iter20 : struct.success)
{
_iter20.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list21.size);
org.apache.airavata.model.credential.store.CredentialSummary _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
_elem22 = new org.apache.airavata.model.credential.store.CredentialSummary();
_elem22.read(iprot);
struct.success.add(_elem22);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException();
struct.csException.read(iprot);
struct.setCsExceptionIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllCredentialSummaryForUserInGateway_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllCredentialSummaryForUserInGateway_argsTupleSchemeFactory();
/**
*
* @see org.apache.airavata.model.credential.store.SummaryType
*/
public org.apache.airavata.model.credential.store.SummaryType type; // required
public java.lang.String gatewayId; // required
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.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,
java.lang.String gatewayId,
java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public getAllCredentialSummaryForUserInGateway_args setGatewayId(java.lang.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 java.lang.String getUserId() {
return this.userId;
}
public getAllCredentialSummaryForUserInGateway_args setUserId(java.lang.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, java.lang.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((java.lang.String)value);
}
break;
case USER_ID:
if (value == null) {
unsetUserId();
} else {
setUserId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TYPE:
return getType();
case GATEWAY_ID:
return getGatewayId();
case USER_ID:
return getUserId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TYPE:
return isSetType();
case GATEWAY_ID:
return isSetGatewayId();
case USER_ID:
return isSetUserId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
if (isSetType())
hashCode = hashCode * 8191 + type.getValue();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287);
if (isSetUserId())
hashCode = hashCode * 8191 + userId.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllCredentialSummaryForUserInGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaryForUserInGateway_argsStandardScheme getScheme() {
return new getAllCredentialSummaryForUserInGateway_argsStandardScheme();
}
}
private static class getAllCredentialSummaryForUserInGateway_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaryForUserInGateway_argsTupleScheme getScheme() {
return new getAllCredentialSummaryForUserInGateway_argsTupleScheme();
}
}
private static class getAllCredentialSummaryForUserInGateway_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllCredentialSummaryForUserInGateway_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.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);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllCredentialSummaryForUserInGateway_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllCredentialSummaryForUserInGateway_resultTupleSchemeFactory();
public java.util.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCredentialSummaryForUserInGateway_result.class, metaDataMap);
}
public getAllCredentialSummaryForUserInGateway_result() {
}
public getAllCredentialSummaryForUserInGateway_result(
java.util.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()) {
java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> __this__success = new java.util.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 java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>();
}
this.success.add(elem);
}
public java.util.List<org.apache.airavata.model.credential.store.CredentialSummary> getSuccess() {
return this.success;
}
public getAllCredentialSummaryForUserInGateway_result setSuccess(java.util.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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.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 java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllCredentialSummaryForUserInGateway_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaryForUserInGateway_resultStandardScheme getScheme() {
return new getAllCredentialSummaryForUserInGateway_resultStandardScheme();
}
}
private static class getAllCredentialSummaryForUserInGateway_resultStandardScheme extends org.apache.thrift.scheme.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 _list24 = iprot.readListBegin();
struct.success = new java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list24.size);
org.apache.airavata.model.credential.store.CredentialSummary _elem25;
for (int _i26 = 0; _i26 < _list24.size; ++_i26)
{
_elem25 = new org.apache.airavata.model.credential.store.CredentialSummary();
_elem25.read(iprot);
struct.success.add(_elem25);
}
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 _iter27 : struct.success)
{
_iter27.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 org.apache.thrift.scheme.SchemeFactory {
public getAllCredentialSummaryForUserInGateway_resultTupleScheme getScheme() {
return new getAllCredentialSummaryForUserInGateway_resultTupleScheme();
}
}
private static class getAllCredentialSummaryForUserInGateway_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllCredentialSummaryForUserInGateway_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllCredentialSummaryForUserInGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 _iter28 : struct.success)
{
_iter28.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.success = new java.util.ArrayList<org.apache.airavata.model.credential.store.CredentialSummary>(_list29.size);
org.apache.airavata.model.credential.store.CredentialSummary _elem30;
for (int _i31 = 0; _i31 < _list29.size; ++_i31)
{
_elem30 = new org.apache.airavata.model.credential.store.CredentialSummary();
_elem30.read(iprot);
struct.success.add(_elem30);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException();
struct.csException.read(iprot);
struct.setCsExceptionIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllPWDCredentialsForGateway_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllPWDCredentialsForGateway_argsTupleSchemeFactory();
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPWDCredentialsForGateway_args.class, metaDataMap);
}
public getAllPWDCredentialsForGateway_args() {
}
public getAllPWDCredentialsForGateway_args(
java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public getAllPWDCredentialsForGateway_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllPWDCredentialsForGateway_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getAllPWDCredentialsForGateway_argsStandardScheme getScheme() {
return new getAllPWDCredentialsForGateway_argsStandardScheme();
}
}
private static class getAllPWDCredentialsForGateway_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public getAllPWDCredentialsForGateway_argsTupleScheme getScheme() {
return new getAllPWDCredentialsForGateway_argsTupleScheme();
}
}
private static class getAllPWDCredentialsForGateway_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllPWDCredentialsForGateway_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllPWDCredentialsForGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.gatewayId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllPWDCredentialsForGateway_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllPWDCredentialsForGateway_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllPWDCredentialsForGateway_resultTupleSchemeFactory();
public java.util.Map<java.lang.String,java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllPWDCredentialsForGateway_result.class, metaDataMap);
}
public getAllPWDCredentialsForGateway_result() {
}
public getAllPWDCredentialsForGateway_result(
java.util.Map<java.lang.String,java.lang.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()) {
java.util.Map<java.lang.String,java.lang.String> __this__success = new java.util.HashMap<java.lang.String,java.lang.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(java.lang.String key, java.lang.String val) {
if (this.success == null) {
this.success = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.success.put(key, val);
}
public java.util.Map<java.lang.String,java.lang.String> getSuccess() {
return this.success;
}
public getAllPWDCredentialsForGateway_result setSuccess(java.util.Map<java.lang.String,java.lang.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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
case CS_EXCEPTION:
if (value == null) {
unsetCsException();
} else {
setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
if (isSetSuccess())
hashCode = hashCode * 8191 + success.hashCode();
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(getAllPWDCredentialsForGateway_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public getAllPWDCredentialsForGateway_resultStandardScheme getScheme() {
return new getAllPWDCredentialsForGateway_resultStandardScheme();
}
}
private static class getAllPWDCredentialsForGateway_resultStandardScheme extends org.apache.thrift.scheme.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 _map32 = iprot.readMapBegin();
struct.success = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map32.size);
java.lang.String _key33;
java.lang.String _val34;
for (int _i35 = 0; _i35 < _map32.size; ++_i35)
{
_key33 = iprot.readString();
_val34 = iprot.readString();
struct.success.put(_key33, _val34);
}
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 (java.util.Map.Entry<java.lang.String, java.lang.String> _iter36 : struct.success.entrySet())
{
oprot.writeString(_iter36.getKey());
oprot.writeString(_iter36.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 org.apache.thrift.scheme.SchemeFactory {
public getAllPWDCredentialsForGateway_resultTupleScheme getScheme() {
return new getAllPWDCredentialsForGateway_resultTupleScheme();
}
}
private static class getAllPWDCredentialsForGateway_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllPWDCredentialsForGateway_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllPWDCredentialsForGateway_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 (java.util.Map.Entry<java.lang.String, java.lang.String> _iter37 : struct.success.entrySet())
{
oprot.writeString(_iter37.getKey());
oprot.writeString(_iter37.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map38 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.success = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map38.size);
java.lang.String _key39;
java.lang.String _val40;
for (int _i41 = 0; _i41 < _map38.size; ++_i41)
{
_key39 = iprot.readString();
_val40 = iprot.readString();
struct.success.put(_key39, _val40);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.csException = new org.apache.airavata.credential.store.exception.CredentialStoreException();
struct.csException.read(iprot);
struct.setCsExceptionIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteSSHCredential_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteSSHCredential_argsTupleSchemeFactory();
public java.lang.String tokenId; // required
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteSSHCredential_args.class, metaDataMap);
}
public deleteSSHCredential_args() {
}
public deleteSSHCredential_args(
java.lang.String tokenId,
java.lang.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 java.lang.String getTokenId() {
return this.tokenId;
}
public deleteSSHCredential_args setTokenId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public deleteSSHCredential_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case TOKEN_ID:
if (value == null) {
unsetTokenId();
} else {
setTokenId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOKEN_ID:
return getTokenId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TOKEN_ID:
return isSetTokenId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTokenId()) ? 131071 : 524287);
if (isSetTokenId())
hashCode = hashCode * 8191 + tokenId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteSSHCredential_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public deleteSSHCredential_argsStandardScheme getScheme() {
return new deleteSSHCredential_argsStandardScheme();
}
}
private static class deleteSSHCredential_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public deleteSSHCredential_argsTupleScheme getScheme() {
return new deleteSSHCredential_argsTupleScheme();
}
}
private static class deleteSSHCredential_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteSSHCredential_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteSSHCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tokenId = iprot.readString();
struct.setTokenIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteSSHCredential_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case CS_EXCEPTION:
if (value == null) {
unsetCsException();
} else {
setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(deleteSSHCredential_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public deleteSSHCredential_resultStandardScheme getScheme() {
return new deleteSSHCredential_resultStandardScheme();
}
}
private static class deleteSSHCredential_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public deleteSSHCredential_resultTupleScheme getScheme() {
return new deleteSSHCredential_resultTupleScheme();
}
}
private static class deleteSSHCredential_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteSSHCredential_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteSSHCredential_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deletePWDCredential_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deletePWDCredential_argsTupleSchemeFactory();
public java.lang.String tokenId; // required
public java.lang.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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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 = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deletePWDCredential_args.class, metaDataMap);
}
public deletePWDCredential_args() {
}
public deletePWDCredential_args(
java.lang.String tokenId,
java.lang.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 java.lang.String getTokenId() {
return this.tokenId;
}
public deletePWDCredential_args setTokenId(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public deletePWDCredential_args setGatewayId(java.lang.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, java.lang.Object value) {
switch (field) {
case TOKEN_ID:
if (value == null) {
unsetTokenId();
} else {
setTokenId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOKEN_ID:
return getTokenId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case TOKEN_ID:
return isSetTokenId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTokenId()) ? 131071 : 524287);
if (isSetTokenId())
hashCode = hashCode * 8191 + tokenId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(deletePWDCredential_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public deletePWDCredential_argsStandardScheme getScheme() {
return new deletePWDCredential_argsStandardScheme();
}
}
private static class deletePWDCredential_argsStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public deletePWDCredential_argsTupleScheme getScheme() {
return new deletePWDCredential_argsTupleScheme();
}
}
private static class deletePWDCredential_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deletePWDCredential_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deletePWDCredential_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.tokenId = iprot.readString();
struct.setTokenIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deletePWDCredential_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.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 java.lang.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(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.credential.store.exception.CredentialStoreException.class)));
metaDataMap = java.util.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 = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.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, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case CS_EXCEPTION:
if (value == null) {
unsetCsException();
} else {
setCsException((org.apache.airavata.credential.store.exception.CredentialStoreException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case CS_EXCEPTION:
return getCsException();
}
throw new java.lang.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 java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case CS_EXCEPTION:
return isSetCsException();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.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;
if (this == that)
return true;
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() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetCsException()) ? 131071 : 524287);
if (isSetCsException())
hashCode = hashCode * 8191 + csException.hashCode();
return hashCode;
}
@Override
public int compareTo(deletePWDCredential_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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 {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.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, java.lang.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 org.apache.thrift.scheme.SchemeFactory {
public deletePWDCredential_resultStandardScheme getScheme() {
return new deletePWDCredential_resultStandardScheme();
}
}
private static class deletePWDCredential_resultStandardScheme extends org.apache.thrift.scheme.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 org.apache.thrift.scheme.SchemeFactory {
public deletePWDCredential_resultTupleScheme getScheme() {
return new deletePWDCredential_resultTupleScheme();
}
}
private static class deletePWDCredential_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deletePWDCredential_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deletePWDCredential_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.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 {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.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);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
}