blob: b6e45269f0394e4e45bb9f8fd6938fb5a57ba74e [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.model.appcatalog.groupresourceprofile;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* Group Resource Profile
*
* gatewayID:
* Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration.
*
* groupResourceProfileId:
*
* computeResourcePreferences:
* List of resource preferences for each of the registered compute resources.
*
* computeResourcePolicies:
* List of enforced policies for each of the registered compute resources.
*
* batchQueueResourcePolicies:
* List of enforced policies on registered batch queues
*
* defaultCredentialStoreToken:
* The default credential store token to use for compute resources that don't specify a resource specific credential store token.
*
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
public class GroupResourceProfile implements org.apache.thrift.TBase<GroupResourceProfile, GroupResourceProfile._Fields>, java.io.Serializable, Cloneable, Comparable<GroupResourceProfile> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupResourceProfile");
private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField GROUP_RESOURCE_PROFILE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupResourceProfileId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField GROUP_RESOURCE_PROFILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("groupResourceProfileName", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField COMPUTE_PREFERENCES_FIELD_DESC = new org.apache.thrift.protocol.TField("computePreferences", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField COMPUTE_RESOURCE_POLICIES_FIELD_DESC = new org.apache.thrift.protocol.TField("computeResourcePolicies", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField BATCH_QUEUE_RESOURCE_POLICIES_FIELD_DESC = new org.apache.thrift.protocol.TField("batchQueueResourcePolicies", org.apache.thrift.protocol.TType.LIST, (short)6);
private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creationTime", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField UPDATED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedTime", org.apache.thrift.protocol.TType.I64, (short)8);
private static final org.apache.thrift.protocol.TField DEFAULT_CREDENTIAL_STORE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultCredentialStoreToken", org.apache.thrift.protocol.TType.STRING, (short)9);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GroupResourceProfileStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GroupResourceProfileTupleSchemeFactory();
private java.lang.String gatewayId; // required
private java.lang.String groupResourceProfileId; // required
private java.lang.String groupResourceProfileName; // optional
private java.util.List<GroupComputeResourcePreference> computePreferences; // optional
private java.util.List<ComputeResourcePolicy> computeResourcePolicies; // optional
private java.util.List<BatchQueueResourcePolicy> batchQueueResourcePolicies; // optional
private long creationTime; // optional
private long updatedTime; // optional
private java.lang.String defaultCredentialStoreToken; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
GATEWAY_ID((short)1, "gatewayId"),
GROUP_RESOURCE_PROFILE_ID((short)2, "groupResourceProfileId"),
GROUP_RESOURCE_PROFILE_NAME((short)3, "groupResourceProfileName"),
COMPUTE_PREFERENCES((short)4, "computePreferences"),
COMPUTE_RESOURCE_POLICIES((short)5, "computeResourcePolicies"),
BATCH_QUEUE_RESOURCE_POLICIES((short)6, "batchQueueResourcePolicies"),
CREATION_TIME((short)7, "creationTime"),
UPDATED_TIME((short)8, "updatedTime"),
DEFAULT_CREDENTIAL_STORE_TOKEN((short)9, "defaultCredentialStoreToken");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // GATEWAY_ID
return GATEWAY_ID;
case 2: // GROUP_RESOURCE_PROFILE_ID
return GROUP_RESOURCE_PROFILE_ID;
case 3: // GROUP_RESOURCE_PROFILE_NAME
return GROUP_RESOURCE_PROFILE_NAME;
case 4: // COMPUTE_PREFERENCES
return COMPUTE_PREFERENCES;
case 5: // COMPUTE_RESOURCE_POLICIES
return COMPUTE_RESOURCE_POLICIES;
case 6: // BATCH_QUEUE_RESOURCE_POLICIES
return BATCH_QUEUE_RESOURCE_POLICIES;
case 7: // CREATION_TIME
return CREATION_TIME;
case 8: // UPDATED_TIME
return UPDATED_TIME;
case 9: // DEFAULT_CREDENTIAL_STORE_TOKEN
return DEFAULT_CREDENTIAL_STORE_TOKEN;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new 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 __CREATIONTIME_ISSET_ID = 0;
private static final int __UPDATEDTIME_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.GROUP_RESOURCE_PROFILE_NAME,_Fields.COMPUTE_PREFERENCES,_Fields.COMPUTE_RESOURCE_POLICIES,_Fields.BATCH_QUEUE_RESOURCE_POLICIES,_Fields.CREATION_TIME,_Fields.UPDATED_TIME,_Fields.DEFAULT_CREDENTIAL_STORE_TOKEN};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GROUP_RESOURCE_PROFILE_ID, new org.apache.thrift.meta_data.FieldMetaData("groupResourceProfileId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.GROUP_RESOURCE_PROFILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("groupResourceProfileName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COMPUTE_PREFERENCES, new org.apache.thrift.meta_data.FieldMetaData("computePreferences", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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, GroupComputeResourcePreference.class))));
tmpMap.put(_Fields.COMPUTE_RESOURCE_POLICIES, new org.apache.thrift.meta_data.FieldMetaData("computeResourcePolicies", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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, ComputeResourcePolicy.class))));
tmpMap.put(_Fields.BATCH_QUEUE_RESOURCE_POLICIES, new org.apache.thrift.meta_data.FieldMetaData("batchQueueResourcePolicies", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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, BatchQueueResourcePolicy.class))));
tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.UPDATED_TIME, new org.apache.thrift.meta_data.FieldMetaData("updatedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.DEFAULT_CREDENTIAL_STORE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("defaultCredentialStoreToken", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(GroupResourceProfile.class, metaDataMap);
}
public GroupResourceProfile() {
this.groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS";
}
public GroupResourceProfile(
java.lang.String gatewayId,
java.lang.String groupResourceProfileId)
{
this();
this.gatewayId = gatewayId;
this.groupResourceProfileId = groupResourceProfileId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public GroupResourceProfile(GroupResourceProfile other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetGatewayId()) {
this.gatewayId = other.gatewayId;
}
if (other.isSetGroupResourceProfileId()) {
this.groupResourceProfileId = other.groupResourceProfileId;
}
if (other.isSetGroupResourceProfileName()) {
this.groupResourceProfileName = other.groupResourceProfileName;
}
if (other.isSetComputePreferences()) {
java.util.List<GroupComputeResourcePreference> __this__computePreferences = new java.util.ArrayList<GroupComputeResourcePreference>(other.computePreferences.size());
for (GroupComputeResourcePreference other_element : other.computePreferences) {
__this__computePreferences.add(new GroupComputeResourcePreference(other_element));
}
this.computePreferences = __this__computePreferences;
}
if (other.isSetComputeResourcePolicies()) {
java.util.List<ComputeResourcePolicy> __this__computeResourcePolicies = new java.util.ArrayList<ComputeResourcePolicy>(other.computeResourcePolicies.size());
for (ComputeResourcePolicy other_element : other.computeResourcePolicies) {
__this__computeResourcePolicies.add(new ComputeResourcePolicy(other_element));
}
this.computeResourcePolicies = __this__computeResourcePolicies;
}
if (other.isSetBatchQueueResourcePolicies()) {
java.util.List<BatchQueueResourcePolicy> __this__batchQueueResourcePolicies = new java.util.ArrayList<BatchQueueResourcePolicy>(other.batchQueueResourcePolicies.size());
for (BatchQueueResourcePolicy other_element : other.batchQueueResourcePolicies) {
__this__batchQueueResourcePolicies.add(new BatchQueueResourcePolicy(other_element));
}
this.batchQueueResourcePolicies = __this__batchQueueResourcePolicies;
}
this.creationTime = other.creationTime;
this.updatedTime = other.updatedTime;
if (other.isSetDefaultCredentialStoreToken()) {
this.defaultCredentialStoreToken = other.defaultCredentialStoreToken;
}
}
public GroupResourceProfile deepCopy() {
return new GroupResourceProfile(this);
}
@Override
public void clear() {
this.gatewayId = null;
this.groupResourceProfileId = "DO_NOT_SET_AT_CLIENTS";
this.groupResourceProfileName = null;
this.computePreferences = null;
this.computeResourcePolicies = null;
this.batchQueueResourcePolicies = null;
setCreationTimeIsSet(false);
this.creationTime = 0;
setUpdatedTimeIsSet(false);
this.updatedTime = 0;
this.defaultCredentialStoreToken = null;
}
public java.lang.String getGatewayId() {
return this.gatewayId;
}
public void setGatewayId(java.lang.String gatewayId) {
this.gatewayId = gatewayId;
}
public void unsetGatewayId() {
this.gatewayId = null;
}
/** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
public boolean isSetGatewayId() {
return this.gatewayId != null;
}
public void setGatewayIdIsSet(boolean value) {
if (!value) {
this.gatewayId = null;
}
}
public java.lang.String getGroupResourceProfileId() {
return this.groupResourceProfileId;
}
public void setGroupResourceProfileId(java.lang.String groupResourceProfileId) {
this.groupResourceProfileId = groupResourceProfileId;
}
public void unsetGroupResourceProfileId() {
this.groupResourceProfileId = null;
}
/** Returns true if field groupResourceProfileId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupResourceProfileId() {
return this.groupResourceProfileId != null;
}
public void setGroupResourceProfileIdIsSet(boolean value) {
if (!value) {
this.groupResourceProfileId = null;
}
}
public java.lang.String getGroupResourceProfileName() {
return this.groupResourceProfileName;
}
public void setGroupResourceProfileName(java.lang.String groupResourceProfileName) {
this.groupResourceProfileName = groupResourceProfileName;
}
public void unsetGroupResourceProfileName() {
this.groupResourceProfileName = null;
}
/** Returns true if field groupResourceProfileName is set (has been assigned a value) and false otherwise */
public boolean isSetGroupResourceProfileName() {
return this.groupResourceProfileName != null;
}
public void setGroupResourceProfileNameIsSet(boolean value) {
if (!value) {
this.groupResourceProfileName = null;
}
}
public int getComputePreferencesSize() {
return (this.computePreferences == null) ? 0 : this.computePreferences.size();
}
public java.util.Iterator<GroupComputeResourcePreference> getComputePreferencesIterator() {
return (this.computePreferences == null) ? null : this.computePreferences.iterator();
}
public void addToComputePreferences(GroupComputeResourcePreference elem) {
if (this.computePreferences == null) {
this.computePreferences = new java.util.ArrayList<GroupComputeResourcePreference>();
}
this.computePreferences.add(elem);
}
public java.util.List<GroupComputeResourcePreference> getComputePreferences() {
return this.computePreferences;
}
public void setComputePreferences(java.util.List<GroupComputeResourcePreference> computePreferences) {
this.computePreferences = computePreferences;
}
public void unsetComputePreferences() {
this.computePreferences = null;
}
/** Returns true if field computePreferences is set (has been assigned a value) and false otherwise */
public boolean isSetComputePreferences() {
return this.computePreferences != null;
}
public void setComputePreferencesIsSet(boolean value) {
if (!value) {
this.computePreferences = null;
}
}
public int getComputeResourcePoliciesSize() {
return (this.computeResourcePolicies == null) ? 0 : this.computeResourcePolicies.size();
}
public java.util.Iterator<ComputeResourcePolicy> getComputeResourcePoliciesIterator() {
return (this.computeResourcePolicies == null) ? null : this.computeResourcePolicies.iterator();
}
public void addToComputeResourcePolicies(ComputeResourcePolicy elem) {
if (this.computeResourcePolicies == null) {
this.computeResourcePolicies = new java.util.ArrayList<ComputeResourcePolicy>();
}
this.computeResourcePolicies.add(elem);
}
public java.util.List<ComputeResourcePolicy> getComputeResourcePolicies() {
return this.computeResourcePolicies;
}
public void setComputeResourcePolicies(java.util.List<ComputeResourcePolicy> computeResourcePolicies) {
this.computeResourcePolicies = computeResourcePolicies;
}
public void unsetComputeResourcePolicies() {
this.computeResourcePolicies = null;
}
/** Returns true if field computeResourcePolicies is set (has been assigned a value) and false otherwise */
public boolean isSetComputeResourcePolicies() {
return this.computeResourcePolicies != null;
}
public void setComputeResourcePoliciesIsSet(boolean value) {
if (!value) {
this.computeResourcePolicies = null;
}
}
public int getBatchQueueResourcePoliciesSize() {
return (this.batchQueueResourcePolicies == null) ? 0 : this.batchQueueResourcePolicies.size();
}
public java.util.Iterator<BatchQueueResourcePolicy> getBatchQueueResourcePoliciesIterator() {
return (this.batchQueueResourcePolicies == null) ? null : this.batchQueueResourcePolicies.iterator();
}
public void addToBatchQueueResourcePolicies(BatchQueueResourcePolicy elem) {
if (this.batchQueueResourcePolicies == null) {
this.batchQueueResourcePolicies = new java.util.ArrayList<BatchQueueResourcePolicy>();
}
this.batchQueueResourcePolicies.add(elem);
}
public java.util.List<BatchQueueResourcePolicy> getBatchQueueResourcePolicies() {
return this.batchQueueResourcePolicies;
}
public void setBatchQueueResourcePolicies(java.util.List<BatchQueueResourcePolicy> batchQueueResourcePolicies) {
this.batchQueueResourcePolicies = batchQueueResourcePolicies;
}
public void unsetBatchQueueResourcePolicies() {
this.batchQueueResourcePolicies = null;
}
/** Returns true if field batchQueueResourcePolicies is set (has been assigned a value) and false otherwise */
public boolean isSetBatchQueueResourcePolicies() {
return this.batchQueueResourcePolicies != null;
}
public void setBatchQueueResourcePoliciesIsSet(boolean value) {
if (!value) {
this.batchQueueResourcePolicies = null;
}
}
public long getCreationTime() {
return this.creationTime;
}
public void setCreationTime(long creationTime) {
this.creationTime = creationTime;
setCreationTimeIsSet(true);
}
public void unsetCreationTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
}
/** Returns true if field creationTime is set (has been assigned a value) and false otherwise */
public boolean isSetCreationTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATIONTIME_ISSET_ID);
}
public void setCreationTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATIONTIME_ISSET_ID, value);
}
public long getUpdatedTime() {
return this.updatedTime;
}
public void setUpdatedTime(long updatedTime) {
this.updatedTime = updatedTime;
setUpdatedTimeIsSet(true);
}
public void unsetUpdatedTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
}
/** Returns true if field updatedTime is set (has been assigned a value) and false otherwise */
public boolean isSetUpdatedTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID);
}
public void setUpdatedTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATEDTIME_ISSET_ID, value);
}
public java.lang.String getDefaultCredentialStoreToken() {
return this.defaultCredentialStoreToken;
}
public void setDefaultCredentialStoreToken(java.lang.String defaultCredentialStoreToken) {
this.defaultCredentialStoreToken = defaultCredentialStoreToken;
}
public void unsetDefaultCredentialStoreToken() {
this.defaultCredentialStoreToken = null;
}
/** Returns true if field defaultCredentialStoreToken is set (has been assigned a value) and false otherwise */
public boolean isSetDefaultCredentialStoreToken() {
return this.defaultCredentialStoreToken != null;
}
public void setDefaultCredentialStoreTokenIsSet(boolean value) {
if (!value) {
this.defaultCredentialStoreToken = null;
}
}
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case GATEWAY_ID:
if (value == null) {
unsetGatewayId();
} else {
setGatewayId((java.lang.String)value);
}
break;
case GROUP_RESOURCE_PROFILE_ID:
if (value == null) {
unsetGroupResourceProfileId();
} else {
setGroupResourceProfileId((java.lang.String)value);
}
break;
case GROUP_RESOURCE_PROFILE_NAME:
if (value == null) {
unsetGroupResourceProfileName();
} else {
setGroupResourceProfileName((java.lang.String)value);
}
break;
case COMPUTE_PREFERENCES:
if (value == null) {
unsetComputePreferences();
} else {
setComputePreferences((java.util.List<GroupComputeResourcePreference>)value);
}
break;
case COMPUTE_RESOURCE_POLICIES:
if (value == null) {
unsetComputeResourcePolicies();
} else {
setComputeResourcePolicies((java.util.List<ComputeResourcePolicy>)value);
}
break;
case BATCH_QUEUE_RESOURCE_POLICIES:
if (value == null) {
unsetBatchQueueResourcePolicies();
} else {
setBatchQueueResourcePolicies((java.util.List<BatchQueueResourcePolicy>)value);
}
break;
case CREATION_TIME:
if (value == null) {
unsetCreationTime();
} else {
setCreationTime((java.lang.Long)value);
}
break;
case UPDATED_TIME:
if (value == null) {
unsetUpdatedTime();
} else {
setUpdatedTime((java.lang.Long)value);
}
break;
case DEFAULT_CREDENTIAL_STORE_TOKEN:
if (value == null) {
unsetDefaultCredentialStoreToken();
} else {
setDefaultCredentialStoreToken((java.lang.String)value);
}
break;
}
}
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case GATEWAY_ID:
return getGatewayId();
case GROUP_RESOURCE_PROFILE_ID:
return getGroupResourceProfileId();
case GROUP_RESOURCE_PROFILE_NAME:
return getGroupResourceProfileName();
case COMPUTE_PREFERENCES:
return getComputePreferences();
case COMPUTE_RESOURCE_POLICIES:
return getComputeResourcePolicies();
case BATCH_QUEUE_RESOURCE_POLICIES:
return getBatchQueueResourcePolicies();
case CREATION_TIME:
return getCreationTime();
case UPDATED_TIME:
return getUpdatedTime();
case DEFAULT_CREDENTIAL_STORE_TOKEN:
return getDefaultCredentialStoreToken();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case GATEWAY_ID:
return isSetGatewayId();
case GROUP_RESOURCE_PROFILE_ID:
return isSetGroupResourceProfileId();
case GROUP_RESOURCE_PROFILE_NAME:
return isSetGroupResourceProfileName();
case COMPUTE_PREFERENCES:
return isSetComputePreferences();
case COMPUTE_RESOURCE_POLICIES:
return isSetComputeResourcePolicies();
case BATCH_QUEUE_RESOURCE_POLICIES:
return isSetBatchQueueResourcePolicies();
case CREATION_TIME:
return isSetCreationTime();
case UPDATED_TIME:
return isSetUpdatedTime();
case DEFAULT_CREDENTIAL_STORE_TOKEN:
return isSetDefaultCredentialStoreToken();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof GroupResourceProfile)
return this.equals((GroupResourceProfile)that);
return false;
}
public boolean equals(GroupResourceProfile that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_gatewayId = true && this.isSetGatewayId();
boolean that_present_gatewayId = true && that.isSetGatewayId();
if (this_present_gatewayId || that_present_gatewayId) {
if (!(this_present_gatewayId && that_present_gatewayId))
return false;
if (!this.gatewayId.equals(that.gatewayId))
return false;
}
boolean this_present_groupResourceProfileId = true && this.isSetGroupResourceProfileId();
boolean that_present_groupResourceProfileId = true && that.isSetGroupResourceProfileId();
if (this_present_groupResourceProfileId || that_present_groupResourceProfileId) {
if (!(this_present_groupResourceProfileId && that_present_groupResourceProfileId))
return false;
if (!this.groupResourceProfileId.equals(that.groupResourceProfileId))
return false;
}
boolean this_present_groupResourceProfileName = true && this.isSetGroupResourceProfileName();
boolean that_present_groupResourceProfileName = true && that.isSetGroupResourceProfileName();
if (this_present_groupResourceProfileName || that_present_groupResourceProfileName) {
if (!(this_present_groupResourceProfileName && that_present_groupResourceProfileName))
return false;
if (!this.groupResourceProfileName.equals(that.groupResourceProfileName))
return false;
}
boolean this_present_computePreferences = true && this.isSetComputePreferences();
boolean that_present_computePreferences = true && that.isSetComputePreferences();
if (this_present_computePreferences || that_present_computePreferences) {
if (!(this_present_computePreferences && that_present_computePreferences))
return false;
if (!this.computePreferences.equals(that.computePreferences))
return false;
}
boolean this_present_computeResourcePolicies = true && this.isSetComputeResourcePolicies();
boolean that_present_computeResourcePolicies = true && that.isSetComputeResourcePolicies();
if (this_present_computeResourcePolicies || that_present_computeResourcePolicies) {
if (!(this_present_computeResourcePolicies && that_present_computeResourcePolicies))
return false;
if (!this.computeResourcePolicies.equals(that.computeResourcePolicies))
return false;
}
boolean this_present_batchQueueResourcePolicies = true && this.isSetBatchQueueResourcePolicies();
boolean that_present_batchQueueResourcePolicies = true && that.isSetBatchQueueResourcePolicies();
if (this_present_batchQueueResourcePolicies || that_present_batchQueueResourcePolicies) {
if (!(this_present_batchQueueResourcePolicies && that_present_batchQueueResourcePolicies))
return false;
if (!this.batchQueueResourcePolicies.equals(that.batchQueueResourcePolicies))
return false;
}
boolean this_present_creationTime = true && this.isSetCreationTime();
boolean that_present_creationTime = true && that.isSetCreationTime();
if (this_present_creationTime || that_present_creationTime) {
if (!(this_present_creationTime && that_present_creationTime))
return false;
if (this.creationTime != that.creationTime)
return false;
}
boolean this_present_updatedTime = true && this.isSetUpdatedTime();
boolean that_present_updatedTime = true && that.isSetUpdatedTime();
if (this_present_updatedTime || that_present_updatedTime) {
if (!(this_present_updatedTime && that_present_updatedTime))
return false;
if (this.updatedTime != that.updatedTime)
return false;
}
boolean this_present_defaultCredentialStoreToken = true && this.isSetDefaultCredentialStoreToken();
boolean that_present_defaultCredentialStoreToken = true && that.isSetDefaultCredentialStoreToken();
if (this_present_defaultCredentialStoreToken || that_present_defaultCredentialStoreToken) {
if (!(this_present_defaultCredentialStoreToken && that_present_defaultCredentialStoreToken))
return false;
if (!this.defaultCredentialStoreToken.equals(that.defaultCredentialStoreToken))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
if (isSetGatewayId())
hashCode = hashCode * 8191 + gatewayId.hashCode();
hashCode = hashCode * 8191 + ((isSetGroupResourceProfileId()) ? 131071 : 524287);
if (isSetGroupResourceProfileId())
hashCode = hashCode * 8191 + groupResourceProfileId.hashCode();
hashCode = hashCode * 8191 + ((isSetGroupResourceProfileName()) ? 131071 : 524287);
if (isSetGroupResourceProfileName())
hashCode = hashCode * 8191 + groupResourceProfileName.hashCode();
hashCode = hashCode * 8191 + ((isSetComputePreferences()) ? 131071 : 524287);
if (isSetComputePreferences())
hashCode = hashCode * 8191 + computePreferences.hashCode();
hashCode = hashCode * 8191 + ((isSetComputeResourcePolicies()) ? 131071 : 524287);
if (isSetComputeResourcePolicies())
hashCode = hashCode * 8191 + computeResourcePolicies.hashCode();
hashCode = hashCode * 8191 + ((isSetBatchQueueResourcePolicies()) ? 131071 : 524287);
if (isSetBatchQueueResourcePolicies())
hashCode = hashCode * 8191 + batchQueueResourcePolicies.hashCode();
hashCode = hashCode * 8191 + ((isSetCreationTime()) ? 131071 : 524287);
if (isSetCreationTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationTime);
hashCode = hashCode * 8191 + ((isSetUpdatedTime()) ? 131071 : 524287);
if (isSetUpdatedTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updatedTime);
hashCode = hashCode * 8191 + ((isSetDefaultCredentialStoreToken()) ? 131071 : 524287);
if (isSetDefaultCredentialStoreToken())
hashCode = hashCode * 8191 + defaultCredentialStoreToken.hashCode();
return hashCode;
}
@Override
public int compareTo(GroupResourceProfile other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.valueOf(isSetGatewayId()).compareTo(other.isSetGatewayId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGatewayId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, other.gatewayId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGroupResourceProfileId()).compareTo(other.isSetGroupResourceProfileId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupResourceProfileId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupResourceProfileId, other.groupResourceProfileId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetGroupResourceProfileName()).compareTo(other.isSetGroupResourceProfileName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupResourceProfileName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupResourceProfileName, other.groupResourceProfileName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetComputePreferences()).compareTo(other.isSetComputePreferences());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetComputePreferences()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computePreferences, other.computePreferences);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetComputeResourcePolicies()).compareTo(other.isSetComputeResourcePolicies());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetComputeResourcePolicies()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.computeResourcePolicies, other.computeResourcePolicies);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetBatchQueueResourcePolicies()).compareTo(other.isSetBatchQueueResourcePolicies());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBatchQueueResourcePolicies()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchQueueResourcePolicies, other.batchQueueResourcePolicies);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetCreationTime()).compareTo(other.isSetCreationTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCreationTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creationTime, other.creationTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetUpdatedTime()).compareTo(other.isSetUpdatedTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpdatedTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedTime, other.updatedTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetDefaultCredentialStoreToken()).compareTo(other.isSetDefaultCredentialStoreToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDefaultCredentialStoreToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultCredentialStoreToken, other.defaultCredentialStoreToken);
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("GroupResourceProfile(");
boolean first = true;
sb.append("gatewayId:");
if (this.gatewayId == null) {
sb.append("null");
} else {
sb.append(this.gatewayId);
}
first = false;
if (!first) sb.append(", ");
sb.append("groupResourceProfileId:");
if (this.groupResourceProfileId == null) {
sb.append("null");
} else {
sb.append(this.groupResourceProfileId);
}
first = false;
if (isSetGroupResourceProfileName()) {
if (!first) sb.append(", ");
sb.append("groupResourceProfileName:");
if (this.groupResourceProfileName == null) {
sb.append("null");
} else {
sb.append(this.groupResourceProfileName);
}
first = false;
}
if (isSetComputePreferences()) {
if (!first) sb.append(", ");
sb.append("computePreferences:");
if (this.computePreferences == null) {
sb.append("null");
} else {
sb.append(this.computePreferences);
}
first = false;
}
if (isSetComputeResourcePolicies()) {
if (!first) sb.append(", ");
sb.append("computeResourcePolicies:");
if (this.computeResourcePolicies == null) {
sb.append("null");
} else {
sb.append(this.computeResourcePolicies);
}
first = false;
}
if (isSetBatchQueueResourcePolicies()) {
if (!first) sb.append(", ");
sb.append("batchQueueResourcePolicies:");
if (this.batchQueueResourcePolicies == null) {
sb.append("null");
} else {
sb.append(this.batchQueueResourcePolicies);
}
first = false;
}
if (isSetCreationTime()) {
if (!first) sb.append(", ");
sb.append("creationTime:");
sb.append(this.creationTime);
first = false;
}
if (isSetUpdatedTime()) {
if (!first) sb.append(", ");
sb.append("updatedTime:");
sb.append(this.updatedTime);
first = false;
}
if (isSetDefaultCredentialStoreToken()) {
if (!first) sb.append(", ");
sb.append("defaultCredentialStoreToken:");
if (this.defaultCredentialStoreToken == null) {
sb.append("null");
} else {
sb.append(this.defaultCredentialStoreToken);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (!isSetGatewayId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'gatewayId' is unset! Struct:" + toString());
}
if (!isSetGroupResourceProfileId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'groupResourceProfileId' is unset! 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 {
// 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 GroupResourceProfileStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupResourceProfileStandardScheme getScheme() {
return new GroupResourceProfileStandardScheme();
}
}
private static class GroupResourceProfileStandardScheme extends org.apache.thrift.scheme.StandardScheme<GroupResourceProfile> {
public void read(org.apache.thrift.protocol.TProtocol iprot, GroupResourceProfile struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // GATEWAY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // GROUP_RESOURCE_PROFILE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupResourceProfileId = iprot.readString();
struct.setGroupResourceProfileIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // GROUP_RESOURCE_PROFILE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.groupResourceProfileName = iprot.readString();
struct.setGroupResourceProfileNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // COMPUTE_PREFERENCES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
struct.computePreferences = new java.util.ArrayList<GroupComputeResourcePreference>(_list32.size);
GroupComputeResourcePreference _elem33;
for (int _i34 = 0; _i34 < _list32.size; ++_i34)
{
_elem33 = new GroupComputeResourcePreference();
_elem33.read(iprot);
struct.computePreferences.add(_elem33);
}
iprot.readListEnd();
}
struct.setComputePreferencesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // COMPUTE_RESOURCE_POLICIES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list35 = iprot.readListBegin();
struct.computeResourcePolicies = new java.util.ArrayList<ComputeResourcePolicy>(_list35.size);
ComputeResourcePolicy _elem36;
for (int _i37 = 0; _i37 < _list35.size; ++_i37)
{
_elem36 = new ComputeResourcePolicy();
_elem36.read(iprot);
struct.computeResourcePolicies.add(_elem36);
}
iprot.readListEnd();
}
struct.setComputeResourcePoliciesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // BATCH_QUEUE_RESOURCE_POLICIES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list38 = iprot.readListBegin();
struct.batchQueueResourcePolicies = new java.util.ArrayList<BatchQueueResourcePolicy>(_list38.size);
BatchQueueResourcePolicy _elem39;
for (int _i40 = 0; _i40 < _list38.size; ++_i40)
{
_elem39 = new BatchQueueResourcePolicy();
_elem39.read(iprot);
struct.batchQueueResourcePolicies.add(_elem39);
}
iprot.readListEnd();
}
struct.setBatchQueueResourcePoliciesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // CREATION_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.creationTime = iprot.readI64();
struct.setCreationTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // UPDATED_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.updatedTime = iprot.readI64();
struct.setUpdatedTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // DEFAULT_CREDENTIAL_STORE_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.defaultCredentialStoreToken = iprot.readString();
struct.setDefaultCredentialStoreTokenIsSet(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();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, GroupResourceProfile struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.gatewayId != null) {
oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
oprot.writeString(struct.gatewayId);
oprot.writeFieldEnd();
}
if (struct.groupResourceProfileId != null) {
oprot.writeFieldBegin(GROUP_RESOURCE_PROFILE_ID_FIELD_DESC);
oprot.writeString(struct.groupResourceProfileId);
oprot.writeFieldEnd();
}
if (struct.groupResourceProfileName != null) {
if (struct.isSetGroupResourceProfileName()) {
oprot.writeFieldBegin(GROUP_RESOURCE_PROFILE_NAME_FIELD_DESC);
oprot.writeString(struct.groupResourceProfileName);
oprot.writeFieldEnd();
}
}
if (struct.computePreferences != null) {
if (struct.isSetComputePreferences()) {
oprot.writeFieldBegin(COMPUTE_PREFERENCES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.computePreferences.size()));
for (GroupComputeResourcePreference _iter41 : struct.computePreferences)
{
_iter41.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.computeResourcePolicies != null) {
if (struct.isSetComputeResourcePolicies()) {
oprot.writeFieldBegin(COMPUTE_RESOURCE_POLICIES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.computeResourcePolicies.size()));
for (ComputeResourcePolicy _iter42 : struct.computeResourcePolicies)
{
_iter42.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.batchQueueResourcePolicies != null) {
if (struct.isSetBatchQueueResourcePolicies()) {
oprot.writeFieldBegin(BATCH_QUEUE_RESOURCE_POLICIES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.batchQueueResourcePolicies.size()));
for (BatchQueueResourcePolicy _iter43 : struct.batchQueueResourcePolicies)
{
_iter43.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetCreationTime()) {
oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
oprot.writeI64(struct.creationTime);
oprot.writeFieldEnd();
}
if (struct.isSetUpdatedTime()) {
oprot.writeFieldBegin(UPDATED_TIME_FIELD_DESC);
oprot.writeI64(struct.updatedTime);
oprot.writeFieldEnd();
}
if (struct.defaultCredentialStoreToken != null) {
if (struct.isSetDefaultCredentialStoreToken()) {
oprot.writeFieldBegin(DEFAULT_CREDENTIAL_STORE_TOKEN_FIELD_DESC);
oprot.writeString(struct.defaultCredentialStoreToken);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class GroupResourceProfileTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupResourceProfileTupleScheme getScheme() {
return new GroupResourceProfileTupleScheme();
}
}
private static class GroupResourceProfileTupleScheme extends org.apache.thrift.scheme.TupleScheme<GroupResourceProfile> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GroupResourceProfile struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.gatewayId);
oprot.writeString(struct.groupResourceProfileId);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetGroupResourceProfileName()) {
optionals.set(0);
}
if (struct.isSetComputePreferences()) {
optionals.set(1);
}
if (struct.isSetComputeResourcePolicies()) {
optionals.set(2);
}
if (struct.isSetBatchQueueResourcePolicies()) {
optionals.set(3);
}
if (struct.isSetCreationTime()) {
optionals.set(4);
}
if (struct.isSetUpdatedTime()) {
optionals.set(5);
}
if (struct.isSetDefaultCredentialStoreToken()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetGroupResourceProfileName()) {
oprot.writeString(struct.groupResourceProfileName);
}
if (struct.isSetComputePreferences()) {
{
oprot.writeI32(struct.computePreferences.size());
for (GroupComputeResourcePreference _iter44 : struct.computePreferences)
{
_iter44.write(oprot);
}
}
}
if (struct.isSetComputeResourcePolicies()) {
{
oprot.writeI32(struct.computeResourcePolicies.size());
for (ComputeResourcePolicy _iter45 : struct.computeResourcePolicies)
{
_iter45.write(oprot);
}
}
}
if (struct.isSetBatchQueueResourcePolicies()) {
{
oprot.writeI32(struct.batchQueueResourcePolicies.size());
for (BatchQueueResourcePolicy _iter46 : struct.batchQueueResourcePolicies)
{
_iter46.write(oprot);
}
}
}
if (struct.isSetCreationTime()) {
oprot.writeI64(struct.creationTime);
}
if (struct.isSetUpdatedTime()) {
oprot.writeI64(struct.updatedTime);
}
if (struct.isSetDefaultCredentialStoreToken()) {
oprot.writeString(struct.defaultCredentialStoreToken);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GroupResourceProfile struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.gatewayId = iprot.readString();
struct.setGatewayIdIsSet(true);
struct.groupResourceProfileId = iprot.readString();
struct.setGroupResourceProfileIdIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.groupResourceProfileName = iprot.readString();
struct.setGroupResourceProfileNameIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.computePreferences = new java.util.ArrayList<GroupComputeResourcePreference>(_list47.size);
GroupComputeResourcePreference _elem48;
for (int _i49 = 0; _i49 < _list47.size; ++_i49)
{
_elem48 = new GroupComputeResourcePreference();
_elem48.read(iprot);
struct.computePreferences.add(_elem48);
}
}
struct.setComputePreferencesIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list50 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.computeResourcePolicies = new java.util.ArrayList<ComputeResourcePolicy>(_list50.size);
ComputeResourcePolicy _elem51;
for (int _i52 = 0; _i52 < _list50.size; ++_i52)
{
_elem51 = new ComputeResourcePolicy();
_elem51.read(iprot);
struct.computeResourcePolicies.add(_elem51);
}
}
struct.setComputeResourcePoliciesIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.batchQueueResourcePolicies = new java.util.ArrayList<BatchQueueResourcePolicy>(_list53.size);
BatchQueueResourcePolicy _elem54;
for (int _i55 = 0; _i55 < _list53.size; ++_i55)
{
_elem54 = new BatchQueueResourcePolicy();
_elem54.read(iprot);
struct.batchQueueResourcePolicies.add(_elem54);
}
}
struct.setBatchQueueResourcePoliciesIsSet(true);
}
if (incoming.get(4)) {
struct.creationTime = iprot.readI64();
struct.setCreationTimeIsSet(true);
}
if (incoming.get(5)) {
struct.updatedTime = iprot.readI64();
struct.setUpdatedTimeIsSet(true);
}
if (incoming.get(6)) {
struct.defaultCredentialStoreToken = iprot.readString();
struct.setDefaultCredentialStoreTokenIsSet(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();
}
}