/** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.gfac.cpi; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-12-19") public class GfacService { public interface Iface { /** * Query gfac server to fetch the CPI version */ public String getGFACServiceVersion() throws org.apache.thrift.TException; /** * * @param processId * * @param gatewayId: The GatewayId is inferred from security context and passed onto gfac. * * @param tokenId * * @return sucess/failure * * * * * * @param processId * @param gatewayId * @param tokenId */ public boolean submitProcess(String processId, String gatewayId, String tokenId) throws org.apache.thrift.TException; /** * * * * @param processId * * @param gatewayId: The GatewayId is inferred from security context and passed onto gfac. * * @param tokenId * * @return sucess/failure * * * * * * @param processId * @param gatewayId * @param tokenId */ public boolean cancelProcess(String processId, String gatewayId, String tokenId) throws org.apache.thrift.TException; } public interface AsyncIface { public void getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void submitProcess(String processId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void cancelProcess(String processId, String gatewayId, String tokenId, 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 getGFACServiceVersion() throws org.apache.thrift.TException { send_getGFACServiceVersion(); return recv_getGFACServiceVersion(); } public void send_getGFACServiceVersion() throws org.apache.thrift.TException { getGFACServiceVersion_args args = new getGFACServiceVersion_args(); sendBase("getGFACServiceVersion", args); } public String recv_getGFACServiceVersion() throws org.apache.thrift.TException { getGFACServiceVersion_result result = new getGFACServiceVersion_result(); receiveBase(result, "getGFACServiceVersion"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGFACServiceVersion failed: unknown result"); } public boolean submitProcess(String processId, String gatewayId, String tokenId) throws org.apache.thrift.TException { send_submitProcess(processId, gatewayId, tokenId); return recv_submitProcess(); } public void send_submitProcess(String processId, String gatewayId, String tokenId) throws org.apache.thrift.TException { submitProcess_args args = new submitProcess_args(); args.setProcessId(processId); args.setGatewayId(gatewayId); args.setTokenId(tokenId); sendBase("submitProcess", args); } public boolean recv_submitProcess() throws org.apache.thrift.TException { submitProcess_result result = new submitProcess_result(); receiveBase(result, "submitProcess"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitProcess failed: unknown result"); } public boolean cancelProcess(String processId, String gatewayId, String tokenId) throws org.apache.thrift.TException { send_cancelProcess(processId, gatewayId, tokenId); return recv_cancelProcess(); } public void send_cancelProcess(String processId, String gatewayId, String tokenId) throws org.apache.thrift.TException { cancelProcess_args args = new cancelProcess_args(); args.setProcessId(processId); args.setGatewayId(gatewayId); args.setTokenId(tokenId); sendBase("cancelProcess", args); } public boolean recv_cancelProcess() throws org.apache.thrift.TException { cancelProcess_result result = new cancelProcess_result(); receiveBase(result, "cancelProcess"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelProcess 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 getGFACServiceVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); getGFACServiceVersion_call method_call = new getGFACServiceVersion_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getGFACServiceVersion_call extends org.apache.thrift.async.TAsyncMethodCall { public getGFACServiceVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getGFACServiceVersion", org.apache.thrift.protocol.TMessageType.CALL, 0)); getGFACServiceVersion_args args = new getGFACServiceVersion_args(); args.write(prot); prot.writeMessageEnd(); } public String getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_getGFACServiceVersion(); } } public void submitProcess(String processId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); submitProcess_call method_call = new submitProcess_call(processId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class submitProcess_call extends org.apache.thrift.async.TAsyncMethodCall { private String processId; private String gatewayId; private String tokenId; public submitProcess_call(String processId, String gatewayId, String tokenId, 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.processId = processId; this.gatewayId = gatewayId; this.tokenId = tokenId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitProcess", org.apache.thrift.protocol.TMessageType.CALL, 0)); submitProcess_args args = new submitProcess_args(); args.setProcessId(processId); args.setGatewayId(gatewayId); args.setTokenId(tokenId); args.write(prot); prot.writeMessageEnd(); } public boolean 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_submitProcess(); } } public void cancelProcess(String processId, String gatewayId, String tokenId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); cancelProcess_call method_call = new cancelProcess_call(processId, gatewayId, tokenId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class cancelProcess_call extends org.apache.thrift.async.TAsyncMethodCall { private String processId; private String gatewayId; private String tokenId; public cancelProcess_call(String processId, String gatewayId, String tokenId, 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.processId = processId; this.gatewayId = gatewayId; this.tokenId = tokenId; } public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelProcess", org.apache.thrift.protocol.TMessageType.CALL, 0)); cancelProcess_args args = new cancelProcess_args(); args.setProcessId(processId); args.setGatewayId(gatewayId); args.setTokenId(tokenId); args.write(prot); prot.writeMessageEnd(); } public boolean 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_cancelProcess(); } } } 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("getGFACServiceVersion", new getGFACServiceVersion()); processMap.put("submitProcess", new submitProcess()); processMap.put("cancelProcess", new cancelProcess()); return processMap; } public static class getGFACServiceVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getGFACServiceVersion_args> { public getGFACServiceVersion() { super("getGFACServiceVersion"); } public getGFACServiceVersion_args getEmptyArgsInstance() { return new getGFACServiceVersion_args(); } protected boolean isOneway() { return false; } public getGFACServiceVersion_result getResult(I iface, getGFACServiceVersion_args args) throws org.apache.thrift.TException { getGFACServiceVersion_result result = new getGFACServiceVersion_result(); result.success = iface.getGFACServiceVersion(); return result; } } public static class submitProcess<I extends Iface> extends org.apache.thrift.ProcessFunction<I, submitProcess_args> { public submitProcess() { super("submitProcess"); } public submitProcess_args getEmptyArgsInstance() { return new submitProcess_args(); } protected boolean isOneway() { return false; } public submitProcess_result getResult(I iface, submitProcess_args args) throws org.apache.thrift.TException { submitProcess_result result = new submitProcess_result(); result.success = iface.submitProcess(args.processId, args.gatewayId, args.tokenId); result.setSuccessIsSet(true); return result; } } public static class cancelProcess<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelProcess_args> { public cancelProcess() { super("cancelProcess"); } public cancelProcess_args getEmptyArgsInstance() { return new cancelProcess_args(); } protected boolean isOneway() { return false; } public cancelProcess_result getResult(I iface, cancelProcess_args args) throws org.apache.thrift.TException { cancelProcess_result result = new cancelProcess_result(); result.success = iface.cancelProcess(args.processId, args.gatewayId, args.tokenId); result.setSuccessIsSet(true); 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("getGFACServiceVersion", new getGFACServiceVersion()); processMap.put("submitProcess", new submitProcess()); processMap.put("cancelProcess", new cancelProcess()); return processMap; } public static class getGFACServiceVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getGFACServiceVersion_args, String> { public getGFACServiceVersion() { super("getGFACServiceVersion"); } public getGFACServiceVersion_args getEmptyArgsInstance() { return new getGFACServiceVersion_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) { getGFACServiceVersion_result result = new getGFACServiceVersion_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; getGFACServiceVersion_result result = new getGFACServiceVersion_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, getGFACServiceVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException { iface.getGFACServiceVersion(resultHandler); } } public static class submitProcess<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitProcess_args, Boolean> { public submitProcess() { super("submitProcess"); } public submitProcess_args getEmptyArgsInstance() { return new submitProcess_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { submitProcess_result result = new submitProcess_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; submitProcess_result result = new submitProcess_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, submitProcess_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.submitProcess(args.processId, args.gatewayId, args.tokenId,resultHandler); } } public static class cancelProcess<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelProcess_args, Boolean> { public cancelProcess() { super("cancelProcess"); } public cancelProcess_args getEmptyArgsInstance() { return new cancelProcess_args(); } public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Boolean>() { public void onComplete(Boolean o) { cancelProcess_result result = new cancelProcess_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; cancelProcess_result result = new cancelProcess_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, cancelProcess_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { iface.cancelProcess(args.processId, args.gatewayId, args.tokenId,resultHandler); } } } public static class getGFACServiceVersion_args implements org.apache.thrift.TBase<getGFACServiceVersion_args, getGFACServiceVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_args"); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new getGFACServiceVersion_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new getGFACServiceVersion_argsTupleSchemeFactory()); } /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getGFACServiceVersion_args.class, metaDataMap); } public getGFACServiceVersion_args() { } /** * Performs a deep copy on <i>other</i>. */ public getGFACServiceVersion_args(getGFACServiceVersion_args other) { } public getGFACServiceVersion_args deepCopy() { return new getGFACServiceVersion_args(this); } @Override public void clear() { } public void setFieldValue(_Fields field, Object value) { switch (field) { } } public Object getFieldValue(_Fields field) { switch (field) { } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof getGFACServiceVersion_args) return this.equals((getGFACServiceVersion_args)that); return false; } public boolean equals(getGFACServiceVersion_args that) { if (that == null) return false; return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); return list.hashCode(); } @Override public int compareTo(getGFACServiceVersion_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("getGFACServiceVersion_args("); boolean first = true; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class getGFACServiceVersion_argsStandardSchemeFactory implements SchemeFactory { public getGFACServiceVersion_argsStandardScheme getScheme() { return new getGFACServiceVersion_argsStandardScheme(); } } private static class getGFACServiceVersion_argsStandardScheme extends StandardScheme<getGFACServiceVersion_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class getGFACServiceVersion_argsTupleSchemeFactory implements SchemeFactory { public getGFACServiceVersion_argsTupleScheme getScheme() { return new getGFACServiceVersion_argsTupleScheme(); } } private static class getGFACServiceVersion_argsTupleScheme extends TupleScheme<getGFACServiceVersion_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; } } } public static class getGFACServiceVersion_result implements org.apache.thrift.TBase<getGFACServiceVersion_result, getGFACServiceVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getGFACServiceVersion_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getGFACServiceVersion_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 getGFACServiceVersion_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new getGFACServiceVersion_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(getGFACServiceVersion_result.class, metaDataMap); } public getGFACServiceVersion_result() { } public getGFACServiceVersion_result( String success) { this(); this.success = success; } /** * Performs a deep copy on <i>other</i>. */ public getGFACServiceVersion_result(getGFACServiceVersion_result other) { if (other.isSetSuccess()) { this.success = other.success; } } public getGFACServiceVersion_result deepCopy() { return new getGFACServiceVersion_result(this); } @Override public void clear() { this.success = null; } public String getSuccess() { return this.success; } public getGFACServiceVersion_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 getGFACServiceVersion_result) return this.equals((getGFACServiceVersion_result)that); return false; } public boolean equals(getGFACServiceVersion_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(getGFACServiceVersion_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("getGFACServiceVersion_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 getGFACServiceVersion_resultStandardSchemeFactory implements SchemeFactory { public getGFACServiceVersion_resultStandardScheme getScheme() { return new getGFACServiceVersion_resultStandardScheme(); } } private static class getGFACServiceVersion_resultStandardScheme extends StandardScheme<getGFACServiceVersion_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, getGFACServiceVersion_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, getGFACServiceVersion_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 getGFACServiceVersion_resultTupleSchemeFactory implements SchemeFactory { public getGFACServiceVersion_resultTupleScheme getScheme() { return new getGFACServiceVersion_resultTupleScheme(); } } private static class getGFACServiceVersion_resultTupleScheme extends TupleScheme<getGFACServiceVersion_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, getGFACServiceVersion_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, getGFACServiceVersion_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 submitProcess_args implements org.apache.thrift.TBase<submitProcess_args, submitProcess_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitProcess_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitProcess_args"); private static final org.apache.thrift.protocol.TField PROCESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("processId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new submitProcess_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new submitProcess_argsTupleSchemeFactory()); } public String processId; // required public String gatewayId; // required public String tokenId; // 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 { PROCESS_ID((short)1, "processId"), GATEWAY_ID((short)2, "gatewayId"), TOKEN_ID((short)3, "tokenId"); 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: // PROCESS_ID return PROCESS_ID; case 2: // GATEWAY_ID return GATEWAY_ID; case 3: // TOKEN_ID return TOKEN_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PROCESS_ID, new org.apache.thrift.meta_data.FieldMetaData("processId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitProcess_args.class, metaDataMap); } public submitProcess_args() { } public submitProcess_args( String processId, String gatewayId, String tokenId) { this(); this.processId = processId; this.gatewayId = gatewayId; this.tokenId = tokenId; } /** * Performs a deep copy on <i>other</i>. */ public submitProcess_args(submitProcess_args other) { if (other.isSetProcessId()) { this.processId = other.processId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } if (other.isSetTokenId()) { this.tokenId = other.tokenId; } } public submitProcess_args deepCopy() { return new submitProcess_args(this); } @Override public void clear() { this.processId = null; this.gatewayId = null; this.tokenId = null; } public String getProcessId() { return this.processId; } public submitProcess_args setProcessId(String processId) { this.processId = processId; return this; } public void unsetProcessId() { this.processId = null; } /** Returns true if field processId is set (has been assigned a value) and false otherwise */ public boolean isSetProcessId() { return this.processId != null; } public void setProcessIdIsSet(boolean value) { if (!value) { this.processId = null; } } public String getGatewayId() { return this.gatewayId; } public submitProcess_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 getTokenId() { return this.tokenId; } public submitProcess_args setTokenId(String tokenId) { this.tokenId = tokenId; return this; } public void unsetTokenId() { this.tokenId = null; } /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */ public boolean isSetTokenId() { return this.tokenId != null; } public void setTokenIdIsSet(boolean value) { if (!value) { this.tokenId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PROCESS_ID: if (value == null) { unsetProcessId(); } else { setProcessId((String)value); } break; case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; case TOKEN_ID: if (value == null) { unsetTokenId(); } else { setTokenId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PROCESS_ID: return getProcessId(); case GATEWAY_ID: return getGatewayId(); case TOKEN_ID: return getTokenId(); } 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 PROCESS_ID: return isSetProcessId(); case GATEWAY_ID: return isSetGatewayId(); case TOKEN_ID: return isSetTokenId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof submitProcess_args) return this.equals((submitProcess_args)that); return false; } public boolean equals(submitProcess_args that) { if (that == null) return false; boolean this_present_processId = true && this.isSetProcessId(); boolean that_present_processId = true && that.isSetProcessId(); if (this_present_processId || that_present_processId) { if (!(this_present_processId && that_present_processId)) return false; if (!this.processId.equals(that.processId)) 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_tokenId = true && this.isSetTokenId(); boolean that_present_tokenId = true && that.isSetTokenId(); if (this_present_tokenId || that_present_tokenId) { if (!(this_present_tokenId && that_present_tokenId)) return false; if (!this.tokenId.equals(that.tokenId)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_processId = true && (isSetProcessId()); list.add(present_processId); if (present_processId) list.add(processId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) list.add(tokenId); return list.hashCode(); } @Override public int compareTo(submitProcess_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetProcessId()).compareTo(other.isSetProcessId()); if (lastComparison != 0) { return lastComparison; } if (isSetProcessId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processId, other.processId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; } if (isSetGatewayId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId()); if (lastComparison != 0) { return lastComparison; } if (isSetTokenId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId); if (lastComparison != 0) { return lastComparison; } } 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("submitProcess_args("); boolean first = true; sb.append("processId:"); if (this.processId == null) { sb.append("null"); } else { sb.append(this.processId); } first = false; if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); } else { sb.append(this.gatewayId); } first = false; if (!first) sb.append(", "); sb.append("tokenId:"); if (this.tokenId == null) { sb.append("null"); } else { sb.append(this.tokenId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (processId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'processId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' 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 submitProcess_argsStandardSchemeFactory implements SchemeFactory { public submitProcess_argsStandardScheme getScheme() { return new submitProcess_argsStandardScheme(); } } private static class submitProcess_argsStandardScheme extends StandardScheme<submitProcess_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, submitProcess_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: // PROCESS_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.processId = iprot.readString(); struct.setProcessIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TOKEN_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; 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, submitProcess_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.processId != null) { oprot.writeFieldBegin(PROCESS_ID_FIELD_DESC); oprot.writeString(struct.processId); oprot.writeFieldEnd(); } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } if (struct.tokenId != null) { oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC); oprot.writeString(struct.tokenId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class submitProcess_argsTupleSchemeFactory implements SchemeFactory { public submitProcess_argsTupleScheme getScheme() { return new submitProcess_argsTupleScheme(); } } private static class submitProcess_argsTupleScheme extends TupleScheme<submitProcess_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, submitProcess_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.processId); oprot.writeString(struct.gatewayId); oprot.writeString(struct.tokenId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, submitProcess_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.processId = iprot.readString(); struct.setProcessIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); } } } public static class submitProcess_result implements org.apache.thrift.TBase<submitProcess_result, submitProcess_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitProcess_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitProcess_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new submitProcess_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new submitProcess_resultTupleSchemeFactory()); } public boolean 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitProcess_result.class, metaDataMap); } public submitProcess_result() { } public submitProcess_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public submitProcess_result(submitProcess_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public submitProcess_result deepCopy() { return new submitProcess_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public submitProcess_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); } 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 submitProcess_result) return this.equals((submitProcess_result)that); return false; } public boolean equals(submitProcess_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(submitProcess_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("submitProcess_result("); boolean first = true; sb.append("success:"); 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 { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class submitProcess_resultStandardSchemeFactory implements SchemeFactory { public submitProcess_resultStandardScheme getScheme() { return new submitProcess_resultStandardScheme(); } } private static class submitProcess_resultStandardScheme extends StandardScheme<submitProcess_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, submitProcess_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; 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, submitProcess_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class submitProcess_resultTupleSchemeFactory implements SchemeFactory { public submitProcess_resultTupleScheme getScheme() { return new submitProcess_resultTupleScheme(); } } private static class submitProcess_resultTupleScheme extends TupleScheme<submitProcess_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, submitProcess_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.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, submitProcess_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } public static class cancelProcess_args implements org.apache.thrift.TBase<cancelProcess_args, cancelProcess_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelProcess_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelProcess_args"); private static final org.apache.thrift.protocol.TField PROCESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("processId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField TOKEN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenId", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new cancelProcess_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new cancelProcess_argsTupleSchemeFactory()); } public String processId; // required public String gatewayId; // required public String tokenId; // 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 { PROCESS_ID((short)1, "processId"), GATEWAY_ID((short)2, "gatewayId"), TOKEN_ID((short)3, "tokenId"); 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: // PROCESS_ID return PROCESS_ID; case 2: // GATEWAY_ID return GATEWAY_ID; case 3: // TOKEN_ID return TOKEN_ID; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PROCESS_ID, new org.apache.thrift.meta_data.FieldMetaData("processId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TOKEN_ID, new org.apache.thrift.meta_data.FieldMetaData("tokenId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelProcess_args.class, metaDataMap); } public cancelProcess_args() { } public cancelProcess_args( String processId, String gatewayId, String tokenId) { this(); this.processId = processId; this.gatewayId = gatewayId; this.tokenId = tokenId; } /** * Performs a deep copy on <i>other</i>. */ public cancelProcess_args(cancelProcess_args other) { if (other.isSetProcessId()) { this.processId = other.processId; } if (other.isSetGatewayId()) { this.gatewayId = other.gatewayId; } if (other.isSetTokenId()) { this.tokenId = other.tokenId; } } public cancelProcess_args deepCopy() { return new cancelProcess_args(this); } @Override public void clear() { this.processId = null; this.gatewayId = null; this.tokenId = null; } public String getProcessId() { return this.processId; } public cancelProcess_args setProcessId(String processId) { this.processId = processId; return this; } public void unsetProcessId() { this.processId = null; } /** Returns true if field processId is set (has been assigned a value) and false otherwise */ public boolean isSetProcessId() { return this.processId != null; } public void setProcessIdIsSet(boolean value) { if (!value) { this.processId = null; } } public String getGatewayId() { return this.gatewayId; } public cancelProcess_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 getTokenId() { return this.tokenId; } public cancelProcess_args setTokenId(String tokenId) { this.tokenId = tokenId; return this; } public void unsetTokenId() { this.tokenId = null; } /** Returns true if field tokenId is set (has been assigned a value) and false otherwise */ public boolean isSetTokenId() { return this.tokenId != null; } public void setTokenIdIsSet(boolean value) { if (!value) { this.tokenId = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case PROCESS_ID: if (value == null) { unsetProcessId(); } else { setProcessId((String)value); } break; case GATEWAY_ID: if (value == null) { unsetGatewayId(); } else { setGatewayId((String)value); } break; case TOKEN_ID: if (value == null) { unsetTokenId(); } else { setTokenId((String)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case PROCESS_ID: return getProcessId(); case GATEWAY_ID: return getGatewayId(); case TOKEN_ID: return getTokenId(); } 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 PROCESS_ID: return isSetProcessId(); case GATEWAY_ID: return isSetGatewayId(); case TOKEN_ID: return isSetTokenId(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof cancelProcess_args) return this.equals((cancelProcess_args)that); return false; } public boolean equals(cancelProcess_args that) { if (that == null) return false; boolean this_present_processId = true && this.isSetProcessId(); boolean that_present_processId = true && that.isSetProcessId(); if (this_present_processId || that_present_processId) { if (!(this_present_processId && that_present_processId)) return false; if (!this.processId.equals(that.processId)) 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_tokenId = true && this.isSetTokenId(); boolean that_present_tokenId = true && that.isSetTokenId(); if (this_present_tokenId || that_present_tokenId) { if (!(this_present_tokenId && that_present_tokenId)) return false; if (!this.tokenId.equals(that.tokenId)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_processId = true && (isSetProcessId()); list.add(present_processId); if (present_processId) list.add(processId); boolean present_gatewayId = true && (isSetGatewayId()); list.add(present_gatewayId); if (present_gatewayId) list.add(gatewayId); boolean present_tokenId = true && (isSetTokenId()); list.add(present_tokenId); if (present_tokenId) list.add(tokenId); return list.hashCode(); } @Override public int compareTo(cancelProcess_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetProcessId()).compareTo(other.isSetProcessId()); if (lastComparison != 0) { return lastComparison; } if (isSetProcessId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processId, other.processId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId()); if (lastComparison != 0) { return lastComparison; } if (isSetGatewayId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTokenId()).compareTo(other.isSetTokenId()); if (lastComparison != 0) { return lastComparison; } if (isSetTokenId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenId, other.tokenId); if (lastComparison != 0) { return lastComparison; } } 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("cancelProcess_args("); boolean first = true; sb.append("processId:"); if (this.processId == null) { sb.append("null"); } else { sb.append(this.processId); } first = false; if (!first) sb.append(", "); sb.append("gatewayId:"); if (this.gatewayId == null) { sb.append("null"); } else { sb.append(this.gatewayId); } first = false; if (!first) sb.append(", "); sb.append("tokenId:"); if (this.tokenId == null) { sb.append("null"); } else { sb.append(this.tokenId); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (processId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'processId' was not present! Struct: " + toString()); } if (gatewayId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString()); } if (tokenId == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'tokenId' 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 cancelProcess_argsStandardSchemeFactory implements SchemeFactory { public cancelProcess_argsStandardScheme getScheme() { return new cancelProcess_argsStandardScheme(); } } private static class cancelProcess_argsStandardScheme extends StandardScheme<cancelProcess_args> { public void read(org.apache.thrift.protocol.TProtocol iprot, cancelProcess_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: // PROCESS_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.processId = iprot.readString(); struct.setProcessIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // GATEWAY_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // TOKEN_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; 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, cancelProcess_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.processId != null) { oprot.writeFieldBegin(PROCESS_ID_FIELD_DESC); oprot.writeString(struct.processId); oprot.writeFieldEnd(); } if (struct.gatewayId != null) { oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC); oprot.writeString(struct.gatewayId); oprot.writeFieldEnd(); } if (struct.tokenId != null) { oprot.writeFieldBegin(TOKEN_ID_FIELD_DESC); oprot.writeString(struct.tokenId); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class cancelProcess_argsTupleSchemeFactory implements SchemeFactory { public cancelProcess_argsTupleScheme getScheme() { return new cancelProcess_argsTupleScheme(); } } private static class cancelProcess_argsTupleScheme extends TupleScheme<cancelProcess_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancelProcess_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.processId); oprot.writeString(struct.gatewayId); oprot.writeString(struct.tokenId); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, cancelProcess_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.processId = iprot.readString(); struct.setProcessIdIsSet(true); struct.gatewayId = iprot.readString(); struct.setGatewayIdIsSet(true); struct.tokenId = iprot.readString(); struct.setTokenIdIsSet(true); } } } public static class cancelProcess_result implements org.apache.thrift.TBase<cancelProcess_result, cancelProcess_result._Fields>, java.io.Serializable, Cloneable, Comparable<cancelProcess_result> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelProcess_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new cancelProcess_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new cancelProcess_resultTupleSchemeFactory()); } public boolean 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 private static final int __SUCCESS_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelProcess_result.class, metaDataMap); } public cancelProcess_result() { } public cancelProcess_result( boolean success) { this(); this.success = success; setSuccessIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public cancelProcess_result(cancelProcess_result other) { __isset_bitfield = other.__isset_bitfield; this.success = other.success; } public cancelProcess_result deepCopy() { return new cancelProcess_result(this); } @Override public void clear() { setSuccessIsSet(false); this.success = false; } public boolean isSuccess() { return this.success; } public cancelProcess_result setSuccess(boolean success) { this.success = success; setSuccessIsSet(true); return this; } public void unsetSuccess() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); } public void setSuccessIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((Boolean)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return isSuccess(); } 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 cancelProcess_result) return this.equals((cancelProcess_result)that); return false; } public boolean equals(cancelProcess_result that) { if (that == null) return false; boolean this_present_success = true; boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (this.success != that.success) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true; list.add(present_success); if (present_success) list.add(success); return list.hashCode(); } @Override public int compareTo(cancelProcess_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("cancelProcess_result("); boolean first = true; sb.append("success:"); 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 { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class cancelProcess_resultStandardSchemeFactory implements SchemeFactory { public cancelProcess_resultStandardScheme getScheme() { return new cancelProcess_resultStandardScheme(); } } private static class cancelProcess_resultStandardScheme extends StandardScheme<cancelProcess_result> { public void read(org.apache.thrift.protocol.TProtocol iprot, cancelProcess_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; 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, cancelProcess_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeBool(struct.success); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class cancelProcess_resultTupleSchemeFactory implements SchemeFactory { public cancelProcess_resultTupleScheme getScheme() { return new cancelProcess_resultTupleScheme(); } } private static class cancelProcess_resultTupleScheme extends TupleScheme<cancelProcess_result> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, cancelProcess_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.writeBool(struct.success); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, cancelProcess_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = iprot.readBool(); struct.setSuccessIsSet(true); } } } } }