blob: e47749de3a19fe7f39e4905de9ef04b9d60b57f9 [file] [log] [blame]
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.orchestrator.cpi;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class OrchestratorService {
public interface Iface extends org.apache.airavata.base.api.BaseAPI.Iface {
/**
* * After creating the experiment Data user have the
* * experimentID as the handler to the experiment, during the launchExperiment
* * We just have to give the experimentID
* *
* * @param experimentID
* * @return sucess/failure
* *
* *
*
* @param experimentId
* @param gatewayId
*/
public boolean launchExperiment(java.lang.String experimentId, java.lang.String gatewayId) throws org.apache.thrift.TException;
/**
* * In order to run single applications users should create an associating
* * process and hand it over for execution
* * along with a credential store token for sshKeyAuthentication
* *
* * @param processId
* * @param airavataCredStoreToken
* * @return sucess/failure
* *
* *
*
* @param processId
* @param airavataCredStoreToken
* @param gatewayId
*/
public boolean launchProcess(java.lang.String processId, java.lang.String airavataCredStoreToken, java.lang.String gatewayId) throws org.apache.thrift.TException;
/**
* *
* * Validate funcations which can verify if the experiment is ready to be launced.
* *
* * @param experimentID
* * @return sucess/failure
* *
* *
*
* @param experimentId
*/
public boolean validateExperiment(java.lang.String experimentId) throws org.apache.airavata.model.error.LaunchValidationException, org.apache.thrift.TException;
public boolean validateProcess(java.lang.String experimentId, java.util.List<org.apache.airavata.model.process.ProcessModel> processes) throws org.apache.airavata.model.error.LaunchValidationException, org.apache.thrift.TException;
/**
* *
* * Terminate the running experiment.
* *
* * @param experimentID
* * @return sucess/failure
* *
* *
*
* @param experimentId
* @param gatewayId
*/
public boolean terminateExperiment(java.lang.String experimentId, java.lang.String gatewayId) throws org.apache.thrift.TException;
}
public interface AsyncIface extends org.apache.airavata.base.api.BaseAPI .AsyncIface {
public void launchExperiment(java.lang.String experimentId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void launchProcess(java.lang.String processId, java.lang.String airavataCredStoreToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void validateExperiment(java.lang.String experimentId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void validateProcess(java.lang.String experimentId, java.util.List<org.apache.airavata.model.process.ProcessModel> processes, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
public void terminateExperiment(java.lang.String experimentId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.airavata.base.api.BaseAPI.Client implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public boolean launchExperiment(java.lang.String experimentId, java.lang.String gatewayId) throws org.apache.thrift.TException
{
send_launchExperiment(experimentId, gatewayId);
return recv_launchExperiment();
}
public void send_launchExperiment(java.lang.String experimentId, java.lang.String gatewayId) throws org.apache.thrift.TException
{
launchExperiment_args args = new launchExperiment_args();
args.setExperimentId(experimentId);
args.setGatewayId(gatewayId);
sendBase("launchExperiment", args);
}
public boolean recv_launchExperiment() throws org.apache.thrift.TException
{
launchExperiment_result result = new launchExperiment_result();
receiveBase(result, "launchExperiment");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "launchExperiment failed: unknown result");
}
public boolean launchProcess(java.lang.String processId, java.lang.String airavataCredStoreToken, java.lang.String gatewayId) throws org.apache.thrift.TException
{
send_launchProcess(processId, airavataCredStoreToken, gatewayId);
return recv_launchProcess();
}
public void send_launchProcess(java.lang.String processId, java.lang.String airavataCredStoreToken, java.lang.String gatewayId) throws org.apache.thrift.TException
{
launchProcess_args args = new launchProcess_args();
args.setProcessId(processId);
args.setAiravataCredStoreToken(airavataCredStoreToken);
args.setGatewayId(gatewayId);
sendBase("launchProcess", args);
}
public boolean recv_launchProcess() throws org.apache.thrift.TException
{
launchProcess_result result = new launchProcess_result();
receiveBase(result, "launchProcess");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "launchProcess failed: unknown result");
}
public boolean validateExperiment(java.lang.String experimentId) throws org.apache.airavata.model.error.LaunchValidationException, org.apache.thrift.TException
{
send_validateExperiment(experimentId);
return recv_validateExperiment();
}
public void send_validateExperiment(java.lang.String experimentId) throws org.apache.thrift.TException
{
validateExperiment_args args = new validateExperiment_args();
args.setExperimentId(experimentId);
sendBase("validateExperiment", args);
}
public boolean recv_validateExperiment() throws org.apache.airavata.model.error.LaunchValidationException, org.apache.thrift.TException
{
validateExperiment_result result = new validateExperiment_result();
receiveBase(result, "validateExperiment");
if (result.isSetSuccess()) {
return result.success;
}
if (result.lve != null) {
throw result.lve;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateExperiment failed: unknown result");
}
public boolean validateProcess(java.lang.String experimentId, java.util.List<org.apache.airavata.model.process.ProcessModel> processes) throws org.apache.airavata.model.error.LaunchValidationException, org.apache.thrift.TException
{
send_validateProcess(experimentId, processes);
return recv_validateProcess();
}
public void send_validateProcess(java.lang.String experimentId, java.util.List<org.apache.airavata.model.process.ProcessModel> processes) throws org.apache.thrift.TException
{
validateProcess_args args = new validateProcess_args();
args.setExperimentId(experimentId);
args.setProcesses(processes);
sendBase("validateProcess", args);
}
public boolean recv_validateProcess() throws org.apache.airavata.model.error.LaunchValidationException, org.apache.thrift.TException
{
validateProcess_result result = new validateProcess_result();
receiveBase(result, "validateProcess");
if (result.isSetSuccess()) {
return result.success;
}
if (result.lve != null) {
throw result.lve;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validateProcess failed: unknown result");
}
public boolean terminateExperiment(java.lang.String experimentId, java.lang.String gatewayId) throws org.apache.thrift.TException
{
send_terminateExperiment(experimentId, gatewayId);
return recv_terminateExperiment();
}
public void send_terminateExperiment(java.lang.String experimentId, java.lang.String gatewayId) throws org.apache.thrift.TException
{
terminateExperiment_args args = new terminateExperiment_args();
args.setExperimentId(experimentId);
args.setGatewayId(gatewayId);
sendBase("terminateExperiment", args);
}
public boolean recv_terminateExperiment() throws org.apache.thrift.TException
{
terminateExperiment_result result = new terminateExperiment_result();
receiveBase(result, "terminateExperiment");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "terminateExperiment failed: unknown result");
}
}
public static class AsyncClient extends org.apache.airavata.base.api.BaseAPI.AsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void launchExperiment(java.lang.String experimentId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
launchExperiment_call method_call = new launchExperiment_call(experimentId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class launchExperiment_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private java.lang.String experimentId;
private java.lang.String gatewayId;
public launchExperiment_call(java.lang.String experimentId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.experimentId = experimentId;
this.gatewayId = gatewayId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("launchExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
launchExperiment_args args = new launchExperiment_args();
args.setExperimentId(experimentId);
args.setGatewayId(gatewayId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_launchExperiment();
}
}
public void launchProcess(java.lang.String processId, java.lang.String airavataCredStoreToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
launchProcess_call method_call = new launchProcess_call(processId, airavataCredStoreToken, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class launchProcess_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private java.lang.String processId;
private java.lang.String airavataCredStoreToken;
private java.lang.String gatewayId;
public launchProcess_call(java.lang.String processId, java.lang.String airavataCredStoreToken, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.processId = processId;
this.airavataCredStoreToken = airavataCredStoreToken;
this.gatewayId = gatewayId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("launchProcess", org.apache.thrift.protocol.TMessageType.CALL, 0));
launchProcess_args args = new launchProcess_args();
args.setProcessId(processId);
args.setAiravataCredStoreToken(airavataCredStoreToken);
args.setGatewayId(gatewayId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_launchProcess();
}
}
public void validateExperiment(java.lang.String experimentId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
validateExperiment_call method_call = new validateExperiment_call(experimentId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class validateExperiment_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private java.lang.String experimentId;
public validateExperiment_call(java.lang.String experimentId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.experimentId = experimentId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
validateExperiment_args args = new validateExperiment_args();
args.setExperimentId(experimentId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.model.error.LaunchValidationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_validateExperiment();
}
}
public void validateProcess(java.lang.String experimentId, java.util.List<org.apache.airavata.model.process.ProcessModel> processes, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
validateProcess_call method_call = new validateProcess_call(experimentId, processes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class validateProcess_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private java.lang.String experimentId;
private java.util.List<org.apache.airavata.model.process.ProcessModel> processes;
public validateProcess_call(java.lang.String experimentId, java.util.List<org.apache.airavata.model.process.ProcessModel> processes, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.experimentId = experimentId;
this.processes = processes;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validateProcess", org.apache.thrift.protocol.TMessageType.CALL, 0));
validateProcess_args args = new validateProcess_args();
args.setExperimentId(experimentId);
args.setProcesses(processes);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.airavata.model.error.LaunchValidationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_validateProcess();
}
}
public void terminateExperiment(java.lang.String experimentId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
terminateExperiment_call method_call = new terminateExperiment_call(experimentId, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class terminateExperiment_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
private java.lang.String experimentId;
private java.lang.String gatewayId;
public terminateExperiment_call(java.lang.String experimentId, java.lang.String gatewayId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.experimentId = experimentId;
this.gatewayId = gatewayId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("terminateExperiment", org.apache.thrift.protocol.TMessageType.CALL, 0));
terminateExperiment_args args = new terminateExperiment_args();
args.setExperimentId(experimentId);
args.setGatewayId(gatewayId);
args.write(prot);
prot.writeMessageEnd();
}
public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_terminateExperiment();
}
}
}
public static class Processor<I extends Iface> extends org.apache.airavata.base.api.BaseAPI.Processor<I> implements org.apache.thrift.TProcessor {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("launchExperiment", new launchExperiment());
processMap.put("launchProcess", new launchProcess());
processMap.put("validateExperiment", new validateExperiment());
processMap.put("validateProcess", new validateProcess());
processMap.put("terminateExperiment", new terminateExperiment());
return processMap;
}
public static class launchExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, launchExperiment_args> {
public launchExperiment() {
super("launchExperiment");
}
public launchExperiment_args getEmptyArgsInstance() {
return new launchExperiment_args();
}
protected boolean isOneway() {
return false;
}
public launchExperiment_result getResult(I iface, launchExperiment_args args) throws org.apache.thrift.TException {
launchExperiment_result result = new launchExperiment_result();
result.success = iface.launchExperiment(args.experimentId, args.gatewayId);
result.setSuccessIsSet(true);
return result;
}
}
public static class launchProcess<I extends Iface> extends org.apache.thrift.ProcessFunction<I, launchProcess_args> {
public launchProcess() {
super("launchProcess");
}
public launchProcess_args getEmptyArgsInstance() {
return new launchProcess_args();
}
protected boolean isOneway() {
return false;
}
public launchProcess_result getResult(I iface, launchProcess_args args) throws org.apache.thrift.TException {
launchProcess_result result = new launchProcess_result();
result.success = iface.launchProcess(args.processId, args.airavataCredStoreToken, args.gatewayId);
result.setSuccessIsSet(true);
return result;
}
}
public static class validateExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validateExperiment_args> {
public validateExperiment() {
super("validateExperiment");
}
public validateExperiment_args getEmptyArgsInstance() {
return new validateExperiment_args();
}
protected boolean isOneway() {
return false;
}
public validateExperiment_result getResult(I iface, validateExperiment_args args) throws org.apache.thrift.TException {
validateExperiment_result result = new validateExperiment_result();
try {
result.success = iface.validateExperiment(args.experimentId);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.model.error.LaunchValidationException lve) {
result.lve = lve;
}
return result;
}
}
public static class validateProcess<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validateProcess_args> {
public validateProcess() {
super("validateProcess");
}
public validateProcess_args getEmptyArgsInstance() {
return new validateProcess_args();
}
protected boolean isOneway() {
return false;
}
public validateProcess_result getResult(I iface, validateProcess_args args) throws org.apache.thrift.TException {
validateProcess_result result = new validateProcess_result();
try {
result.success = iface.validateProcess(args.experimentId, args.processes);
result.setSuccessIsSet(true);
} catch (org.apache.airavata.model.error.LaunchValidationException lve) {
result.lve = lve;
}
return result;
}
}
public static class terminateExperiment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, terminateExperiment_args> {
public terminateExperiment() {
super("terminateExperiment");
}
public terminateExperiment_args getEmptyArgsInstance() {
return new terminateExperiment_args();
}
protected boolean isOneway() {
return false;
}
public terminateExperiment_result getResult(I iface, terminateExperiment_args args) throws org.apache.thrift.TException {
terminateExperiment_result result = new terminateExperiment_result();
result.success = iface.terminateExperiment(args.experimentId, args.gatewayId);
result.setSuccessIsSet(true);
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.airavata.base.api.BaseAPI.AsyncProcessor<I> {
private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("launchExperiment", new launchExperiment());
processMap.put("launchProcess", new launchProcess());
processMap.put("validateExperiment", new validateExperiment());
processMap.put("validateProcess", new validateProcess());
processMap.put("terminateExperiment", new terminateExperiment());
return processMap;
}
public static class launchExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, launchExperiment_args, java.lang.Boolean> {
public launchExperiment() {
super("launchExperiment");
}
public launchExperiment_args getEmptyArgsInstance() {
return new launchExperiment_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
launchExperiment_result result = new launchExperiment_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
launchExperiment_result result = new launchExperiment_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, launchExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.launchExperiment(args.experimentId, args.gatewayId,resultHandler);
}
}
public static class launchProcess<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, launchProcess_args, java.lang.Boolean> {
public launchProcess() {
super("launchProcess");
}
public launchProcess_args getEmptyArgsInstance() {
return new launchProcess_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
launchProcess_result result = new launchProcess_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
launchProcess_result result = new launchProcess_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, launchProcess_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.launchProcess(args.processId, args.airavataCredStoreToken, args.gatewayId,resultHandler);
}
}
public static class validateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, validateExperiment_args, java.lang.Boolean> {
public validateExperiment() {
super("validateExperiment");
}
public validateExperiment_args getEmptyArgsInstance() {
return new validateExperiment_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
validateExperiment_result result = new validateExperiment_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
validateExperiment_result result = new validateExperiment_result();
if (e instanceof org.apache.airavata.model.error.LaunchValidationException) {
result.lve = (org.apache.airavata.model.error.LaunchValidationException) e;
result.setLveIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, validateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.validateExperiment(args.experimentId,resultHandler);
}
}
public static class validateProcess<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, validateProcess_args, java.lang.Boolean> {
public validateProcess() {
super("validateProcess");
}
public validateProcess_args getEmptyArgsInstance() {
return new validateProcess_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
validateProcess_result result = new validateProcess_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
validateProcess_result result = new validateProcess_result();
if (e instanceof org.apache.airavata.model.error.LaunchValidationException) {
result.lve = (org.apache.airavata.model.error.LaunchValidationException) e;
result.setLveIsSet(true);
msg = result;
} else if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, validateProcess_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.validateProcess(args.experimentId, args.processes,resultHandler);
}
}
public static class terminateExperiment<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, terminateExperiment_args, java.lang.Boolean> {
public terminateExperiment() {
super("terminateExperiment");
}
public terminateExperiment_args getEmptyArgsInstance() {
return new terminateExperiment_args();
}
public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
public void onComplete(java.lang.Boolean o) {
terminateExperiment_result result = new terminateExperiment_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
terminateExperiment_result result = new terminateExperiment_result();
if (e instanceof org.apache.thrift.transport.TTransportException) {
_LOGGER.error("TTransportException inside handler", e);
fb.close();
return;
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TApplicationException)e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
} catch (java.lang.Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
}
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, terminateExperiment_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.terminateExperiment(args.experimentId, args.gatewayId,resultHandler);
}
}
}
public static class launchExperiment_args implements org.apache.thrift.TBase<launchExperiment_args, launchExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<launchExperiment_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchExperiment_args");
private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new launchExperiment_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new launchExperiment_argsTupleSchemeFactory();
public java.lang.String experimentId; // required
public java.lang.String gatewayId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXPERIMENT_ID((short)1, "experimentId"),
GATEWAY_ID((short)2, "gatewayId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EXPERIMENT_ID
return EXPERIMENT_ID;
case 2: // GATEWAY_ID
return GATEWAY_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchExperiment_args.class, metaDataMap);
}
public launchExperiment_args() {
}
public launchExperiment_args(
java.lang.String experimentId,
java.lang.String gatewayId)
{
this();
this.experimentId = experimentId;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public launchExperiment_args(launchExperiment_args other) {
if (other.isSetExperimentId()) {
this.experimentId = other.experimentId;
}
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
}
public launchExperiment_args deepCopy() {
return new launchExperiment_args(this);
}
@Override
public void clear() {
this.experimentId = null;
this.gatewayId = null;
}
public java.lang.String getExperimentId() {
return this.experimentId;
}
public launchExperiment_args setExperimentId(java.lang.String experimentId) {
this.experimentId = experimentId;
return this;
}
public void unsetExperimentId() {
this.experimentId = null;
}
/** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
public boolean isSetExperimentId() {
return this.experimentId != null;
}
public void setExperimentIdIsSet(boolean value) {
if (!value) {
this.experimentId = null;
}
}
public java.lang.String getGatewayId() {
return this.gatewayId;
}
public launchExperiment_args setGatewayId(java.lang.String gatewayId) {
this.gatewayId = gatewayId;
return this;
}
public void unsetGatewayId() {
this.gatewayId = null;
}
/** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
public boolean isSetGatewayId() {
return this.gatewayId != null;
}
public void setGatewayIdIsSet(boolean value) {
if (!value) {
this.gatewayId = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXPERIMENT_ID:
if (value == null) {
unsetExperimentId();
} else {
setExperimentId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXPERIMENT_ID:
return getExperimentId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EXPERIMENT_ID:
return isSetExperimentId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof launchExperiment_args)
return this.equals((launchExperiment_args)that);
return false;
}
public boolean equals(launchExperiment_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_experimentId = true && this.isSetExperimentId();
boolean that_present_experimentId = true && that.isSetExperimentId();
if (this_present_experimentId || that_present_experimentId) {
if (!(this_present_experimentId && that_present_experimentId))
return false;
if (!this.experimentId.equals(that.experimentId))
return false;
}
boolean this_present_gatewayId = true && this.isSetGatewayId();
boolean that_present_gatewayId = true && that.isSetGatewayId();
if (this_present_gatewayId || that_present_gatewayId) {
if (!(this_present_gatewayId && that_present_gatewayId))
return false;
if (!this.gatewayId.equals(that.gatewayId))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetExperimentId()) ? 131071 : 524287);
if (isSetExperimentId())
hashCode = hashCode * 8191 + experimentId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(launchExperiment_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExperimentId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGatewayId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("launchExperiment_args(");
boolean first = true;
sb.append("experimentId:");
if (this.experimentId == null) {
sb.append("null");
} else {
sb.append(this.experimentId);
}
first = false;
if (!first) sb.append(", ");
sb.append("gatewayId:");
if (this.gatewayId == null) {
sb.append("null");
} else {
sb.append(this.gatewayId);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (experimentId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
}
if (gatewayId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class launchExperiment_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public launchExperiment_argsStandardScheme getScheme() {
return new launchExperiment_argsStandardScheme();
}
}
private static class launchExperiment_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<launchExperiment_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, launchExperiment_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: // EXPERIMENT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // GATEWAY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, launchExperiment_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.experimentId != null) {
oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
oprot.writeString(struct.experimentId);
oprot.writeFieldEnd();
}
if (struct.gatewayId != null) {
oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
oprot.writeString(struct.gatewayId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class launchExperiment_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public launchExperiment_argsTupleScheme getScheme() {
return new launchExperiment_argsTupleScheme();
}
}
private static class launchExperiment_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<launchExperiment_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, launchExperiment_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.experimentId);
oprot.writeString(struct.gatewayId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, launchExperiment_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class launchExperiment_result implements org.apache.thrift.TBase<launchExperiment_result, launchExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<launchExperiment_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchExperiment_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new launchExperiment_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new launchExperiment_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchExperiment_result.class, metaDataMap);
}
public launchExperiment_result() {
}
public launchExperiment_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public launchExperiment_result(launchExperiment_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
public launchExperiment_result deepCopy() {
return new launchExperiment_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public launchExperiment_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof launchExperiment_result)
return this.equals((launchExperiment_result)that);
return false;
}
public boolean equals(launchExperiment_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(launchExperiment_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("launchExperiment_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, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class launchExperiment_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public launchExperiment_resultStandardScheme getScheme() {
return new launchExperiment_resultStandardScheme();
}
}
private static class launchExperiment_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<launchExperiment_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, launchExperiment_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, launchExperiment_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 launchExperiment_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public launchExperiment_resultTupleScheme getScheme() {
return new launchExperiment_resultTupleScheme();
}
}
private static class launchExperiment_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<launchExperiment_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, launchExperiment_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, launchExperiment_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class launchProcess_args implements org.apache.thrift.TBase<launchProcess_args, launchProcess_args._Fields>, java.io.Serializable, Cloneable, Comparable<launchProcess_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchProcess_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 AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataCredStoreToken", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new launchProcess_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new launchProcess_argsTupleSchemeFactory();
public java.lang.String processId; // required
public java.lang.String airavataCredStoreToken; // required
public java.lang.String gatewayId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
PROCESS_ID((short)1, "processId"),
AIRAVATA_CRED_STORE_TOKEN((short)2, "airavataCredStoreToken"),
GATEWAY_ID((short)3, "gatewayId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // PROCESS_ID
return PROCESS_ID;
case 2: // AIRAVATA_CRED_STORE_TOKEN
return AIRAVATA_CRED_STORE_TOKEN;
case 3: // GATEWAY_ID
return GATEWAY_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.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)));
tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchProcess_args.class, metaDataMap);
}
public launchProcess_args() {
}
public launchProcess_args(
java.lang.String processId,
java.lang.String airavataCredStoreToken,
java.lang.String gatewayId)
{
this();
this.processId = processId;
this.airavataCredStoreToken = airavataCredStoreToken;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public launchProcess_args(launchProcess_args other) {
if (other.isSetProcessId()) {
this.processId = other.processId;
}
if (other.isSetAiravataCredStoreToken()) {
this.airavataCredStoreToken = other.airavataCredStoreToken;
}
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
}
public launchProcess_args deepCopy() {
return new launchProcess_args(this);
}
@Override
public void clear() {
this.processId = null;
this.airavataCredStoreToken = null;
this.gatewayId = null;
}
public java.lang.String getProcessId() {
return this.processId;
}
public launchProcess_args setProcessId(java.lang.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 java.lang.String getAiravataCredStoreToken() {
return this.airavataCredStoreToken;
}
public launchProcess_args setAiravataCredStoreToken(java.lang.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 java.lang.String getGatewayId() {
return this.gatewayId;
}
public launchProcess_args setGatewayId(java.lang.String gatewayId) {
this.gatewayId = gatewayId;
return this;
}
public void unsetGatewayId() {
this.gatewayId = null;
}
/** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
public boolean isSetGatewayId() {
return this.gatewayId != null;
}
public void setGatewayIdIsSet(boolean value) {
if (!value) {
this.gatewayId = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case PROCESS_ID:
if (value == null) {
unsetProcessId();
} else {
setProcessId((java.lang.String)value);
}
break;
case AIRAVATA_CRED_STORE_TOKEN:
if (value == null) {
unsetAiravataCredStoreToken();
} else {
setAiravataCredStoreToken((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PROCESS_ID:
return getProcessId();
case AIRAVATA_CRED_STORE_TOKEN:
return getAiravataCredStoreToken();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case PROCESS_ID:
return isSetProcessId();
case AIRAVATA_CRED_STORE_TOKEN:
return isSetAiravataCredStoreToken();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof launchProcess_args)
return this.equals((launchProcess_args)that);
return false;
}
public boolean equals(launchProcess_args that) {
if (that == null)
return false;
if (this == that)
return true;
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_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;
}
boolean this_present_gatewayId = true && this.isSetGatewayId();
boolean that_present_gatewayId = true && that.isSetGatewayId();
if (this_present_gatewayId || that_present_gatewayId) {
if (!(this_present_gatewayId && that_present_gatewayId))
return false;
if (!this.gatewayId.equals(that.gatewayId))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetProcessId()) ? 131071 : 524287);
if (isSetProcessId())
hashCode = hashCode * 8191 + processId.hashCode();
hashCode = hashCode * 8191 + ((isSetAiravataCredStoreToken()) ? 131071 : 524287);
if (isSetAiravataCredStoreToken())
hashCode = hashCode * 8191 + airavataCredStoreToken.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(launchProcess_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.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 = java.lang.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;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGatewayId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("launchProcess_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("airavataCredStoreToken:");
if (this.airavataCredStoreToken == null) {
sb.append("null");
} else {
sb.append(this.airavataCredStoreToken);
}
first = false;
if (!first) sb.append(", ");
sb.append("gatewayId:");
if (this.gatewayId == null) {
sb.append("null");
} else {
sb.append(this.gatewayId);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (processId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'processId' was not present! Struct: " + toString());
}
if (airavataCredStoreToken == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataCredStoreToken' was not present! Struct: " + toString());
}
if (gatewayId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class launchProcess_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public launchProcess_argsStandardScheme getScheme() {
return new launchProcess_argsStandardScheme();
}
}
private static class launchProcess_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<launchProcess_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, launchProcess_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: // 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;
case 3: // GATEWAY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, launchProcess_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.airavataCredStoreToken != null) {
oprot.writeFieldBegin(AIRAVATA_CRED_STORE_TOKEN_FIELD_DESC);
oprot.writeString(struct.airavataCredStoreToken);
oprot.writeFieldEnd();
}
if (struct.gatewayId != null) {
oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
oprot.writeString(struct.gatewayId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class launchProcess_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public launchProcess_argsTupleScheme getScheme() {
return new launchProcess_argsTupleScheme();
}
}
private static class launchProcess_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<launchProcess_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, launchProcess_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.processId);
oprot.writeString(struct.airavataCredStoreToken);
oprot.writeString(struct.gatewayId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, launchProcess_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.processId = iprot.readString();
struct.setProcessIdIsSet(true);
struct.airavataCredStoreToken = iprot.readString();
struct.setAiravataCredStoreTokenIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class launchProcess_result implements org.apache.thrift.TBase<launchProcess_result, launchProcess_result._Fields>, java.io.Serializable, Cloneable, Comparable<launchProcess_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("launchProcess_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new launchProcess_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new launchProcess_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(launchProcess_result.class, metaDataMap);
}
public launchProcess_result() {
}
public launchProcess_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public launchProcess_result(launchProcess_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
public launchProcess_result deepCopy() {
return new launchProcess_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public launchProcess_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof launchProcess_result)
return this.equals((launchProcess_result)that);
return false;
}
public boolean equals(launchProcess_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(launchProcess_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("launchProcess_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, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class launchProcess_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public launchProcess_resultStandardScheme getScheme() {
return new launchProcess_resultStandardScheme();
}
}
private static class launchProcess_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<launchProcess_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, launchProcess_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, launchProcess_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 launchProcess_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public launchProcess_resultTupleScheme getScheme() {
return new launchProcess_resultTupleScheme();
}
}
private static class launchProcess_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<launchProcess_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, launchProcess_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, launchProcess_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class validateExperiment_args implements org.apache.thrift.TBase<validateExperiment_args, validateExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateExperiment_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateExperiment_args");
private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new validateExperiment_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new validateExperiment_argsTupleSchemeFactory();
public java.lang.String experimentId; // 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 {
EXPERIMENT_ID((short)1, "experimentId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EXPERIMENT_ID
return EXPERIMENT_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_args.class, metaDataMap);
}
public validateExperiment_args() {
}
public validateExperiment_args(
java.lang.String experimentId)
{
this();
this.experimentId = experimentId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public validateExperiment_args(validateExperiment_args other) {
if (other.isSetExperimentId()) {
this.experimentId = other.experimentId;
}
}
public validateExperiment_args deepCopy() {
return new validateExperiment_args(this);
}
@Override
public void clear() {
this.experimentId = null;
}
public java.lang.String getExperimentId() {
return this.experimentId;
}
public validateExperiment_args setExperimentId(java.lang.String experimentId) {
this.experimentId = experimentId;
return this;
}
public void unsetExperimentId() {
this.experimentId = null;
}
/** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
public boolean isSetExperimentId() {
return this.experimentId != null;
}
public void setExperimentIdIsSet(boolean value) {
if (!value) {
this.experimentId = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXPERIMENT_ID:
if (value == null) {
unsetExperimentId();
} else {
setExperimentId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXPERIMENT_ID:
return getExperimentId();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EXPERIMENT_ID:
return isSetExperimentId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof validateExperiment_args)
return this.equals((validateExperiment_args)that);
return false;
}
public boolean equals(validateExperiment_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_experimentId = true && this.isSetExperimentId();
boolean that_present_experimentId = true && that.isSetExperimentId();
if (this_present_experimentId || that_present_experimentId) {
if (!(this_present_experimentId && that_present_experimentId))
return false;
if (!this.experimentId.equals(that.experimentId))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetExperimentId()) ? 131071 : 524287);
if (isSetExperimentId())
hashCode = hashCode * 8191 + experimentId.hashCode();
return hashCode;
}
@Override
public int compareTo(validateExperiment_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExperimentId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("validateExperiment_args(");
boolean first = true;
sb.append("experimentId:");
if (this.experimentId == null) {
sb.append("null");
} else {
sb.append(this.experimentId);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (experimentId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class validateExperiment_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public validateExperiment_argsStandardScheme getScheme() {
return new validateExperiment_argsStandardScheme();
}
}
private static class validateExperiment_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<validateExperiment_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_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: // EXPERIMENT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(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, validateExperiment_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.experimentId != null) {
oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
oprot.writeString(struct.experimentId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class validateExperiment_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public validateExperiment_argsTupleScheme getScheme() {
return new validateExperiment_argsTupleScheme();
}
}
private static class validateExperiment_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<validateExperiment_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, validateExperiment_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.experimentId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, validateExperiment_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class validateExperiment_result implements org.apache.thrift.TBase<validateExperiment_result, validateExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateExperiment_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateExperiment_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField LVE_FIELD_DESC = new org.apache.thrift.protocol.TField("lve", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new validateExperiment_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new validateExperiment_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.model.error.LaunchValidationException lve; // 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"),
LVE((short)1, "lve");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // LVE
return LVE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.LVE, new org.apache.thrift.meta_data.FieldMetaData("lve", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.LaunchValidationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateExperiment_result.class, metaDataMap);
}
public validateExperiment_result() {
}
public validateExperiment_result(
boolean success,
org.apache.airavata.model.error.LaunchValidationException lve)
{
this();
this.success = success;
setSuccessIsSet(true);
this.lve = lve;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public validateExperiment_result(validateExperiment_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetLve()) {
this.lve = new org.apache.airavata.model.error.LaunchValidationException(other.lve);
}
}
public validateExperiment_result deepCopy() {
return new validateExperiment_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.lve = null;
}
public boolean isSuccess() {
return this.success;
}
public validateExperiment_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.model.error.LaunchValidationException getLve() {
return this.lve;
}
public validateExperiment_result setLve(org.apache.airavata.model.error.LaunchValidationException lve) {
this.lve = lve;
return this;
}
public void unsetLve() {
this.lve = null;
}
/** Returns true if field lve is set (has been assigned a value) and false otherwise */
public boolean isSetLve() {
return this.lve != null;
}
public void setLveIsSet(boolean value) {
if (!value) {
this.lve = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case LVE:
if (value == null) {
unsetLve();
} else {
setLve((org.apache.airavata.model.error.LaunchValidationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case LVE:
return getLve();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case LVE:
return isSetLve();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof validateExperiment_result)
return this.equals((validateExperiment_result)that);
return false;
}
public boolean equals(validateExperiment_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_lve = true && this.isSetLve();
boolean that_present_lve = true && that.isSetLve();
if (this_present_lve || that_present_lve) {
if (!(this_present_lve && that_present_lve))
return false;
if (!this.lve.equals(that.lve))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetLve()) ? 131071 : 524287);
if (isSetLve())
hashCode = hashCode * 8191 + lve.hashCode();
return hashCode;
}
@Override
public int compareTo(validateExperiment_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLve()).compareTo(other.isSetLve());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLve()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lve, other.lve);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("validateExperiment_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("lve:");
if (this.lve == null) {
sb.append("null");
} else {
sb.append(this.lve);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class validateExperiment_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public validateExperiment_resultStandardScheme getScheme() {
return new validateExperiment_resultStandardScheme();
}
}
private static class validateExperiment_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<validateExperiment_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, validateExperiment_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // LVE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.lve = new org.apache.airavata.model.error.LaunchValidationException();
struct.lve.read(iprot);
struct.setLveIsSet(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, validateExperiment_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.lve != null) {
oprot.writeFieldBegin(LVE_FIELD_DESC);
struct.lve.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class validateExperiment_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public validateExperiment_resultTupleScheme getScheme() {
return new validateExperiment_resultTupleScheme();
}
}
private static class validateExperiment_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<validateExperiment_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, validateExperiment_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetLve()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetLve()) {
struct.lve.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, validateExperiment_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.lve = new org.apache.airavata.model.error.LaunchValidationException();
struct.lve.read(iprot);
struct.setLveIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class validateProcess_args implements org.apache.thrift.TBase<validateProcess_args, validateProcess_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateProcess_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateProcess_args");
private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PROCESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("processes", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new validateProcess_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new validateProcess_argsTupleSchemeFactory();
public java.lang.String experimentId; // required
public java.util.List<org.apache.airavata.model.process.ProcessModel> processes; // 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 {
EXPERIMENT_ID((short)1, "experimentId"),
PROCESSES((short)2, "processes");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EXPERIMENT_ID
return EXPERIMENT_ID;
case 2: // PROCESSES
return PROCESSES;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PROCESSES, new org.apache.thrift.meta_data.FieldMetaData("processes", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.process.ProcessModel.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateProcess_args.class, metaDataMap);
}
public validateProcess_args() {
}
public validateProcess_args(
java.lang.String experimentId,
java.util.List<org.apache.airavata.model.process.ProcessModel> processes)
{
this();
this.experimentId = experimentId;
this.processes = processes;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public validateProcess_args(validateProcess_args other) {
if (other.isSetExperimentId()) {
this.experimentId = other.experimentId;
}
if (other.isSetProcesses()) {
java.util.List<org.apache.airavata.model.process.ProcessModel> __this__processes = new java.util.ArrayList<org.apache.airavata.model.process.ProcessModel>(other.processes.size());
for (org.apache.airavata.model.process.ProcessModel other_element : other.processes) {
__this__processes.add(new org.apache.airavata.model.process.ProcessModel(other_element));
}
this.processes = __this__processes;
}
}
public validateProcess_args deepCopy() {
return new validateProcess_args(this);
}
@Override
public void clear() {
this.experimentId = null;
this.processes = null;
}
public java.lang.String getExperimentId() {
return this.experimentId;
}
public validateProcess_args setExperimentId(java.lang.String experimentId) {
this.experimentId = experimentId;
return this;
}
public void unsetExperimentId() {
this.experimentId = null;
}
/** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
public boolean isSetExperimentId() {
return this.experimentId != null;
}
public void setExperimentIdIsSet(boolean value) {
if (!value) {
this.experimentId = null;
}
}
public int getProcessesSize() {
return (this.processes == null) ? 0 : this.processes.size();
}
public java.util.Iterator<org.apache.airavata.model.process.ProcessModel> getProcessesIterator() {
return (this.processes == null) ? null : this.processes.iterator();
}
public void addToProcesses(org.apache.airavata.model.process.ProcessModel elem) {
if (this.processes == null) {
this.processes = new java.util.ArrayList<org.apache.airavata.model.process.ProcessModel>();
}
this.processes.add(elem);
}
public java.util.List<org.apache.airavata.model.process.ProcessModel> getProcesses() {
return this.processes;
}
public validateProcess_args setProcesses(java.util.List<org.apache.airavata.model.process.ProcessModel> processes) {
this.processes = processes;
return this;
}
public void unsetProcesses() {
this.processes = null;
}
/** Returns true if field processes is set (has been assigned a value) and false otherwise */
public boolean isSetProcesses() {
return this.processes != null;
}
public void setProcessesIsSet(boolean value) {
if (!value) {
this.processes = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXPERIMENT_ID:
if (value == null) {
unsetExperimentId();
} else {
setExperimentId((java.lang.String)value);
}
break;
case PROCESSES:
if (value == null) {
unsetProcesses();
} else {
setProcesses((java.util.List<org.apache.airavata.model.process.ProcessModel>)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXPERIMENT_ID:
return getExperimentId();
case PROCESSES:
return getProcesses();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EXPERIMENT_ID:
return isSetExperimentId();
case PROCESSES:
return isSetProcesses();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof validateProcess_args)
return this.equals((validateProcess_args)that);
return false;
}
public boolean equals(validateProcess_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_experimentId = true && this.isSetExperimentId();
boolean that_present_experimentId = true && that.isSetExperimentId();
if (this_present_experimentId || that_present_experimentId) {
if (!(this_present_experimentId && that_present_experimentId))
return false;
if (!this.experimentId.equals(that.experimentId))
return false;
}
boolean this_present_processes = true && this.isSetProcesses();
boolean that_present_processes = true && that.isSetProcesses();
if (this_present_processes || that_present_processes) {
if (!(this_present_processes && that_present_processes))
return false;
if (!this.processes.equals(that.processes))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetExperimentId()) ? 131071 : 524287);
if (isSetExperimentId())
hashCode = hashCode * 8191 + experimentId.hashCode();
hashCode = hashCode * 8191 + ((isSetProcesses()) ? 131071 : 524287);
if (isSetProcesses())
hashCode = hashCode * 8191 + processes.hashCode();
return hashCode;
}
@Override
public int compareTo(validateProcess_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExperimentId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetProcesses()).compareTo(other.isSetProcesses());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProcesses()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.processes, other.processes);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("validateProcess_args(");
boolean first = true;
sb.append("experimentId:");
if (this.experimentId == null) {
sb.append("null");
} else {
sb.append(this.experimentId);
}
first = false;
if (!first) sb.append(", ");
sb.append("processes:");
if (this.processes == null) {
sb.append("null");
} else {
sb.append(this.processes);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (experimentId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
}
if (processes == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'processes' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class validateProcess_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public validateProcess_argsStandardScheme getScheme() {
return new validateProcess_argsStandardScheme();
}
}
private static class validateProcess_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<validateProcess_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, validateProcess_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: // EXPERIMENT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PROCESSES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.processes = new java.util.ArrayList<org.apache.airavata.model.process.ProcessModel>(_list0.size);
org.apache.airavata.model.process.ProcessModel _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new org.apache.airavata.model.process.ProcessModel();
_elem1.read(iprot);
struct.processes.add(_elem1);
}
iprot.readListEnd();
}
struct.setProcessesIsSet(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, validateProcess_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.experimentId != null) {
oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
oprot.writeString(struct.experimentId);
oprot.writeFieldEnd();
}
if (struct.processes != null) {
oprot.writeFieldBegin(PROCESSES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.processes.size()));
for (org.apache.airavata.model.process.ProcessModel _iter3 : struct.processes)
{
_iter3.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class validateProcess_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public validateProcess_argsTupleScheme getScheme() {
return new validateProcess_argsTupleScheme();
}
}
private static class validateProcess_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<validateProcess_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, validateProcess_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.experimentId);
{
oprot.writeI32(struct.processes.size());
for (org.apache.airavata.model.process.ProcessModel _iter4 : struct.processes)
{
_iter4.write(oprot);
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, validateProcess_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(true);
{
org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.processes = new java.util.ArrayList<org.apache.airavata.model.process.ProcessModel>(_list5.size);
org.apache.airavata.model.process.ProcessModel _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = new org.apache.airavata.model.process.ProcessModel();
_elem6.read(iprot);
struct.processes.add(_elem6);
}
}
struct.setProcessesIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class validateProcess_result implements org.apache.thrift.TBase<validateProcess_result, validateProcess_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateProcess_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validateProcess_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField LVE_FIELD_DESC = new org.apache.thrift.protocol.TField("lve", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new validateProcess_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new validateProcess_resultTupleSchemeFactory();
public boolean success; // required
public org.apache.airavata.model.error.LaunchValidationException lve; // 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"),
LVE((short)1, "lve");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // LVE
return LVE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.LVE, new org.apache.thrift.meta_data.FieldMetaData("lve", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.LaunchValidationException.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validateProcess_result.class, metaDataMap);
}
public validateProcess_result() {
}
public validateProcess_result(
boolean success,
org.apache.airavata.model.error.LaunchValidationException lve)
{
this();
this.success = success;
setSuccessIsSet(true);
this.lve = lve;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public validateProcess_result(validateProcess_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetLve()) {
this.lve = new org.apache.airavata.model.error.LaunchValidationException(other.lve);
}
}
public validateProcess_result deepCopy() {
return new validateProcess_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.lve = null;
}
public boolean isSuccess() {
return this.success;
}
public validateProcess_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.apache.airavata.model.error.LaunchValidationException getLve() {
return this.lve;
}
public validateProcess_result setLve(org.apache.airavata.model.error.LaunchValidationException lve) {
this.lve = lve;
return this;
}
public void unsetLve() {
this.lve = null;
}
/** Returns true if field lve is set (has been assigned a value) and false otherwise */
public boolean isSetLve() {
return this.lve != null;
}
public void setLveIsSet(boolean value) {
if (!value) {
this.lve = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
case LVE:
if (value == null) {
unsetLve();
} else {
setLve((org.apache.airavata.model.error.LaunchValidationException)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
case LVE:
return getLve();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case LVE:
return isSetLve();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof validateProcess_result)
return this.equals((validateProcess_result)that);
return false;
}
public boolean equals(validateProcess_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_lve = true && this.isSetLve();
boolean that_present_lve = true && that.isSetLve();
if (this_present_lve || that_present_lve) {
if (!(this_present_lve && that_present_lve))
return false;
if (!this.lve.equals(that.lve))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetLve()) ? 131071 : 524287);
if (isSetLve())
hashCode = hashCode * 8191 + lve.hashCode();
return hashCode;
}
@Override
public int compareTo(validateProcess_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetLve()).compareTo(other.isSetLve());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLve()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lve, other.lve);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("validateProcess_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("lve:");
if (this.lve == null) {
sb.append("null");
} else {
sb.append(this.lve);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class validateProcess_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public validateProcess_resultStandardScheme getScheme() {
return new validateProcess_resultStandardScheme();
}
}
private static class validateProcess_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<validateProcess_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, validateProcess_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // LVE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.lve = new org.apache.airavata.model.error.LaunchValidationException();
struct.lve.read(iprot);
struct.setLveIsSet(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, validateProcess_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.lve != null) {
oprot.writeFieldBegin(LVE_FIELD_DESC);
struct.lve.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class validateProcess_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public validateProcess_resultTupleScheme getScheme() {
return new validateProcess_resultTupleScheme();
}
}
private static class validateProcess_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<validateProcess_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, validateProcess_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetLve()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetLve()) {
struct.lve.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, validateProcess_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.lve = new org.apache.airavata.model.error.LaunchValidationException();
struct.lve.read(iprot);
struct.setLveIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class terminateExperiment_args implements org.apache.thrift.TBase<terminateExperiment_args, terminateExperiment_args._Fields>, java.io.Serializable, Cloneable, Comparable<terminateExperiment_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("terminateExperiment_args");
private static final org.apache.thrift.protocol.TField EXPERIMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new terminateExperiment_argsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new terminateExperiment_argsTupleSchemeFactory();
public java.lang.String experimentId; // required
public java.lang.String gatewayId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EXPERIMENT_ID((short)1, "experimentId"),
GATEWAY_ID((short)2, "gatewayId");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // EXPERIMENT_ID
return EXPERIMENT_ID;
case 2: // GATEWAY_ID
return GATEWAY_ID;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EXPERIMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("experimentId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(terminateExperiment_args.class, metaDataMap);
}
public terminateExperiment_args() {
}
public terminateExperiment_args(
java.lang.String experimentId,
java.lang.String gatewayId)
{
this();
this.experimentId = experimentId;
this.gatewayId = gatewayId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public terminateExperiment_args(terminateExperiment_args other) {
if (other.isSetExperimentId()) {
this.experimentId = other.experimentId;
}
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
}
public terminateExperiment_args deepCopy() {
return new terminateExperiment_args(this);
}
@Override
public void clear() {
this.experimentId = null;
this.gatewayId = null;
}
public java.lang.String getExperimentId() {
return this.experimentId;
}
public terminateExperiment_args setExperimentId(java.lang.String experimentId) {
this.experimentId = experimentId;
return this;
}
public void unsetExperimentId() {
this.experimentId = null;
}
/** Returns true if field experimentId is set (has been assigned a value) and false otherwise */
public boolean isSetExperimentId() {
return this.experimentId != null;
}
public void setExperimentIdIsSet(boolean value) {
if (!value) {
this.experimentId = null;
}
}
public java.lang.String getGatewayId() {
return this.gatewayId;
}
public terminateExperiment_args setGatewayId(java.lang.String gatewayId) {
this.gatewayId = gatewayId;
return this;
}
public void unsetGatewayId() {
this.gatewayId = null;
}
/** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
public boolean isSetGatewayId() {
return this.gatewayId != null;
}
public void setGatewayIdIsSet(boolean value) {
if (!value) {
this.gatewayId = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case EXPERIMENT_ID:
if (value == null) {
unsetExperimentId();
} else {
setExperimentId((java.lang.String)value);
}
break;
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EXPERIMENT_ID:
return getExperimentId();
case GATEWAY_ID:
return getGatewayId();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EXPERIMENT_ID:
return isSetExperimentId();
case GATEWAY_ID:
return isSetGatewayId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof terminateExperiment_args)
return this.equals((terminateExperiment_args)that);
return false;
}
public boolean equals(terminateExperiment_args that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_experimentId = true && this.isSetExperimentId();
boolean that_present_experimentId = true && that.isSetExperimentId();
if (this_present_experimentId || that_present_experimentId) {
if (!(this_present_experimentId && that_present_experimentId))
return false;
if (!this.experimentId.equals(that.experimentId))
return false;
}
boolean this_present_gatewayId = true && this.isSetGatewayId();
boolean that_present_gatewayId = true && that.isSetGatewayId();
if (this_present_gatewayId || that_present_gatewayId) {
if (!(this_present_gatewayId && that_present_gatewayId))
return false;
if (!this.gatewayId.equals(that.gatewayId))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetExperimentId()) ? 131071 : 524287);
if (isSetExperimentId())
hashCode = hashCode * 8191 + experimentId.hashCode();
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
return hashCode;
}
@Override
public int compareTo(terminateExperiment_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetExperimentId()).compareTo(other.isSetExperimentId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExperimentId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentId, other.experimentId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGatewayId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("terminateExperiment_args(");
boolean first = true;
sb.append("experimentId:");
if (this.experimentId == null) {
sb.append("null");
} else {
sb.append(this.experimentId);
}
first = false;
if (!first) sb.append(", ");
sb.append("gatewayId:");
if (this.gatewayId == null) {
sb.append("null");
} else {
sb.append(this.gatewayId);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (experimentId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'experimentId' was not present! Struct: " + toString());
}
if (gatewayId == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class terminateExperiment_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public terminateExperiment_argsStandardScheme getScheme() {
return new terminateExperiment_argsStandardScheme();
}
}
private static class terminateExperiment_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<terminateExperiment_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, terminateExperiment_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: // EXPERIMENT_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // GATEWAY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, terminateExperiment_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.experimentId != null) {
oprot.writeFieldBegin(EXPERIMENT_ID_FIELD_DESC);
oprot.writeString(struct.experimentId);
oprot.writeFieldEnd();
}
if (struct.gatewayId != null) {
oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
oprot.writeString(struct.gatewayId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class terminateExperiment_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public terminateExperiment_argsTupleScheme getScheme() {
return new terminateExperiment_argsTupleScheme();
}
}
private static class terminateExperiment_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<terminateExperiment_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, terminateExperiment_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.experimentId);
oprot.writeString(struct.gatewayId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, terminateExperiment_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.experimentId = iprot.readString();
struct.setExperimentIdIsSet(true);
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class terminateExperiment_result implements org.apache.thrift.TBase<terminateExperiment_result, terminateExperiment_result._Fields>, java.io.Serializable, Cloneable, Comparable<terminateExperiment_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("terminateExperiment_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new terminateExperiment_resultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new terminateExperiment_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(terminateExperiment_result.class, metaDataMap);
}
public terminateExperiment_result() {
}
public terminateExperiment_result(
boolean success)
{
this();
this.success = success;
setSuccessIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public terminateExperiment_result(terminateExperiment_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
}
public terminateExperiment_result deepCopy() {
return new terminateExperiment_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
}
public boolean isSuccess() {
return this.success;
}
public terminateExperiment_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((java.lang.Boolean)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof terminateExperiment_result)
return this.equals((terminateExperiment_result)that);
return false;
}
public boolean equals(terminateExperiment_result that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(terminateExperiment_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("terminateExperiment_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, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class terminateExperiment_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public terminateExperiment_resultStandardScheme getScheme() {
return new terminateExperiment_resultStandardScheme();
}
}
private static class terminateExperiment_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<terminateExperiment_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, terminateExperiment_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, terminateExperiment_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 terminateExperiment_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public terminateExperiment_resultTupleScheme getScheme() {
return new terminateExperiment_resultTupleScheme();
}
}
private static class terminateExperiment_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<terminateExperiment_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, terminateExperiment_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, terminateExperiment_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
}