| /** |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /** |
| * Autogenerated by Thrift Compiler (0.9.3) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.airavata.api.credentials; |
| |
| import org.apache.thrift.scheme.IScheme; |
| import org.apache.thrift.scheme.SchemeFactory; |
| import org.apache.thrift.scheme.StandardScheme; |
| |
| import org.apache.thrift.scheme.TupleScheme; |
| import org.apache.thrift.protocol.TTupleProtocol; |
| import org.apache.thrift.protocol.TProtocolException; |
| import org.apache.thrift.EncodingUtils; |
| import org.apache.thrift.TException; |
| import org.apache.thrift.async.AsyncMethodCallback; |
| import org.apache.thrift.server.AbstractNonblockingServer.*; |
| import java.util.List; |
| import java.util.ArrayList; |
| import java.util.Map; |
| import java.util.HashMap; |
| import java.util.EnumMap; |
| import java.util.Set; |
| import java.util.HashSet; |
| import java.util.EnumSet; |
| import java.util.Collections; |
| import java.util.BitSet; |
| import java.nio.ByteBuffer; |
| import java.util.Arrays; |
| import javax.annotation.Generated; |
| import org.slf4j.Logger; |
| import org.slf4j.LoggerFactory; |
| |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) |
| @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-09-08") |
| public class CredentialManagementService { |
| |
| public interface Iface { |
| |
| /** |
| * Generate and Register SSH Key Pair with Airavata Credential Store. |
| * |
| * @param gatewayId |
| * The identifier for the requested gateway. |
| * |
| * @param userName |
| * The User for which the credential should be registered. For community accounts, this user is the name of the |
| * community user name. For computational resources, this user name need not be the same user name on resoruces. |
| * |
| * @return airavataCredStoreToken |
| * An SSH Key pair is generated and stored in the credential store and associated with users or community account |
| * belonging to a gateway. |
| * |
| * |
| * |
| * @param gatewayId |
| * @param userName |
| */ |
| public String generateAndRegisterSSHKeys(String gatewayId, String userName) throws org.apache.thrift.TException; |
| |
| public String getSSHPubKey(String airavataCredStoreToken) throws org.apache.thrift.TException; |
| |
| public Map<String,String> getAllUserSSHPubKeys(String userName) throws org.apache.thrift.TException; |
| |
| } |
| |
| public interface AsyncIface { |
| |
| public void generateAndRegisterSSHKeys(String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void getSSHPubKey(String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| public void getAllUserSSHPubKeys(String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; |
| |
| } |
| |
| public static class Client extends org.apache.thrift.TServiceClient implements Iface { |
| public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { |
| public Factory() {} |
| public Client getClient(org.apache.thrift.protocol.TProtocol prot) { |
| return new Client(prot); |
| } |
| public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { |
| return new Client(iprot, oprot); |
| } |
| } |
| |
| public Client(org.apache.thrift.protocol.TProtocol prot) |
| { |
| super(prot, prot); |
| } |
| |
| public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { |
| super(iprot, oprot); |
| } |
| |
| public String generateAndRegisterSSHKeys(String gatewayId, String userName) throws org.apache.thrift.TException |
| { |
| send_generateAndRegisterSSHKeys(gatewayId, userName); |
| return recv_generateAndRegisterSSHKeys(); |
| } |
| |
| public void send_generateAndRegisterSSHKeys(String gatewayId, String userName) throws org.apache.thrift.TException |
| { |
| generateAndRegisterSSHKeys_args args = new generateAndRegisterSSHKeys_args(); |
| args.setGatewayId(gatewayId); |
| args.setUserName(userName); |
| sendBase("generateAndRegisterSSHKeys", args); |
| } |
| |
| public String recv_generateAndRegisterSSHKeys() throws org.apache.thrift.TException |
| { |
| generateAndRegisterSSHKeys_result result = new generateAndRegisterSSHKeys_result(); |
| receiveBase(result, "generateAndRegisterSSHKeys"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "generateAndRegisterSSHKeys failed: unknown result"); |
| } |
| |
| public String getSSHPubKey(String airavataCredStoreToken) throws org.apache.thrift.TException |
| { |
| send_getSSHPubKey(airavataCredStoreToken); |
| return recv_getSSHPubKey(); |
| } |
| |
| public void send_getSSHPubKey(String airavataCredStoreToken) throws org.apache.thrift.TException |
| { |
| getSSHPubKey_args args = new getSSHPubKey_args(); |
| args.setAiravataCredStoreToken(airavataCredStoreToken); |
| sendBase("getSSHPubKey", args); |
| } |
| |
| public String recv_getSSHPubKey() throws org.apache.thrift.TException |
| { |
| getSSHPubKey_result result = new getSSHPubKey_result(); |
| receiveBase(result, "getSSHPubKey"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHPubKey failed: unknown result"); |
| } |
| |
| public Map<String,String> getAllUserSSHPubKeys(String userName) throws org.apache.thrift.TException |
| { |
| send_getAllUserSSHPubKeys(userName); |
| return recv_getAllUserSSHPubKeys(); |
| } |
| |
| public void send_getAllUserSSHPubKeys(String userName) throws org.apache.thrift.TException |
| { |
| getAllUserSSHPubKeys_args args = new getAllUserSSHPubKeys_args(); |
| args.setUserName(userName); |
| sendBase("getAllUserSSHPubKeys", args); |
| } |
| |
| public Map<String,String> recv_getAllUserSSHPubKeys() throws org.apache.thrift.TException |
| { |
| getAllUserSSHPubKeys_result result = new getAllUserSSHPubKeys_result(); |
| receiveBase(result, "getAllUserSSHPubKeys"); |
| if (result.isSetSuccess()) { |
| return result.success; |
| } |
| throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllUserSSHPubKeys failed: unknown result"); |
| } |
| |
| } |
| public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { |
| public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { |
| private org.apache.thrift.async.TAsyncClientManager clientManager; |
| private org.apache.thrift.protocol.TProtocolFactory protocolFactory; |
| public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { |
| this.clientManager = clientManager; |
| this.protocolFactory = protocolFactory; |
| } |
| public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { |
| return new AsyncClient(protocolFactory, clientManager, transport); |
| } |
| } |
| |
| public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { |
| super(protocolFactory, clientManager, transport); |
| } |
| |
| public void generateAndRegisterSSHKeys(String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| generateAndRegisterSSHKeys_call method_call = new generateAndRegisterSSHKeys_call(gatewayId, userName, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class generateAndRegisterSSHKeys_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private String gatewayId; |
| private String userName; |
| public generateAndRegisterSSHKeys_call(String gatewayId, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.gatewayId = gatewayId; |
| this.userName = userName; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("generateAndRegisterSSHKeys", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| generateAndRegisterSSHKeys_args args = new generateAndRegisterSSHKeys_args(); |
| args.setGatewayId(gatewayId); |
| args.setUserName(userName); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public String getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_generateAndRegisterSSHKeys(); |
| } |
| } |
| |
| public void getSSHPubKey(String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| getSSHPubKey_call method_call = new getSSHPubKey_call(airavataCredStoreToken, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class getSSHPubKey_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private String airavataCredStoreToken; |
| public getSSHPubKey_call(String airavataCredStoreToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.airavataCredStoreToken = airavataCredStoreToken; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHPubKey", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| getSSHPubKey_args args = new getSSHPubKey_args(); |
| args.setAiravataCredStoreToken(airavataCredStoreToken); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public String getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_getSSHPubKey(); |
| } |
| } |
| |
| public void getAllUserSSHPubKeys(String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { |
| checkReady(); |
| getAllUserSSHPubKeys_call method_call = new getAllUserSSHPubKeys_call(userName, resultHandler, this, ___protocolFactory, ___transport); |
| this.___currentMethod = method_call; |
| ___manager.call(method_call); |
| } |
| |
| public static class getAllUserSSHPubKeys_call extends org.apache.thrift.async.TAsyncMethodCall { |
| private String userName; |
| public getAllUserSSHPubKeys_call(String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { |
| super(client, protocolFactory, transport, resultHandler, false); |
| this.userName = userName; |
| } |
| |
| public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { |
| prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllUserSSHPubKeys", org.apache.thrift.protocol.TMessageType.CALL, 0)); |
| getAllUserSSHPubKeys_args args = new getAllUserSSHPubKeys_args(); |
| args.setUserName(userName); |
| args.write(prot); |
| prot.writeMessageEnd(); |
| } |
| |
| public Map<String,String> getResult() throws org.apache.thrift.TException { |
| if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { |
| throw new IllegalStateException("Method call not finished!"); |
| } |
| org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); |
| org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); |
| return (new Client(prot)).recv_getAllUserSSHPubKeys(); |
| } |
| } |
| |
| } |
| |
| public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { |
| private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); |
| public Processor(I iface) { |
| super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); |
| } |
| |
| protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { |
| super(iface, getProcessMap(processMap)); |
| } |
| |
| private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { |
| processMap.put("generateAndRegisterSSHKeys", new generateAndRegisterSSHKeys()); |
| processMap.put("getSSHPubKey", new getSSHPubKey()); |
| processMap.put("getAllUserSSHPubKeys", new getAllUserSSHPubKeys()); |
| return processMap; |
| } |
| |
| public static class generateAndRegisterSSHKeys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, generateAndRegisterSSHKeys_args> { |
| public generateAndRegisterSSHKeys() { |
| super("generateAndRegisterSSHKeys"); |
| } |
| |
| public generateAndRegisterSSHKeys_args getEmptyArgsInstance() { |
| return new generateAndRegisterSSHKeys_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public generateAndRegisterSSHKeys_result getResult(I iface, generateAndRegisterSSHKeys_args args) throws org.apache.thrift.TException { |
| generateAndRegisterSSHKeys_result result = new generateAndRegisterSSHKeys_result(); |
| result.success = iface.generateAndRegisterSSHKeys(args.gatewayId, args.userName); |
| return result; |
| } |
| } |
| |
| public static class getSSHPubKey<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSSHPubKey_args> { |
| public getSSHPubKey() { |
| super("getSSHPubKey"); |
| } |
| |
| public getSSHPubKey_args getEmptyArgsInstance() { |
| return new getSSHPubKey_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public getSSHPubKey_result getResult(I iface, getSSHPubKey_args args) throws org.apache.thrift.TException { |
| getSSHPubKey_result result = new getSSHPubKey_result(); |
| result.success = iface.getSSHPubKey(args.airavataCredStoreToken); |
| return result; |
| } |
| } |
| |
| public static class getAllUserSSHPubKeys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllUserSSHPubKeys_args> { |
| public getAllUserSSHPubKeys() { |
| super("getAllUserSSHPubKeys"); |
| } |
| |
| public getAllUserSSHPubKeys_args getEmptyArgsInstance() { |
| return new getAllUserSSHPubKeys_args(); |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public getAllUserSSHPubKeys_result getResult(I iface, getAllUserSSHPubKeys_args args) throws org.apache.thrift.TException { |
| getAllUserSSHPubKeys_result result = new getAllUserSSHPubKeys_result(); |
| result.success = iface.getAllUserSSHPubKeys(args.userName); |
| return result; |
| } |
| } |
| |
| } |
| |
| public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { |
| private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); |
| public AsyncProcessor(I iface) { |
| super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); |
| } |
| |
| protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { |
| super(iface, getProcessMap(processMap)); |
| } |
| |
| private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { |
| processMap.put("generateAndRegisterSSHKeys", new generateAndRegisterSSHKeys()); |
| processMap.put("getSSHPubKey", new getSSHPubKey()); |
| processMap.put("getAllUserSSHPubKeys", new getAllUserSSHPubKeys()); |
| return processMap; |
| } |
| |
| public static class generateAndRegisterSSHKeys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, generateAndRegisterSSHKeys_args, String> { |
| public generateAndRegisterSSHKeys() { |
| super("generateAndRegisterSSHKeys"); |
| } |
| |
| public generateAndRegisterSSHKeys_args getEmptyArgsInstance() { |
| return new generateAndRegisterSSHKeys_args(); |
| } |
| |
| public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<String>() { |
| public void onComplete(String o) { |
| generateAndRegisterSSHKeys_result result = new generateAndRegisterSSHKeys_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| generateAndRegisterSSHKeys_result result = new generateAndRegisterSSHKeys_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, generateAndRegisterSSHKeys_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { |
| iface.generateAndRegisterSSHKeys(args.gatewayId, args.userName,resultHandler); |
| } |
| } |
| |
| public static class getSSHPubKey<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSSHPubKey_args, String> { |
| public getSSHPubKey() { |
| super("getSSHPubKey"); |
| } |
| |
| public getSSHPubKey_args getEmptyArgsInstance() { |
| return new getSSHPubKey_args(); |
| } |
| |
| public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<String>() { |
| public void onComplete(String o) { |
| getSSHPubKey_result result = new getSSHPubKey_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| getSSHPubKey_result result = new getSSHPubKey_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, getSSHPubKey_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { |
| iface.getSSHPubKey(args.airavataCredStoreToken,resultHandler); |
| } |
| } |
| |
| public static class getAllUserSSHPubKeys<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllUserSSHPubKeys_args, Map<String,String>> { |
| public getAllUserSSHPubKeys() { |
| super("getAllUserSSHPubKeys"); |
| } |
| |
| public getAllUserSSHPubKeys_args getEmptyArgsInstance() { |
| return new getAllUserSSHPubKeys_args(); |
| } |
| |
| public AsyncMethodCallback<Map<String,String>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { |
| final org.apache.thrift.AsyncProcessFunction fcall = this; |
| return new AsyncMethodCallback<Map<String,String>>() { |
| public void onComplete(Map<String,String> o) { |
| getAllUserSSHPubKeys_result result = new getAllUserSSHPubKeys_result(); |
| result.success = o; |
| try { |
| fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); |
| return; |
| } catch (Exception e) { |
| LOGGER.error("Exception writing to internal frame buffer", e); |
| } |
| fb.close(); |
| } |
| public void onError(Exception e) { |
| byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; |
| org.apache.thrift.TBase msg; |
| getAllUserSSHPubKeys_result result = new getAllUserSSHPubKeys_result(); |
| { |
| msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; |
| msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); |
| } |
| try { |
| fcall.sendResponse(fb,msg,msgType,seqid); |
| return; |
| } catch (Exception ex) { |
| LOGGER.error("Exception writing to internal frame buffer", ex); |
| } |
| fb.close(); |
| } |
| }; |
| } |
| |
| protected boolean isOneway() { |
| return false; |
| } |
| |
| public void start(I iface, getAllUserSSHPubKeys_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,String>> resultHandler) throws TException { |
| iface.getAllUserSSHPubKeys(args.userName,resultHandler); |
| } |
| } |
| |
| } |
| |
| public static class generateAndRegisterSSHKeys_args implements org.apache.thrift.TBase<generateAndRegisterSSHKeys_args, generateAndRegisterSSHKeys_args._Fields>, java.io.Serializable, Cloneable, Comparable<generateAndRegisterSSHKeys_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("generateAndRegisterSSHKeys_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.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)2); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new generateAndRegisterSSHKeys_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new generateAndRegisterSSHKeys_argsTupleSchemeFactory()); |
| } |
| |
| public String gatewayId; // required |
| public String userName; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| GATEWAY_ID((short)1, "gatewayId"), |
| USER_NAME((short)2, "userName"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // GATEWAY_ID |
| return GATEWAY_ID; |
| case 2: // USER_NAME |
| return USER_NAME; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(generateAndRegisterSSHKeys_args.class, metaDataMap); |
| } |
| |
| public generateAndRegisterSSHKeys_args() { |
| } |
| |
| public generateAndRegisterSSHKeys_args( |
| String gatewayId, |
| String userName) |
| { |
| this(); |
| this.gatewayId = gatewayId; |
| this.userName = userName; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public generateAndRegisterSSHKeys_args(generateAndRegisterSSHKeys_args other) { |
| if (other.isSetGatewayId()) { |
| this.gatewayId = other.gatewayId; |
| } |
| if (other.isSetUserName()) { |
| this.userName = other.userName; |
| } |
| } |
| |
| public generateAndRegisterSSHKeys_args deepCopy() { |
| return new generateAndRegisterSSHKeys_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.gatewayId = null; |
| this.userName = null; |
| } |
| |
| public String getGatewayId() { |
| return this.gatewayId; |
| } |
| |
| public generateAndRegisterSSHKeys_args setGatewayId(String gatewayId) { |
| this.gatewayId = gatewayId; |
| return this; |
| } |
| |
| public void unsetGatewayId() { |
| this.gatewayId = null; |
| } |
| |
| /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */ |
| public boolean isSetGatewayId() { |
| return this.gatewayId != null; |
| } |
| |
| public void setGatewayIdIsSet(boolean value) { |
| if (!value) { |
| this.gatewayId = null; |
| } |
| } |
| |
| public String getUserName() { |
| return this.userName; |
| } |
| |
| public generateAndRegisterSSHKeys_args setUserName(String userName) { |
| this.userName = userName; |
| return this; |
| } |
| |
| public void unsetUserName() { |
| this.userName = null; |
| } |
| |
| /** Returns true if field userName is set (has been assigned a value) and false otherwise */ |
| public boolean isSetUserName() { |
| return this.userName != null; |
| } |
| |
| public void setUserNameIsSet(boolean value) { |
| if (!value) { |
| this.userName = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case GATEWAY_ID: |
| if (value == null) { |
| unsetGatewayId(); |
| } else { |
| setGatewayId((String)value); |
| } |
| break; |
| |
| case USER_NAME: |
| if (value == null) { |
| unsetUserName(); |
| } else { |
| setUserName((String)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case GATEWAY_ID: |
| return getGatewayId(); |
| |
| case USER_NAME: |
| return getUserName(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case GATEWAY_ID: |
| return isSetGatewayId(); |
| case USER_NAME: |
| return isSetUserName(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof generateAndRegisterSSHKeys_args) |
| return this.equals((generateAndRegisterSSHKeys_args)that); |
| return false; |
| } |
| |
| public boolean equals(generateAndRegisterSSHKeys_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_gatewayId = true && this.isSetGatewayId(); |
| boolean that_present_gatewayId = true && that.isSetGatewayId(); |
| if (this_present_gatewayId || that_present_gatewayId) { |
| if (!(this_present_gatewayId && that_present_gatewayId)) |
| return false; |
| if (!this.gatewayId.equals(that.gatewayId)) |
| return false; |
| } |
| |
| boolean this_present_userName = true && this.isSetUserName(); |
| boolean that_present_userName = true && that.isSetUserName(); |
| if (this_present_userName || that_present_userName) { |
| if (!(this_present_userName && that_present_userName)) |
| return false; |
| if (!this.userName.equals(that.userName)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_gatewayId = true && (isSetGatewayId()); |
| list.add(present_gatewayId); |
| if (present_gatewayId) |
| list.add(gatewayId); |
| |
| boolean present_userName = true && (isSetUserName()); |
| list.add(present_userName); |
| if (present_userName) |
| list.add(userName); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(generateAndRegisterSSHKeys_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetGatewayId()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetUserName()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("generateAndRegisterSSHKeys_args("); |
| boolean first = true; |
| |
| sb.append("gatewayId:"); |
| if (this.gatewayId == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.gatewayId); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("userName:"); |
| if (this.userName == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.userName); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (gatewayId == null) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); |
| } |
| if (userName == null) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString()); |
| } |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class generateAndRegisterSSHKeys_argsStandardSchemeFactory implements SchemeFactory { |
| public generateAndRegisterSSHKeys_argsStandardScheme getScheme() { |
| return new generateAndRegisterSSHKeys_argsStandardScheme(); |
| } |
| } |
| |
| private static class generateAndRegisterSSHKeys_argsStandardScheme extends StandardScheme<generateAndRegisterSSHKeys_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, generateAndRegisterSSHKeys_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; |
| case 2: // USER_NAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.userName = iprot.readString(); |
| struct.setUserNameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| 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, generateAndRegisterSSHKeys_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(); |
| } |
| if (struct.userName != null) { |
| oprot.writeFieldBegin(USER_NAME_FIELD_DESC); |
| oprot.writeString(struct.userName); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class generateAndRegisterSSHKeys_argsTupleSchemeFactory implements SchemeFactory { |
| public generateAndRegisterSSHKeys_argsTupleScheme getScheme() { |
| return new generateAndRegisterSSHKeys_argsTupleScheme(); |
| } |
| } |
| |
| private static class generateAndRegisterSSHKeys_argsTupleScheme extends TupleScheme<generateAndRegisterSSHKeys_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, generateAndRegisterSSHKeys_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| oprot.writeString(struct.gatewayId); |
| oprot.writeString(struct.userName); |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, generateAndRegisterSSHKeys_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| struct.gatewayId = iprot.readString(); |
| struct.setGatewayIdIsSet(true); |
| struct.userName = iprot.readString(); |
| struct.setUserNameIsSet(true); |
| } |
| } |
| |
| } |
| |
| public static class generateAndRegisterSSHKeys_result implements org.apache.thrift.TBase<generateAndRegisterSSHKeys_result, generateAndRegisterSSHKeys_result._Fields>, java.io.Serializable, Cloneable, Comparable<generateAndRegisterSSHKeys_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("generateAndRegisterSSHKeys_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new generateAndRegisterSSHKeys_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new generateAndRegisterSSHKeys_resultTupleSchemeFactory()); |
| } |
| |
| public String success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(generateAndRegisterSSHKeys_result.class, metaDataMap); |
| } |
| |
| public generateAndRegisterSSHKeys_result() { |
| } |
| |
| public generateAndRegisterSSHKeys_result( |
| String success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public generateAndRegisterSSHKeys_result(generateAndRegisterSSHKeys_result other) { |
| if (other.isSetSuccess()) { |
| this.success = other.success; |
| } |
| } |
| |
| public generateAndRegisterSSHKeys_result deepCopy() { |
| return new generateAndRegisterSSHKeys_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public String getSuccess() { |
| return this.success; |
| } |
| |
| public generateAndRegisterSSHKeys_result setSuccess(String success) { |
| this.success = success; |
| return this; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((String)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof generateAndRegisterSSHKeys_result) |
| return this.equals((generateAndRegisterSSHKeys_result)that); |
| return false; |
| } |
| |
| public boolean equals(generateAndRegisterSSHKeys_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(generateAndRegisterSSHKeys_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("generateAndRegisterSSHKeys_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class generateAndRegisterSSHKeys_resultStandardSchemeFactory implements SchemeFactory { |
| public generateAndRegisterSSHKeys_resultStandardScheme getScheme() { |
| return new generateAndRegisterSSHKeys_resultStandardScheme(); |
| } |
| } |
| |
| private static class generateAndRegisterSSHKeys_resultStandardScheme extends StandardScheme<generateAndRegisterSSHKeys_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, generateAndRegisterSSHKeys_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.success = iprot.readString(); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| |
| // check for required fields of primitive type, which can't be checked in the validate method |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, generateAndRegisterSSHKeys_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| oprot.writeString(struct.success); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class generateAndRegisterSSHKeys_resultTupleSchemeFactory implements SchemeFactory { |
| public generateAndRegisterSSHKeys_resultTupleScheme getScheme() { |
| return new generateAndRegisterSSHKeys_resultTupleScheme(); |
| } |
| } |
| |
| private static class generateAndRegisterSSHKeys_resultTupleScheme extends TupleScheme<generateAndRegisterSSHKeys_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, generateAndRegisterSSHKeys_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| oprot.writeString(struct.success); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, generateAndRegisterSSHKeys_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = iprot.readString(); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class getSSHPubKey_args implements org.apache.thrift.TBase<getSSHPubKey_args, getSSHPubKey_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSSHPubKey_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSSHPubKey_args"); |
| |
| private static final org.apache.thrift.protocol.TField AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataCredStoreToken", org.apache.thrift.protocol.TType.STRING, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new getSSHPubKey_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new getSSHPubKey_argsTupleSchemeFactory()); |
| } |
| |
| public String airavataCredStoreToken; // 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 { |
| AIRAVATA_CRED_STORE_TOKEN((short)1, "airavataCredStoreToken"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // AIRAVATA_CRED_STORE_TOKEN |
| return AIRAVATA_CRED_STORE_TOKEN; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.AIRAVATA_CRED_STORE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("airavataCredStoreToken", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSSHPubKey_args.class, metaDataMap); |
| } |
| |
| public getSSHPubKey_args() { |
| } |
| |
| public getSSHPubKey_args( |
| String airavataCredStoreToken) |
| { |
| this(); |
| this.airavataCredStoreToken = airavataCredStoreToken; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public getSSHPubKey_args(getSSHPubKey_args other) { |
| if (other.isSetAiravataCredStoreToken()) { |
| this.airavataCredStoreToken = other.airavataCredStoreToken; |
| } |
| } |
| |
| public getSSHPubKey_args deepCopy() { |
| return new getSSHPubKey_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.airavataCredStoreToken = null; |
| } |
| |
| public String getAiravataCredStoreToken() { |
| return this.airavataCredStoreToken; |
| } |
| |
| public getSSHPubKey_args setAiravataCredStoreToken(String airavataCredStoreToken) { |
| this.airavataCredStoreToken = airavataCredStoreToken; |
| return this; |
| } |
| |
| public void unsetAiravataCredStoreToken() { |
| this.airavataCredStoreToken = null; |
| } |
| |
| /** Returns true if field airavataCredStoreToken is set (has been assigned a value) and false otherwise */ |
| public boolean isSetAiravataCredStoreToken() { |
| return this.airavataCredStoreToken != null; |
| } |
| |
| public void setAiravataCredStoreTokenIsSet(boolean value) { |
| if (!value) { |
| this.airavataCredStoreToken = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case AIRAVATA_CRED_STORE_TOKEN: |
| if (value == null) { |
| unsetAiravataCredStoreToken(); |
| } else { |
| setAiravataCredStoreToken((String)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case AIRAVATA_CRED_STORE_TOKEN: |
| return getAiravataCredStoreToken(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case AIRAVATA_CRED_STORE_TOKEN: |
| return isSetAiravataCredStoreToken(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof getSSHPubKey_args) |
| return this.equals((getSSHPubKey_args)that); |
| return false; |
| } |
| |
| public boolean equals(getSSHPubKey_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_airavataCredStoreToken = true && this.isSetAiravataCredStoreToken(); |
| boolean that_present_airavataCredStoreToken = true && that.isSetAiravataCredStoreToken(); |
| if (this_present_airavataCredStoreToken || that_present_airavataCredStoreToken) { |
| if (!(this_present_airavataCredStoreToken && that_present_airavataCredStoreToken)) |
| return false; |
| if (!this.airavataCredStoreToken.equals(that.airavataCredStoreToken)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_airavataCredStoreToken = true && (isSetAiravataCredStoreToken()); |
| list.add(present_airavataCredStoreToken); |
| if (present_airavataCredStoreToken) |
| list.add(airavataCredStoreToken); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(getSSHPubKey_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetAiravataCredStoreToken()).compareTo(other.isSetAiravataCredStoreToken()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetAiravataCredStoreToken()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataCredStoreToken, other.airavataCredStoreToken); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("getSSHPubKey_args("); |
| boolean first = true; |
| |
| sb.append("airavataCredStoreToken:"); |
| if (this.airavataCredStoreToken == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.airavataCredStoreToken); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (airavataCredStoreToken == null) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataCredStoreToken' was not present! Struct: " + toString()); |
| } |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class getSSHPubKey_argsStandardSchemeFactory implements SchemeFactory { |
| public getSSHPubKey_argsStandardScheme getScheme() { |
| return new getSSHPubKey_argsStandardScheme(); |
| } |
| } |
| |
| private static class getSSHPubKey_argsStandardScheme extends StandardScheme<getSSHPubKey_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHPubKey_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: // AIRAVATA_CRED_STORE_TOKEN |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.airavataCredStoreToken = iprot.readString(); |
| struct.setAiravataCredStoreTokenIsSet(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, getSSHPubKey_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.airavataCredStoreToken != null) { |
| oprot.writeFieldBegin(AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC); |
| oprot.writeString(struct.airavataCredStoreToken); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class getSSHPubKey_argsTupleSchemeFactory implements SchemeFactory { |
| public getSSHPubKey_argsTupleScheme getScheme() { |
| return new getSSHPubKey_argsTupleScheme(); |
| } |
| } |
| |
| private static class getSSHPubKey_argsTupleScheme extends TupleScheme<getSSHPubKey_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, getSSHPubKey_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| oprot.writeString(struct.airavataCredStoreToken); |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, getSSHPubKey_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| struct.airavataCredStoreToken = iprot.readString(); |
| struct.setAiravataCredStoreTokenIsSet(true); |
| } |
| } |
| |
| } |
| |
| public static class getSSHPubKey_result implements org.apache.thrift.TBase<getSSHPubKey_result, getSSHPubKey_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSSHPubKey_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSSHPubKey_result"); |
| |
| private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new getSSHPubKey_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new getSSHPubKey_resultTupleSchemeFactory()); |
| } |
| |
| public String success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSSHPubKey_result.class, metaDataMap); |
| } |
| |
| public getSSHPubKey_result() { |
| } |
| |
| public getSSHPubKey_result( |
| String success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public getSSHPubKey_result(getSSHPubKey_result other) { |
| if (other.isSetSuccess()) { |
| this.success = other.success; |
| } |
| } |
| |
| public getSSHPubKey_result deepCopy() { |
| return new getSSHPubKey_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public String getSuccess() { |
| return this.success; |
| } |
| |
| public getSSHPubKey_result setSuccess(String success) { |
| this.success = success; |
| return this; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((String)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof getSSHPubKey_result) |
| return this.equals((getSSHPubKey_result)that); |
| return false; |
| } |
| |
| public boolean equals(getSSHPubKey_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(getSSHPubKey_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("getSSHPubKey_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class getSSHPubKey_resultStandardSchemeFactory implements SchemeFactory { |
| public getSSHPubKey_resultStandardScheme getScheme() { |
| return new getSSHPubKey_resultStandardScheme(); |
| } |
| } |
| |
| private static class getSSHPubKey_resultStandardScheme extends StandardScheme<getSSHPubKey_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, getSSHPubKey_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.success = iprot.readString(); |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| |
| // check for required fields of primitive type, which can't be checked in the validate method |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, getSSHPubKey_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| oprot.writeString(struct.success); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class getSSHPubKey_resultTupleSchemeFactory implements SchemeFactory { |
| public getSSHPubKey_resultTupleScheme getScheme() { |
| return new getSSHPubKey_resultTupleScheme(); |
| } |
| } |
| |
| private static class getSSHPubKey_resultTupleScheme extends TupleScheme<getSSHPubKey_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, getSSHPubKey_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| oprot.writeString(struct.success); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, getSSHPubKey_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| struct.success = iprot.readString(); |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| public static class getAllUserSSHPubKeys_args implements org.apache.thrift.TBase<getAllUserSSHPubKeys_args, getAllUserSSHPubKeys_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUserSSHPubKeys_args> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUserSSHPubKeys_args"); |
| |
| private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1); |
| |
| private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new getAllUserSSHPubKeys_argsStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new getAllUserSSHPubKeys_argsTupleSchemeFactory()); |
| } |
| |
| public String userName; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| USER_NAME((short)1, "userName"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // USER_NAME |
| return USER_NAME; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.REQUIRED, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUserSSHPubKeys_args.class, metaDataMap); |
| } |
| |
| public getAllUserSSHPubKeys_args() { |
| } |
| |
| public getAllUserSSHPubKeys_args( |
| String userName) |
| { |
| this(); |
| this.userName = userName; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public getAllUserSSHPubKeys_args(getAllUserSSHPubKeys_args other) { |
| if (other.isSetUserName()) { |
| this.userName = other.userName; |
| } |
| } |
| |
| public getAllUserSSHPubKeys_args deepCopy() { |
| return new getAllUserSSHPubKeys_args(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.userName = null; |
| } |
| |
| public String getUserName() { |
| return this.userName; |
| } |
| |
| public getAllUserSSHPubKeys_args setUserName(String userName) { |
| this.userName = userName; |
| return this; |
| } |
| |
| public void unsetUserName() { |
| this.userName = null; |
| } |
| |
| /** Returns true if field userName is set (has been assigned a value) and false otherwise */ |
| public boolean isSetUserName() { |
| return this.userName != null; |
| } |
| |
| public void setUserNameIsSet(boolean value) { |
| if (!value) { |
| this.userName = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case USER_NAME: |
| if (value == null) { |
| unsetUserName(); |
| } else { |
| setUserName((String)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case USER_NAME: |
| return getUserName(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case USER_NAME: |
| return isSetUserName(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof getAllUserSSHPubKeys_args) |
| return this.equals((getAllUserSSHPubKeys_args)that); |
| return false; |
| } |
| |
| public boolean equals(getAllUserSSHPubKeys_args that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_userName = true && this.isSetUserName(); |
| boolean that_present_userName = true && that.isSetUserName(); |
| if (this_present_userName || that_present_userName) { |
| if (!(this_present_userName && that_present_userName)) |
| return false; |
| if (!this.userName.equals(that.userName)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_userName = true && (isSetUserName()); |
| list.add(present_userName); |
| if (present_userName) |
| list.add(userName); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(getAllUserSSHPubKeys_args other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetUserName()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("getAllUserSSHPubKeys_args("); |
| boolean first = true; |
| |
| sb.append("userName:"); |
| if (this.userName == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.userName); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (userName == null) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'userName' was not present! Struct: " + toString()); |
| } |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class getAllUserSSHPubKeys_argsStandardSchemeFactory implements SchemeFactory { |
| public getAllUserSSHPubKeys_argsStandardScheme getScheme() { |
| return new getAllUserSSHPubKeys_argsStandardScheme(); |
| } |
| } |
| |
| private static class getAllUserSSHPubKeys_argsStandardScheme extends StandardScheme<getAllUserSSHPubKeys_args> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, getAllUserSSHPubKeys_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: // USER_NAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.userName = iprot.readString(); |
| struct.setUserNameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| 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, getAllUserSSHPubKeys_args struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.userName != null) { |
| oprot.writeFieldBegin(USER_NAME_FIELD_DESC); |
| oprot.writeString(struct.userName); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class getAllUserSSHPubKeys_argsTupleSchemeFactory implements SchemeFactory { |
| public getAllUserSSHPubKeys_argsTupleScheme getScheme() { |
| return new getAllUserSSHPubKeys_argsTupleScheme(); |
| } |
| } |
| |
| private static class getAllUserSSHPubKeys_argsTupleScheme extends TupleScheme<getAllUserSSHPubKeys_args> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, getAllUserSSHPubKeys_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| oprot.writeString(struct.userName); |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, getAllUserSSHPubKeys_args struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| struct.userName = iprot.readString(); |
| struct.setUserNameIsSet(true); |
| } |
| } |
| |
| } |
| |
| public static class getAllUserSSHPubKeys_result implements org.apache.thrift.TBase<getAllUserSSHPubKeys_result, getAllUserSSHPubKeys_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUserSSHPubKeys_result> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllUserSSHPubKeys_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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); |
| static { |
| schemes.put(StandardScheme.class, new getAllUserSSHPubKeys_resultStandardSchemeFactory()); |
| schemes.put(TupleScheme.class, new getAllUserSSHPubKeys_resultTupleSchemeFactory()); |
| } |
| |
| public Map<String,String> success; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| SUCCESS((short)0, "success"); |
| |
| private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); |
| |
| static { |
| for (_Fields field : EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 0: // SUCCESS |
| return SUCCESS; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final String _fieldName; |
| |
| _Fields(short thriftId, String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.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)))); |
| metaDataMap = Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllUserSSHPubKeys_result.class, metaDataMap); |
| } |
| |
| public getAllUserSSHPubKeys_result() { |
| } |
| |
| public getAllUserSSHPubKeys_result( |
| Map<String,String> success) |
| { |
| this(); |
| this.success = success; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public getAllUserSSHPubKeys_result(getAllUserSSHPubKeys_result other) { |
| if (other.isSetSuccess()) { |
| Map<String,String> __this__success = new HashMap<String,String>(other.success); |
| this.success = __this__success; |
| } |
| } |
| |
| public getAllUserSSHPubKeys_result deepCopy() { |
| return new getAllUserSSHPubKeys_result(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.success = null; |
| } |
| |
| public int getSuccessSize() { |
| return (this.success == null) ? 0 : this.success.size(); |
| } |
| |
| public void putToSuccess(String key, String val) { |
| if (this.success == null) { |
| this.success = new HashMap<String,String>(); |
| } |
| this.success.put(key, val); |
| } |
| |
| public Map<String,String> getSuccess() { |
| return this.success; |
| } |
| |
| public getAllUserSSHPubKeys_result setSuccess(Map<String,String> success) { |
| this.success = success; |
| return this; |
| } |
| |
| public void unsetSuccess() { |
| this.success = null; |
| } |
| |
| /** Returns true if field success is set (has been assigned a value) and false otherwise */ |
| public boolean isSetSuccess() { |
| return this.success != null; |
| } |
| |
| public void setSuccessIsSet(boolean value) { |
| if (!value) { |
| this.success = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, Object value) { |
| switch (field) { |
| case SUCCESS: |
| if (value == null) { |
| unsetSuccess(); |
| } else { |
| setSuccess((Map<String,String>)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public Object getFieldValue(_Fields field) { |
| switch (field) { |
| case SUCCESS: |
| return getSuccess(); |
| |
| } |
| throw new IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case SUCCESS: |
| return isSetSuccess(); |
| } |
| throw new IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof getAllUserSSHPubKeys_result) |
| return this.equals((getAllUserSSHPubKeys_result)that); |
| return false; |
| } |
| |
| public boolean equals(getAllUserSSHPubKeys_result that) { |
| if (that == null) |
| return false; |
| |
| boolean this_present_success = true && this.isSetSuccess(); |
| boolean that_present_success = true && that.isSetSuccess(); |
| if (this_present_success || that_present_success) { |
| if (!(this_present_success && that_present_success)) |
| return false; |
| if (!this.success.equals(that.success)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| List<Object> list = new ArrayList<Object>(); |
| |
| boolean present_success = true && (isSetSuccess()); |
| list.add(present_success); |
| if (present_success) |
| list.add(success); |
| |
| return list.hashCode(); |
| } |
| |
| @Override |
| public int compareTo(getAllUserSSHPubKeys_result other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetSuccess()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| schemes.get(iprot.getScheme()).getScheme().read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| schemes.get(oprot.getScheme()).getScheme().write(oprot, this); |
| } |
| |
| @Override |
| public String toString() { |
| StringBuilder sb = new StringBuilder("getAllUserSSHPubKeys_result("); |
| boolean first = true; |
| |
| sb.append("success:"); |
| if (this.success == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.success); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class getAllUserSSHPubKeys_resultStandardSchemeFactory implements SchemeFactory { |
| public getAllUserSSHPubKeys_resultStandardScheme getScheme() { |
| return new getAllUserSSHPubKeys_resultStandardScheme(); |
| } |
| } |
| |
| private static class getAllUserSSHPubKeys_resultStandardScheme extends StandardScheme<getAllUserSSHPubKeys_result> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, getAllUserSSHPubKeys_result struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 0: // SUCCESS |
| if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { |
| { |
| org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); |
| struct.success = new HashMap<String,String>(2*_map0.size); |
| String _key1; |
| String _val2; |
| for (int _i3 = 0; _i3 < _map0.size; ++_i3) |
| { |
| _key1 = iprot.readString(); |
| _val2 = iprot.readString(); |
| struct.success.put(_key1, _val2); |
| } |
| iprot.readMapEnd(); |
| } |
| struct.setSuccessIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| 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, getAllUserSSHPubKeys_result struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.success != null) { |
| oprot.writeFieldBegin(SUCCESS_FIELD_DESC); |
| { |
| oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); |
| for (Map.Entry<String, String> _iter4 : struct.success.entrySet()) |
| { |
| oprot.writeString(_iter4.getKey()); |
| oprot.writeString(_iter4.getValue()); |
| } |
| oprot.writeMapEnd(); |
| } |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class getAllUserSSHPubKeys_resultTupleSchemeFactory implements SchemeFactory { |
| public getAllUserSSHPubKeys_resultTupleScheme getScheme() { |
| return new getAllUserSSHPubKeys_resultTupleScheme(); |
| } |
| } |
| |
| private static class getAllUserSSHPubKeys_resultTupleScheme extends TupleScheme<getAllUserSSHPubKeys_result> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, getAllUserSSHPubKeys_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol oprot = (TTupleProtocol) prot; |
| BitSet optionals = new BitSet(); |
| if (struct.isSetSuccess()) { |
| optionals.set(0); |
| } |
| oprot.writeBitSet(optionals, 1); |
| if (struct.isSetSuccess()) { |
| { |
| oprot.writeI32(struct.success.size()); |
| for (Map.Entry<String, String> _iter5 : struct.success.entrySet()) |
| { |
| oprot.writeString(_iter5.getKey()); |
| oprot.writeString(_iter5.getValue()); |
| } |
| } |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, getAllUserSSHPubKeys_result struct) throws org.apache.thrift.TException { |
| TTupleProtocol iprot = (TTupleProtocol) prot; |
| BitSet incoming = iprot.readBitSet(1); |
| if (incoming.get(0)) { |
| { |
| org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); |
| struct.success = new HashMap<String,String>(2*_map6.size); |
| String _key7; |
| String _val8; |
| for (int _i9 = 0; _i9 < _map6.size; ++_i9) |
| { |
| _key7 = iprot.readString(); |
| _val8 = iprot.readString(); |
| struct.success.put(_key7, _val8); |
| } |
| } |
| struct.setSuccessIsSet(true); |
| } |
| } |
| } |
| |
| } |
| |
| } |