You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/02/09 04:14:18 UTC
[03/16] adding generated code for API AIRAVATA-991
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
new file mode 100644
index 0000000..5ffacf9
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/ConfigurationData.java
@@ -0,0 +1,1402 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A structure holding the experiment configuration.
+ *
+ *
+ */
+@SuppressWarnings("all") public class ConfigurationData implements org.apache.thrift.TBase<ConfigurationData, ConfigurationData._Fields>, java.io.Serializable, Cloneable, Comparable<ConfigurationData> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ConfigurationData");
+
+ private static final org.apache.thrift.protocol.TField BASIC_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("basicMetadata", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField APPLICATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationId", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField APPLICATION_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationVersion", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField WORKFLOW_TEMPLATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("workflowTemplateId", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField WORKLFOW_TEMPLATE_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("worklfowTemplateVersion", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField EXPERIMENT_INPUTS_FIELD_DESC = new org.apache.thrift.protocol.TField("experimentInputs", org.apache.thrift.protocol.TType.MAP, (short)6);
+ private static final org.apache.thrift.protocol.TField COMPUTATIONAL_RESOURCE_SCHEDULING_FIELD_DESC = new org.apache.thrift.protocol.TField("computationalResourceScheduling", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField ADVANCE_INPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceInputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+ private static final org.apache.thrift.protocol.TField ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC = new org.apache.thrift.protocol.TField("advanceOutputDataHandling", org.apache.thrift.protocol.TType.STRUCT, (short)9);
+ private static final org.apache.thrift.protocol.TField QOS_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("qosParams", org.apache.thrift.protocol.TType.STRUCT, (short)10);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new ConfigurationDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new ConfigurationDataTupleSchemeFactory());
+ }
+
+ public BasicMetadata basicMetadata; // optional
+ public String applicationId; // optional
+ public String applicationVersion; // optional
+ public String workflowTemplateId; // optional
+ public String worklfowTemplateVersion; // optional
+ public Map<String,String> experimentInputs; // optional
+ public ComputationalResourceScheduling computationalResourceScheduling; // optional
+ public AdvancedInputDataHandling advanceInputDataHandling; // optional
+ public AdvancedOutputDataHandling advanceOutputDataHandling; // optional
+ public QualityOfServiceParams qosParams; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ BASIC_METADATA((short)1, "basicMetadata"),
+ APPLICATION_ID((short)2, "applicationId"),
+ APPLICATION_VERSION((short)3, "applicationVersion"),
+ WORKFLOW_TEMPLATE_ID((short)4, "workflowTemplateId"),
+ WORKLFOW_TEMPLATE_VERSION((short)5, "worklfowTemplateVersion"),
+ EXPERIMENT_INPUTS((short)6, "experimentInputs"),
+ COMPUTATIONAL_RESOURCE_SCHEDULING((short)7, "computationalResourceScheduling"),
+ ADVANCE_INPUT_DATA_HANDLING((short)8, "advanceInputDataHandling"),
+ ADVANCE_OUTPUT_DATA_HANDLING((short)9, "advanceOutputDataHandling"),
+ QOS_PARAMS((short)10, "qosParams");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // BASIC_METADATA
+ return BASIC_METADATA;
+ case 2: // APPLICATION_ID
+ return APPLICATION_ID;
+ case 3: // APPLICATION_VERSION
+ return APPLICATION_VERSION;
+ case 4: // WORKFLOW_TEMPLATE_ID
+ return WORKFLOW_TEMPLATE_ID;
+ case 5: // WORKLFOW_TEMPLATE_VERSION
+ return WORKLFOW_TEMPLATE_VERSION;
+ case 6: // EXPERIMENT_INPUTS
+ return EXPERIMENT_INPUTS;
+ case 7: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ return COMPUTATIONAL_RESOURCE_SCHEDULING;
+ case 8: // ADVANCE_INPUT_DATA_HANDLING
+ return ADVANCE_INPUT_DATA_HANDLING;
+ case 9: // ADVANCE_OUTPUT_DATA_HANDLING
+ return ADVANCE_OUTPUT_DATA_HANDLING;
+ case 10: // QOS_PARAMS
+ return QOS_PARAMS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private _Fields optionals[] = {_Fields.BASIC_METADATA,_Fields.APPLICATION_ID,_Fields.APPLICATION_VERSION,_Fields.WORKFLOW_TEMPLATE_ID,_Fields.WORKLFOW_TEMPLATE_VERSION,_Fields.EXPERIMENT_INPUTS,_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING,_Fields.ADVANCE_INPUT_DATA_HANDLING,_Fields.ADVANCE_OUTPUT_DATA_HANDLING,_Fields.QOS_PARAMS};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.BASIC_METADATA, new org.apache.thrift.meta_data.FieldMetaData("basicMetadata", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BasicMetadata.class)));
+ tmpMap.put(_Fields.APPLICATION_ID, new org.apache.thrift.meta_data.FieldMetaData("applicationId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_VERSION, new org.apache.thrift.meta_data.FieldMetaData("applicationVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKFLOW_TEMPLATE_ID, new org.apache.thrift.meta_data.FieldMetaData("workflowTemplateId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WORKLFOW_TEMPLATE_VERSION, new org.apache.thrift.meta_data.FieldMetaData("worklfowTemplateVersion", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXPERIMENT_INPUTS, new org.apache.thrift.meta_data.FieldMetaData("experimentInputs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.COMPUTATIONAL_RESOURCE_SCHEDULING, new org.apache.thrift.meta_data.FieldMetaData("computationalResourceScheduling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ComputationalResourceScheduling.class)));
+ tmpMap.put(_Fields.ADVANCE_INPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advanceInputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedInputDataHandling.class)));
+ tmpMap.put(_Fields.ADVANCE_OUTPUT_DATA_HANDLING, new org.apache.thrift.meta_data.FieldMetaData("advanceOutputDataHandling", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AdvancedOutputDataHandling.class)));
+ tmpMap.put(_Fields.QOS_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("qosParams", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QualityOfServiceParams.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ConfigurationData.class, metaDataMap);
+ }
+
+ public ConfigurationData() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public ConfigurationData(ConfigurationData other) {
+ if (other.isSetBasicMetadata()) {
+ this.basicMetadata = new BasicMetadata(other.basicMetadata);
+ }
+ if (other.isSetApplicationId()) {
+ this.applicationId = other.applicationId;
+ }
+ if (other.isSetApplicationVersion()) {
+ this.applicationVersion = other.applicationVersion;
+ }
+ if (other.isSetWorkflowTemplateId()) {
+ this.workflowTemplateId = other.workflowTemplateId;
+ }
+ if (other.isSetWorklfowTemplateVersion()) {
+ this.worklfowTemplateVersion = other.worklfowTemplateVersion;
+ }
+ if (other.isSetExperimentInputs()) {
+ Map<String,String> __this__experimentInputs = new HashMap<String,String>(other.experimentInputs);
+ this.experimentInputs = __this__experimentInputs;
+ }
+ if (other.isSetComputationalResourceScheduling()) {
+ this.computationalResourceScheduling = new ComputationalResourceScheduling(other.computationalResourceScheduling);
+ }
+ if (other.isSetAdvanceInputDataHandling()) {
+ this.advanceInputDataHandling = new AdvancedInputDataHandling(other.advanceInputDataHandling);
+ }
+ if (other.isSetAdvanceOutputDataHandling()) {
+ this.advanceOutputDataHandling = new AdvancedOutputDataHandling(other.advanceOutputDataHandling);
+ }
+ if (other.isSetQosParams()) {
+ this.qosParams = new QualityOfServiceParams(other.qosParams);
+ }
+ }
+
+ public ConfigurationData deepCopy() {
+ return new ConfigurationData(this);
+ }
+
+ @Override
+ public void clear() {
+ this.basicMetadata = null;
+ this.applicationId = null;
+ this.applicationVersion = null;
+ this.workflowTemplateId = null;
+ this.worklfowTemplateVersion = null;
+ this.experimentInputs = null;
+ this.computationalResourceScheduling = null;
+ this.advanceInputDataHandling = null;
+ this.advanceOutputDataHandling = null;
+ this.qosParams = null;
+ }
+
+ public BasicMetadata getBasicMetadata() {
+ return this.basicMetadata;
+ }
+
+ public ConfigurationData setBasicMetadata(BasicMetadata basicMetadata) {
+ this.basicMetadata = basicMetadata;
+ return this;
+ }
+
+ public void unsetBasicMetadata() {
+ this.basicMetadata = null;
+ }
+
+ /** Returns true if field basicMetadata is set (has been assigned a value) and false otherwise */
+ public boolean isSetBasicMetadata() {
+ return this.basicMetadata != null;
+ }
+
+ public void setBasicMetadataIsSet(boolean value) {
+ if (!value) {
+ this.basicMetadata = null;
+ }
+ }
+
+ public String getApplicationId() {
+ return this.applicationId;
+ }
+
+ public ConfigurationData setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ return this;
+ }
+
+ public void unsetApplicationId() {
+ this.applicationId = null;
+ }
+
+ /** Returns true if field applicationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationId() {
+ return this.applicationId != null;
+ }
+
+ public void setApplicationIdIsSet(boolean value) {
+ if (!value) {
+ this.applicationId = null;
+ }
+ }
+
+ public String getApplicationVersion() {
+ return this.applicationVersion;
+ }
+
+ public ConfigurationData setApplicationVersion(String applicationVersion) {
+ this.applicationVersion = applicationVersion;
+ return this;
+ }
+
+ public void unsetApplicationVersion() {
+ this.applicationVersion = null;
+ }
+
+ /** Returns true if field applicationVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationVersion() {
+ return this.applicationVersion != null;
+ }
+
+ public void setApplicationVersionIsSet(boolean value) {
+ if (!value) {
+ this.applicationVersion = null;
+ }
+ }
+
+ public String getWorkflowTemplateId() {
+ return this.workflowTemplateId;
+ }
+
+ public ConfigurationData setWorkflowTemplateId(String workflowTemplateId) {
+ this.workflowTemplateId = workflowTemplateId;
+ return this;
+ }
+
+ public void unsetWorkflowTemplateId() {
+ this.workflowTemplateId = null;
+ }
+
+ /** Returns true if field workflowTemplateId is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorkflowTemplateId() {
+ return this.workflowTemplateId != null;
+ }
+
+ public void setWorkflowTemplateIdIsSet(boolean value) {
+ if (!value) {
+ this.workflowTemplateId = null;
+ }
+ }
+
+ public String getWorklfowTemplateVersion() {
+ return this.worklfowTemplateVersion;
+ }
+
+ public ConfigurationData setWorklfowTemplateVersion(String worklfowTemplateVersion) {
+ this.worklfowTemplateVersion = worklfowTemplateVersion;
+ return this;
+ }
+
+ public void unsetWorklfowTemplateVersion() {
+ this.worklfowTemplateVersion = null;
+ }
+
+ /** Returns true if field worklfowTemplateVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetWorklfowTemplateVersion() {
+ return this.worklfowTemplateVersion != null;
+ }
+
+ public void setWorklfowTemplateVersionIsSet(boolean value) {
+ if (!value) {
+ this.worklfowTemplateVersion = null;
+ }
+ }
+
+ public int getExperimentInputsSize() {
+ return (this.experimentInputs == null) ? 0 : this.experimentInputs.size();
+ }
+
+ public void putToExperimentInputs(String key, String val) {
+ if (this.experimentInputs == null) {
+ this.experimentInputs = new HashMap<String,String>();
+ }
+ this.experimentInputs.put(key, val);
+ }
+
+ public Map<String,String> getExperimentInputs() {
+ return this.experimentInputs;
+ }
+
+ public ConfigurationData setExperimentInputs(Map<String,String> experimentInputs) {
+ this.experimentInputs = experimentInputs;
+ return this;
+ }
+
+ public void unsetExperimentInputs() {
+ this.experimentInputs = null;
+ }
+
+ /** Returns true if field experimentInputs is set (has been assigned a value) and false otherwise */
+ public boolean isSetExperimentInputs() {
+ return this.experimentInputs != null;
+ }
+
+ public void setExperimentInputsIsSet(boolean value) {
+ if (!value) {
+ this.experimentInputs = null;
+ }
+ }
+
+ public ComputationalResourceScheduling getComputationalResourceScheduling() {
+ return this.computationalResourceScheduling;
+ }
+
+ public ConfigurationData setComputationalResourceScheduling(ComputationalResourceScheduling computationalResourceScheduling) {
+ this.computationalResourceScheduling = computationalResourceScheduling;
+ return this;
+ }
+
+ public void unsetComputationalResourceScheduling() {
+ this.computationalResourceScheduling = null;
+ }
+
+ /** Returns true if field computationalResourceScheduling is set (has been assigned a value) and false otherwise */
+ public boolean isSetComputationalResourceScheduling() {
+ return this.computationalResourceScheduling != null;
+ }
+
+ public void setComputationalResourceSchedulingIsSet(boolean value) {
+ if (!value) {
+ this.computationalResourceScheduling = null;
+ }
+ }
+
+ public AdvancedInputDataHandling getAdvanceInputDataHandling() {
+ return this.advanceInputDataHandling;
+ }
+
+ public ConfigurationData setAdvanceInputDataHandling(AdvancedInputDataHandling advanceInputDataHandling) {
+ this.advanceInputDataHandling = advanceInputDataHandling;
+ return this;
+ }
+
+ public void unsetAdvanceInputDataHandling() {
+ this.advanceInputDataHandling = null;
+ }
+
+ /** Returns true if field advanceInputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvanceInputDataHandling() {
+ return this.advanceInputDataHandling != null;
+ }
+
+ public void setAdvanceInputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advanceInputDataHandling = null;
+ }
+ }
+
+ public AdvancedOutputDataHandling getAdvanceOutputDataHandling() {
+ return this.advanceOutputDataHandling;
+ }
+
+ public ConfigurationData setAdvanceOutputDataHandling(AdvancedOutputDataHandling advanceOutputDataHandling) {
+ this.advanceOutputDataHandling = advanceOutputDataHandling;
+ return this;
+ }
+
+ public void unsetAdvanceOutputDataHandling() {
+ this.advanceOutputDataHandling = null;
+ }
+
+ /** Returns true if field advanceOutputDataHandling is set (has been assigned a value) and false otherwise */
+ public boolean isSetAdvanceOutputDataHandling() {
+ return this.advanceOutputDataHandling != null;
+ }
+
+ public void setAdvanceOutputDataHandlingIsSet(boolean value) {
+ if (!value) {
+ this.advanceOutputDataHandling = null;
+ }
+ }
+
+ public QualityOfServiceParams getQosParams() {
+ return this.qosParams;
+ }
+
+ public ConfigurationData setQosParams(QualityOfServiceParams qosParams) {
+ this.qosParams = qosParams;
+ return this;
+ }
+
+ public void unsetQosParams() {
+ this.qosParams = null;
+ }
+
+ /** Returns true if field qosParams is set (has been assigned a value) and false otherwise */
+ public boolean isSetQosParams() {
+ return this.qosParams != null;
+ }
+
+ public void setQosParamsIsSet(boolean value) {
+ if (!value) {
+ this.qosParams = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case BASIC_METADATA:
+ if (value == null) {
+ unsetBasicMetadata();
+ } else {
+ setBasicMetadata((BasicMetadata)value);
+ }
+ break;
+
+ case APPLICATION_ID:
+ if (value == null) {
+ unsetApplicationId();
+ } else {
+ setApplicationId((String)value);
+ }
+ break;
+
+ case APPLICATION_VERSION:
+ if (value == null) {
+ unsetApplicationVersion();
+ } else {
+ setApplicationVersion((String)value);
+ }
+ break;
+
+ case WORKFLOW_TEMPLATE_ID:
+ if (value == null) {
+ unsetWorkflowTemplateId();
+ } else {
+ setWorkflowTemplateId((String)value);
+ }
+ break;
+
+ case WORKLFOW_TEMPLATE_VERSION:
+ if (value == null) {
+ unsetWorklfowTemplateVersion();
+ } else {
+ setWorklfowTemplateVersion((String)value);
+ }
+ break;
+
+ case EXPERIMENT_INPUTS:
+ if (value == null) {
+ unsetExperimentInputs();
+ } else {
+ setExperimentInputs((Map<String,String>)value);
+ }
+ break;
+
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ if (value == null) {
+ unsetComputationalResourceScheduling();
+ } else {
+ setComputationalResourceScheduling((ComputationalResourceScheduling)value);
+ }
+ break;
+
+ case ADVANCE_INPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvanceInputDataHandling();
+ } else {
+ setAdvanceInputDataHandling((AdvancedInputDataHandling)value);
+ }
+ break;
+
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ if (value == null) {
+ unsetAdvanceOutputDataHandling();
+ } else {
+ setAdvanceOutputDataHandling((AdvancedOutputDataHandling)value);
+ }
+ break;
+
+ case QOS_PARAMS:
+ if (value == null) {
+ unsetQosParams();
+ } else {
+ setQosParams((QualityOfServiceParams)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case BASIC_METADATA:
+ return getBasicMetadata();
+
+ case APPLICATION_ID:
+ return getApplicationId();
+
+ case APPLICATION_VERSION:
+ return getApplicationVersion();
+
+ case WORKFLOW_TEMPLATE_ID:
+ return getWorkflowTemplateId();
+
+ case WORKLFOW_TEMPLATE_VERSION:
+ return getWorklfowTemplateVersion();
+
+ case EXPERIMENT_INPUTS:
+ return getExperimentInputs();
+
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ return getComputationalResourceScheduling();
+
+ case ADVANCE_INPUT_DATA_HANDLING:
+ return getAdvanceInputDataHandling();
+
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ return getAdvanceOutputDataHandling();
+
+ case QOS_PARAMS:
+ return getQosParams();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case BASIC_METADATA:
+ return isSetBasicMetadata();
+ case APPLICATION_ID:
+ return isSetApplicationId();
+ case APPLICATION_VERSION:
+ return isSetApplicationVersion();
+ case WORKFLOW_TEMPLATE_ID:
+ return isSetWorkflowTemplateId();
+ case WORKLFOW_TEMPLATE_VERSION:
+ return isSetWorklfowTemplateVersion();
+ case EXPERIMENT_INPUTS:
+ return isSetExperimentInputs();
+ case COMPUTATIONAL_RESOURCE_SCHEDULING:
+ return isSetComputationalResourceScheduling();
+ case ADVANCE_INPUT_DATA_HANDLING:
+ return isSetAdvanceInputDataHandling();
+ case ADVANCE_OUTPUT_DATA_HANDLING:
+ return isSetAdvanceOutputDataHandling();
+ case QOS_PARAMS:
+ return isSetQosParams();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof ConfigurationData)
+ return this.equals((ConfigurationData)that);
+ return false;
+ }
+
+ public boolean equals(ConfigurationData that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_basicMetadata = true && this.isSetBasicMetadata();
+ boolean that_present_basicMetadata = true && that.isSetBasicMetadata();
+ if (this_present_basicMetadata || that_present_basicMetadata) {
+ if (!(this_present_basicMetadata && that_present_basicMetadata))
+ return false;
+ if (!this.basicMetadata.equals(that.basicMetadata))
+ return false;
+ }
+
+ boolean this_present_applicationId = true && this.isSetApplicationId();
+ boolean that_present_applicationId = true && that.isSetApplicationId();
+ if (this_present_applicationId || that_present_applicationId) {
+ if (!(this_present_applicationId && that_present_applicationId))
+ return false;
+ if (!this.applicationId.equals(that.applicationId))
+ return false;
+ }
+
+ boolean this_present_applicationVersion = true && this.isSetApplicationVersion();
+ boolean that_present_applicationVersion = true && that.isSetApplicationVersion();
+ if (this_present_applicationVersion || that_present_applicationVersion) {
+ if (!(this_present_applicationVersion && that_present_applicationVersion))
+ return false;
+ if (!this.applicationVersion.equals(that.applicationVersion))
+ return false;
+ }
+
+ boolean this_present_workflowTemplateId = true && this.isSetWorkflowTemplateId();
+ boolean that_present_workflowTemplateId = true && that.isSetWorkflowTemplateId();
+ if (this_present_workflowTemplateId || that_present_workflowTemplateId) {
+ if (!(this_present_workflowTemplateId && that_present_workflowTemplateId))
+ return false;
+ if (!this.workflowTemplateId.equals(that.workflowTemplateId))
+ return false;
+ }
+
+ boolean this_present_worklfowTemplateVersion = true && this.isSetWorklfowTemplateVersion();
+ boolean that_present_worklfowTemplateVersion = true && that.isSetWorklfowTemplateVersion();
+ if (this_present_worklfowTemplateVersion || that_present_worklfowTemplateVersion) {
+ if (!(this_present_worklfowTemplateVersion && that_present_worklfowTemplateVersion))
+ return false;
+ if (!this.worklfowTemplateVersion.equals(that.worklfowTemplateVersion))
+ return false;
+ }
+
+ boolean this_present_experimentInputs = true && this.isSetExperimentInputs();
+ boolean that_present_experimentInputs = true && that.isSetExperimentInputs();
+ if (this_present_experimentInputs || that_present_experimentInputs) {
+ if (!(this_present_experimentInputs && that_present_experimentInputs))
+ return false;
+ if (!this.experimentInputs.equals(that.experimentInputs))
+ return false;
+ }
+
+ boolean this_present_computationalResourceScheduling = true && this.isSetComputationalResourceScheduling();
+ boolean that_present_computationalResourceScheduling = true && that.isSetComputationalResourceScheduling();
+ if (this_present_computationalResourceScheduling || that_present_computationalResourceScheduling) {
+ if (!(this_present_computationalResourceScheduling && that_present_computationalResourceScheduling))
+ return false;
+ if (!this.computationalResourceScheduling.equals(that.computationalResourceScheduling))
+ return false;
+ }
+
+ boolean this_present_advanceInputDataHandling = true && this.isSetAdvanceInputDataHandling();
+ boolean that_present_advanceInputDataHandling = true && that.isSetAdvanceInputDataHandling();
+ if (this_present_advanceInputDataHandling || that_present_advanceInputDataHandling) {
+ if (!(this_present_advanceInputDataHandling && that_present_advanceInputDataHandling))
+ return false;
+ if (!this.advanceInputDataHandling.equals(that.advanceInputDataHandling))
+ return false;
+ }
+
+ boolean this_present_advanceOutputDataHandling = true && this.isSetAdvanceOutputDataHandling();
+ boolean that_present_advanceOutputDataHandling = true && that.isSetAdvanceOutputDataHandling();
+ if (this_present_advanceOutputDataHandling || that_present_advanceOutputDataHandling) {
+ if (!(this_present_advanceOutputDataHandling && that_present_advanceOutputDataHandling))
+ return false;
+ if (!this.advanceOutputDataHandling.equals(that.advanceOutputDataHandling))
+ return false;
+ }
+
+ boolean this_present_qosParams = true && this.isSetQosParams();
+ boolean that_present_qosParams = true && that.isSetQosParams();
+ if (this_present_qosParams || that_present_qosParams) {
+ if (!(this_present_qosParams && that_present_qosParams))
+ return false;
+ if (!this.qosParams.equals(that.qosParams))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(ConfigurationData other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetBasicMetadata()).compareTo(other.isSetBasicMetadata());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetBasicMetadata()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.basicMetadata, other.basicMetadata);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationId()).compareTo(other.isSetApplicationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationId, other.applicationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationVersion()).compareTo(other.isSetApplicationVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationVersion, other.applicationVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorkflowTemplateId()).compareTo(other.isSetWorkflowTemplateId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorkflowTemplateId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.workflowTemplateId, other.workflowTemplateId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWorklfowTemplateVersion()).compareTo(other.isSetWorklfowTemplateVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWorklfowTemplateVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.worklfowTemplateVersion, other.worklfowTemplateVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExperimentInputs()).compareTo(other.isSetExperimentInputs());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExperimentInputs()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.experimentInputs, other.experimentInputs);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComputationalResourceScheduling()).compareTo(other.isSetComputationalResourceScheduling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComputationalResourceScheduling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computationalResourceScheduling, other.computationalResourceScheduling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvanceInputDataHandling()).compareTo(other.isSetAdvanceInputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvanceInputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advanceInputDataHandling, other.advanceInputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAdvanceOutputDataHandling()).compareTo(other.isSetAdvanceOutputDataHandling());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAdvanceOutputDataHandling()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.advanceOutputDataHandling, other.advanceOutputDataHandling);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetQosParams()).compareTo(other.isSetQosParams());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetQosParams()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qosParams, other.qosParams);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("ConfigurationData(");
+ boolean first = true;
+
+ if (isSetBasicMetadata()) {
+ sb.append("basicMetadata:");
+ if (this.basicMetadata == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.basicMetadata);
+ }
+ first = false;
+ }
+ if (isSetApplicationId()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationId:");
+ if (this.applicationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationId);
+ }
+ first = false;
+ }
+ if (isSetApplicationVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("applicationVersion:");
+ if (this.applicationVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationVersion);
+ }
+ first = false;
+ }
+ if (isSetWorkflowTemplateId()) {
+ if (!first) sb.append(", ");
+ sb.append("workflowTemplateId:");
+ if (this.workflowTemplateId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.workflowTemplateId);
+ }
+ first = false;
+ }
+ if (isSetWorklfowTemplateVersion()) {
+ if (!first) sb.append(", ");
+ sb.append("worklfowTemplateVersion:");
+ if (this.worklfowTemplateVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.worklfowTemplateVersion);
+ }
+ first = false;
+ }
+ if (isSetExperimentInputs()) {
+ if (!first) sb.append(", ");
+ sb.append("experimentInputs:");
+ if (this.experimentInputs == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.experimentInputs);
+ }
+ first = false;
+ }
+ if (isSetComputationalResourceScheduling()) {
+ if (!first) sb.append(", ");
+ sb.append("computationalResourceScheduling:");
+ if (this.computationalResourceScheduling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.computationalResourceScheduling);
+ }
+ first = false;
+ }
+ if (isSetAdvanceInputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advanceInputDataHandling:");
+ if (this.advanceInputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advanceInputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetAdvanceOutputDataHandling()) {
+ if (!first) sb.append(", ");
+ sb.append("advanceOutputDataHandling:");
+ if (this.advanceOutputDataHandling == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.advanceOutputDataHandling);
+ }
+ first = false;
+ }
+ if (isSetQosParams()) {
+ if (!first) sb.append(", ");
+ sb.append("qosParams:");
+ if (this.qosParams == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.qosParams);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (basicMetadata != null) {
+ basicMetadata.validate();
+ }
+ if (computationalResourceScheduling != null) {
+ computationalResourceScheduling.validate();
+ }
+ if (advanceInputDataHandling != null) {
+ advanceInputDataHandling.validate();
+ }
+ if (advanceOutputDataHandling != null) {
+ advanceOutputDataHandling.validate();
+ }
+ if (qosParams != null) {
+ qosParams.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 ConfigurationDataStandardSchemeFactory implements SchemeFactory {
+ public ConfigurationDataStandardScheme getScheme() {
+ return new ConfigurationDataStandardScheme();
+ }
+ }
+
+ private static class ConfigurationDataStandardScheme extends StandardScheme<ConfigurationData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ConfigurationData 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: // BASIC_METADATA
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.basicMetadata = new BasicMetadata();
+ struct.basicMetadata.read(iprot);
+ struct.setBasicMetadataIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // APPLICATION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // APPLICATION_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // WORKFLOW_TEMPLATE_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // WORKLFOW_TEMPLATE_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.worklfowTemplateVersion = iprot.readString();
+ struct.setWorklfowTemplateVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // EXPERIMENT_INPUTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
+ struct.experimentInputs = new HashMap<String,String>(2*_map0.size);
+ for (int _i1 = 0; _i1 < _map0.size; ++_i1)
+ {
+ String _key2;
+ String _val3;
+ _key2 = iprot.readString();
+ _val3 = iprot.readString();
+ struct.experimentInputs.put(_key2, _val3);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setExperimentInputsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // COMPUTATIONAL_RESOURCE_SCHEDULING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // ADVANCE_INPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // ADVANCE_OUTPUT_DATA_HANDLING
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // QOS_PARAMS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(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, ConfigurationData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.basicMetadata != null) {
+ if (struct.isSetBasicMetadata()) {
+ oprot.writeFieldBegin(BASIC_METADATA_FIELD_DESC);
+ struct.basicMetadata.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationId != null) {
+ if (struct.isSetApplicationId()) {
+ oprot.writeFieldBegin(APPLICATION_ID_FIELD_DESC);
+ oprot.writeString(struct.applicationId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.applicationVersion != null) {
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeFieldBegin(APPLICATION_VERSION_FIELD_DESC);
+ oprot.writeString(struct.applicationVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.workflowTemplateId != null) {
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeFieldBegin(WORKFLOW_TEMPLATE_ID_FIELD_DESC);
+ oprot.writeString(struct.workflowTemplateId);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.worklfowTemplateVersion != null) {
+ if (struct.isSetWorklfowTemplateVersion()) {
+ oprot.writeFieldBegin(WORKLFOW_TEMPLATE_VERSION_FIELD_DESC);
+ oprot.writeString(struct.worklfowTemplateVersion);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.experimentInputs != null) {
+ if (struct.isSetExperimentInputs()) {
+ oprot.writeFieldBegin(EXPERIMENT_INPUTS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.experimentInputs.size()));
+ for (Map.Entry<String, String> _iter4 : struct.experimentInputs.entrySet())
+ {
+ oprot.writeString(_iter4.getKey());
+ oprot.writeString(_iter4.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.computationalResourceScheduling != null) {
+ if (struct.isSetComputationalResourceScheduling()) {
+ oprot.writeFieldBegin(COMPUTATIONAL_RESOURCE_SCHEDULING_FIELD_DESC);
+ struct.computationalResourceScheduling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advanceInputDataHandling != null) {
+ if (struct.isSetAdvanceInputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCE_INPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advanceInputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.advanceOutputDataHandling != null) {
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ oprot.writeFieldBegin(ADVANCE_OUTPUT_DATA_HANDLING_FIELD_DESC);
+ struct.advanceOutputDataHandling.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.qosParams != null) {
+ if (struct.isSetQosParams()) {
+ oprot.writeFieldBegin(QOS_PARAMS_FIELD_DESC);
+ struct.qosParams.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class ConfigurationDataTupleSchemeFactory implements SchemeFactory {
+ public ConfigurationDataTupleScheme getScheme() {
+ return new ConfigurationDataTupleScheme();
+ }
+ }
+
+ private static class ConfigurationDataTupleScheme extends TupleScheme<ConfigurationData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, ConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetBasicMetadata()) {
+ optionals.set(0);
+ }
+ if (struct.isSetApplicationId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationVersion()) {
+ optionals.set(2);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ optionals.set(3);
+ }
+ if (struct.isSetWorklfowTemplateVersion()) {
+ optionals.set(4);
+ }
+ if (struct.isSetExperimentInputs()) {
+ optionals.set(5);
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ optionals.set(6);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ optionals.set(7);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ optionals.set(8);
+ }
+ if (struct.isSetQosParams()) {
+ optionals.set(9);
+ }
+ oprot.writeBitSet(optionals, 10);
+ if (struct.isSetBasicMetadata()) {
+ struct.basicMetadata.write(oprot);
+ }
+ if (struct.isSetApplicationId()) {
+ oprot.writeString(struct.applicationId);
+ }
+ if (struct.isSetApplicationVersion()) {
+ oprot.writeString(struct.applicationVersion);
+ }
+ if (struct.isSetWorkflowTemplateId()) {
+ oprot.writeString(struct.workflowTemplateId);
+ }
+ if (struct.isSetWorklfowTemplateVersion()) {
+ oprot.writeString(struct.worklfowTemplateVersion);
+ }
+ if (struct.isSetExperimentInputs()) {
+ {
+ oprot.writeI32(struct.experimentInputs.size());
+ for (Map.Entry<String, String> _iter5 : struct.experimentInputs.entrySet())
+ {
+ oprot.writeString(_iter5.getKey());
+ oprot.writeString(_iter5.getValue());
+ }
+ }
+ }
+ if (struct.isSetComputationalResourceScheduling()) {
+ struct.computationalResourceScheduling.write(oprot);
+ }
+ if (struct.isSetAdvanceInputDataHandling()) {
+ struct.advanceInputDataHandling.write(oprot);
+ }
+ if (struct.isSetAdvanceOutputDataHandling()) {
+ struct.advanceOutputDataHandling.write(oprot);
+ }
+ if (struct.isSetQosParams()) {
+ struct.qosParams.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, ConfigurationData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(10);
+ if (incoming.get(0)) {
+ struct.basicMetadata = new BasicMetadata();
+ struct.basicMetadata.read(iprot);
+ struct.setBasicMetadataIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.applicationId = iprot.readString();
+ struct.setApplicationIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationVersion = iprot.readString();
+ struct.setApplicationVersionIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.workflowTemplateId = iprot.readString();
+ struct.setWorkflowTemplateIdIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.worklfowTemplateVersion = iprot.readString();
+ struct.setWorklfowTemplateVersionIsSet(true);
+ }
+ if (incoming.get(5)) {
+ {
+ org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.experimentInputs = new HashMap<String,String>(2*_map6.size);
+ for (int _i7 = 0; _i7 < _map6.size; ++_i7)
+ {
+ String _key8;
+ String _val9;
+ _key8 = iprot.readString();
+ _val9 = iprot.readString();
+ struct.experimentInputs.put(_key8, _val9);
+ }
+ }
+ struct.setExperimentInputsIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.computationalResourceScheduling = new ComputationalResourceScheduling();
+ struct.computationalResourceScheduling.read(iprot);
+ struct.setComputationalResourceSchedulingIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.advanceInputDataHandling = new AdvancedInputDataHandling();
+ struct.advanceInputDataHandling.read(iprot);
+ struct.setAdvanceInputDataHandlingIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.advanceOutputDataHandling = new AdvancedOutputDataHandling();
+ struct.advanceOutputDataHandling.read(iprot);
+ struct.setAdvanceOutputDataHandlingIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.qosParams = new QualityOfServiceParams();
+ struct.qosParams.read(iprot);
+ struct.setQosParamsIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/airavata/blob/28ac4b75/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
----------------------------------------------------------------------
diff --git a/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
new file mode 100644
index 0000000..12eceba
--- /dev/null
+++ b/airavata-api/server/src/main/java/org/apache/airavata/model/experiment/QualityOfServiceParams.java
@@ -0,0 +1,607 @@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.airavata.model.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A structure holding Quality of Service Parameters.
+ *
+ */
+@SuppressWarnings("all") public class QualityOfServiceParams implements org.apache.thrift.TBase<QualityOfServiceParams, QualityOfServiceParams._Fields>, java.io.Serializable, Cloneable, Comparable<QualityOfServiceParams> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QualityOfServiceParams");
+
+ private static final org.apache.thrift.protocol.TField START_EXECUTION_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("startExecutionAt", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField EXECUTE_BEFORE_FIELD_DESC = new org.apache.thrift.protocol.TField("executeBefore", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField NUMBEROF_RETRIES_FIELD_DESC = new org.apache.thrift.protocol.TField("numberofRetries", org.apache.thrift.protocol.TType.I32, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new QualityOfServiceParamsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new QualityOfServiceParamsTupleSchemeFactory());
+ }
+
+ public String startExecutionAt; // optional
+ public String executeBefore; // optional
+ public int numberofRetries; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ START_EXECUTION_AT((short)1, "startExecutionAt"),
+ EXECUTE_BEFORE((short)2, "executeBefore"),
+ NUMBEROF_RETRIES((short)3, "numberofRetries");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // START_EXECUTION_AT
+ return START_EXECUTION_AT;
+ case 2: // EXECUTE_BEFORE
+ return EXECUTE_BEFORE;
+ case 3: // NUMBEROF_RETRIES
+ return NUMBEROF_RETRIES;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __NUMBEROFRETRIES_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.START_EXECUTION_AT,_Fields.EXECUTE_BEFORE,_Fields.NUMBEROF_RETRIES};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.START_EXECUTION_AT, new org.apache.thrift.meta_data.FieldMetaData("startExecutionAt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXECUTE_BEFORE, new org.apache.thrift.meta_data.FieldMetaData("executeBefore", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.NUMBEROF_RETRIES, new org.apache.thrift.meta_data.FieldMetaData("numberofRetries", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(QualityOfServiceParams.class, metaDataMap);
+ }
+
+ public QualityOfServiceParams() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public QualityOfServiceParams(QualityOfServiceParams other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetStartExecutionAt()) {
+ this.startExecutionAt = other.startExecutionAt;
+ }
+ if (other.isSetExecuteBefore()) {
+ this.executeBefore = other.executeBefore;
+ }
+ this.numberofRetries = other.numberofRetries;
+ }
+
+ public QualityOfServiceParams deepCopy() {
+ return new QualityOfServiceParams(this);
+ }
+
+ @Override
+ public void clear() {
+ this.startExecutionAt = null;
+ this.executeBefore = null;
+ setNumberofRetriesIsSet(false);
+ this.numberofRetries = 0;
+ }
+
+ public String getStartExecutionAt() {
+ return this.startExecutionAt;
+ }
+
+ public QualityOfServiceParams setStartExecutionAt(String startExecutionAt) {
+ this.startExecutionAt = startExecutionAt;
+ return this;
+ }
+
+ public void unsetStartExecutionAt() {
+ this.startExecutionAt = null;
+ }
+
+ /** Returns true if field startExecutionAt is set (has been assigned a value) and false otherwise */
+ public boolean isSetStartExecutionAt() {
+ return this.startExecutionAt != null;
+ }
+
+ public void setStartExecutionAtIsSet(boolean value) {
+ if (!value) {
+ this.startExecutionAt = null;
+ }
+ }
+
+ public String getExecuteBefore() {
+ return this.executeBefore;
+ }
+
+ public QualityOfServiceParams setExecuteBefore(String executeBefore) {
+ this.executeBefore = executeBefore;
+ return this;
+ }
+
+ public void unsetExecuteBefore() {
+ this.executeBefore = null;
+ }
+
+ /** Returns true if field executeBefore is set (has been assigned a value) and false otherwise */
+ public boolean isSetExecuteBefore() {
+ return this.executeBefore != null;
+ }
+
+ public void setExecuteBeforeIsSet(boolean value) {
+ if (!value) {
+ this.executeBefore = null;
+ }
+ }
+
+ public int getNumberofRetries() {
+ return this.numberofRetries;
+ }
+
+ public QualityOfServiceParams setNumberofRetries(int numberofRetries) {
+ this.numberofRetries = numberofRetries;
+ setNumberofRetriesIsSet(true);
+ return this;
+ }
+
+ public void unsetNumberofRetries() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID);
+ }
+
+ /** Returns true if field numberofRetries is set (has been assigned a value) and false otherwise */
+ public boolean isSetNumberofRetries() {
+ return EncodingUtils.testBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID);
+ }
+
+ public void setNumberofRetriesIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMBEROFRETRIES_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case START_EXECUTION_AT:
+ if (value == null) {
+ unsetStartExecutionAt();
+ } else {
+ setStartExecutionAt((String)value);
+ }
+ break;
+
+ case EXECUTE_BEFORE:
+ if (value == null) {
+ unsetExecuteBefore();
+ } else {
+ setExecuteBefore((String)value);
+ }
+ break;
+
+ case NUMBEROF_RETRIES:
+ if (value == null) {
+ unsetNumberofRetries();
+ } else {
+ setNumberofRetries((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case START_EXECUTION_AT:
+ return getStartExecutionAt();
+
+ case EXECUTE_BEFORE:
+ return getExecuteBefore();
+
+ case NUMBEROF_RETRIES:
+ return Integer.valueOf(getNumberofRetries());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case START_EXECUTION_AT:
+ return isSetStartExecutionAt();
+ case EXECUTE_BEFORE:
+ return isSetExecuteBefore();
+ case NUMBEROF_RETRIES:
+ return isSetNumberofRetries();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof QualityOfServiceParams)
+ return this.equals((QualityOfServiceParams)that);
+ return false;
+ }
+
+ public boolean equals(QualityOfServiceParams that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_startExecutionAt = true && this.isSetStartExecutionAt();
+ boolean that_present_startExecutionAt = true && that.isSetStartExecutionAt();
+ if (this_present_startExecutionAt || that_present_startExecutionAt) {
+ if (!(this_present_startExecutionAt && that_present_startExecutionAt))
+ return false;
+ if (!this.startExecutionAt.equals(that.startExecutionAt))
+ return false;
+ }
+
+ boolean this_present_executeBefore = true && this.isSetExecuteBefore();
+ boolean that_present_executeBefore = true && that.isSetExecuteBefore();
+ if (this_present_executeBefore || that_present_executeBefore) {
+ if (!(this_present_executeBefore && that_present_executeBefore))
+ return false;
+ if (!this.executeBefore.equals(that.executeBefore))
+ return false;
+ }
+
+ boolean this_present_numberofRetries = true && this.isSetNumberofRetries();
+ boolean that_present_numberofRetries = true && that.isSetNumberofRetries();
+ if (this_present_numberofRetries || that_present_numberofRetries) {
+ if (!(this_present_numberofRetries && that_present_numberofRetries))
+ return false;
+ if (this.numberofRetries != that.numberofRetries)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(QualityOfServiceParams other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetStartExecutionAt()).compareTo(other.isSetStartExecutionAt());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStartExecutionAt()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startExecutionAt, other.startExecutionAt);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExecuteBefore()).compareTo(other.isSetExecuteBefore());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExecuteBefore()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executeBefore, other.executeBefore);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNumberofRetries()).compareTo(other.isSetNumberofRetries());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNumberofRetries()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberofRetries, other.numberofRetries);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("QualityOfServiceParams(");
+ boolean first = true;
+
+ if (isSetStartExecutionAt()) {
+ sb.append("startExecutionAt:");
+ if (this.startExecutionAt == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.startExecutionAt);
+ }
+ first = false;
+ }
+ if (isSetExecuteBefore()) {
+ if (!first) sb.append(", ");
+ sb.append("executeBefore:");
+ if (this.executeBefore == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.executeBefore);
+ }
+ first = false;
+ }
+ if (isSetNumberofRetries()) {
+ if (!first) sb.append(", ");
+ sb.append("numberofRetries:");
+ sb.append(this.numberofRetries);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class QualityOfServiceParamsStandardSchemeFactory implements SchemeFactory {
+ public QualityOfServiceParamsStandardScheme getScheme() {
+ return new QualityOfServiceParamsStandardScheme();
+ }
+ }
+
+ private static class QualityOfServiceParamsStandardScheme extends StandardScheme<QualityOfServiceParams> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, QualityOfServiceParams 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: // START_EXECUTION_AT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.startExecutionAt = iprot.readString();
+ struct.setStartExecutionAtIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // EXECUTE_BEFORE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.executeBefore = iprot.readString();
+ struct.setExecuteBeforeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NUMBEROF_RETRIES
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.numberofRetries = iprot.readI32();
+ struct.setNumberofRetriesIsSet(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, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.startExecutionAt != null) {
+ if (struct.isSetStartExecutionAt()) {
+ oprot.writeFieldBegin(START_EXECUTION_AT_FIELD_DESC);
+ oprot.writeString(struct.startExecutionAt);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.executeBefore != null) {
+ if (struct.isSetExecuteBefore()) {
+ oprot.writeFieldBegin(EXECUTE_BEFORE_FIELD_DESC);
+ oprot.writeString(struct.executeBefore);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.isSetNumberofRetries()) {
+ oprot.writeFieldBegin(NUMBEROF_RETRIES_FIELD_DESC);
+ oprot.writeI32(struct.numberofRetries);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class QualityOfServiceParamsTupleSchemeFactory implements SchemeFactory {
+ public QualityOfServiceParamsTupleScheme getScheme() {
+ return new QualityOfServiceParamsTupleScheme();
+ }
+ }
+
+ private static class QualityOfServiceParamsTupleScheme extends TupleScheme<QualityOfServiceParams> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetStartExecutionAt()) {
+ optionals.set(0);
+ }
+ if (struct.isSetExecuteBefore()) {
+ optionals.set(1);
+ }
+ if (struct.isSetNumberofRetries()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetStartExecutionAt()) {
+ oprot.writeString(struct.startExecutionAt);
+ }
+ if (struct.isSetExecuteBefore()) {
+ oprot.writeString(struct.executeBefore);
+ }
+ if (struct.isSetNumberofRetries()) {
+ oprot.writeI32(struct.numberofRetries);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, QualityOfServiceParams struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.startExecutionAt = iprot.readString();
+ struct.setStartExecutionAtIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.executeBefore = iprot.readString();
+ struct.setExecuteBeforeIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.numberofRetries = iprot.readI32();
+ struct.setNumberofRetriesIsSet(true);
+ }
+ }
+ }
+
+}
+