blob: 578af71ef228cfc187d73ca07c2a23b34aa9594d [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.18.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.model.data.replica;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.18.1)")
public class DataReplicaLocationModel implements org.apache.thrift.TBase<DataReplicaLocationModel, DataReplicaLocationModel._Fields>, java.io.Serializable, Cloneable, Comparable<DataReplicaLocationModel> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataReplicaLocationModel");
private static final org.apache.thrift.protocol.TField REPLICA_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PRODUCT_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("productUri", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField REPLICA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaName", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField REPLICA_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaDescription", org.apache.thrift.protocol.TType.STRING, (short)4);
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)5);
private static final org.apache.thrift.protocol.TField LAST_MODIFIED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastModifiedTime", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField VALID_UNTIL_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("validUntilTime", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField REPLICA_LOCATION_CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaLocationCategory", org.apache.thrift.protocol.TType.I32, (short)8);
private static final org.apache.thrift.protocol.TField REPLICA_PERSISTENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaPersistentType", org.apache.thrift.protocol.TType.I32, (short)9);
private static final org.apache.thrift.protocol.TField STORAGE_RESOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("storageResourceId", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField FILE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("filePath", org.apache.thrift.protocol.TType.STRING, (short)11);
private static final org.apache.thrift.protocol.TField REPLICA_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("replicaMetadata", org.apache.thrift.protocol.TType.MAP, (short)12);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DataReplicaLocationModelStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DataReplicaLocationModelTupleSchemeFactory();
private @org.apache.thrift.annotation.Nullable java.lang.String replicaId; // optional
private @org.apache.thrift.annotation.Nullable java.lang.String productUri; // optional
private @org.apache.thrift.annotation.Nullable java.lang.String replicaName; // optional
private @org.apache.thrift.annotation.Nullable java.lang.String replicaDescription; // optional
private long creationTime; // optional
private long lastModifiedTime; // optional
private long validUntilTime; // optional
private @org.apache.thrift.annotation.Nullable ReplicaLocationCategory replicaLocationCategory; // optional
private @org.apache.thrift.annotation.Nullable ReplicaPersistentType replicaPersistentType; // optional
private @org.apache.thrift.annotation.Nullable java.lang.String storageResourceId; // optional
private @org.apache.thrift.annotation.Nullable java.lang.String filePath; // optional
private @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> replicaMetadata; // 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 {
REPLICA_ID((short)1, "replicaId"),
PRODUCT_URI((short)2, "productUri"),
REPLICA_NAME((short)3, "replicaName"),
REPLICA_DESCRIPTION((short)4, "replicaDescription"),
CREATION_TIME((short)5, "creationTime"),
LAST_MODIFIED_TIME((short)6, "lastModifiedTime"),
VALID_UNTIL_TIME((short)7, "validUntilTime"),
/**
*
* @see ReplicaLocationCategory
*/
REPLICA_LOCATION_CATEGORY((short)8, "replicaLocationCategory"),
/**
*
* @see ReplicaPersistentType
*/
REPLICA_PERSISTENT_TYPE((short)9, "replicaPersistentType"),
STORAGE_RESOURCE_ID((short)10, "storageResourceId"),
FILE_PATH((short)11, "filePath"),
REPLICA_METADATA((short)12, "replicaMetadata");
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.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // REPLICA_ID
return REPLICA_ID;
case 2: // PRODUCT_URI
return PRODUCT_URI;
case 3: // REPLICA_NAME
return REPLICA_NAME;
case 4: // REPLICA_DESCRIPTION
return REPLICA_DESCRIPTION;
case 5: // CREATION_TIME
return CREATION_TIME;
case 6: // LAST_MODIFIED_TIME
return LAST_MODIFIED_TIME;
case 7: // VALID_UNTIL_TIME
return VALID_UNTIL_TIME;
case 8: // REPLICA_LOCATION_CATEGORY
return REPLICA_LOCATION_CATEGORY;
case 9: // REPLICA_PERSISTENT_TYPE
return REPLICA_PERSISTENT_TYPE;
case 10: // STORAGE_RESOURCE_ID
return STORAGE_RESOURCE_ID;
case 11: // FILE_PATH
return FILE_PATH;
case 12: // REPLICA_METADATA
return REPLICA_METADATA;
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.
*/
@org.apache.thrift.annotation.Nullable
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;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __CREATIONTIME_ISSET_ID = 0;
private static final int __LASTMODIFIEDTIME_ISSET_ID = 1;
private static final int __VALIDUNTILTIME_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.REPLICA_ID,_Fields.PRODUCT_URI,_Fields.REPLICA_NAME,_Fields.REPLICA_DESCRIPTION,_Fields.CREATION_TIME,_Fields.LAST_MODIFIED_TIME,_Fields.VALID_UNTIL_TIME,_Fields.REPLICA_LOCATION_CATEGORY,_Fields.REPLICA_PERSISTENT_TYPE,_Fields.STORAGE_RESOURCE_ID,_Fields.FILE_PATH,_Fields.REPLICA_METADATA};
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.REPLICA_ID, new org.apache.thrift.meta_data.FieldMetaData("replicaId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PRODUCT_URI, new org.apache.thrift.meta_data.FieldMetaData("productUri", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.REPLICA_NAME, new org.apache.thrift.meta_data.FieldMetaData("replicaName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.REPLICA_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("replicaDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
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.LAST_MODIFIED_TIME, new org.apache.thrift.meta_data.FieldMetaData("lastModifiedTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.VALID_UNTIL_TIME, new org.apache.thrift.meta_data.FieldMetaData("validUntilTime", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.REPLICA_LOCATION_CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("replicaLocationCategory", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ReplicaLocationCategory.class)));
tmpMap.put(_Fields.REPLICA_PERSISTENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("replicaPersistentType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ReplicaPersistentType.class)));
tmpMap.put(_Fields.STORAGE_RESOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("storageResourceId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FILE_PATH, new org.apache.thrift.meta_data.FieldMetaData("filePath", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.REPLICA_METADATA, new org.apache.thrift.meta_data.FieldMetaData("replicaMetadata", 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))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DataReplicaLocationModel.class, metaDataMap);
}
public DataReplicaLocationModel() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public DataReplicaLocationModel(DataReplicaLocationModel other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetReplicaId()) {
this.replicaId = other.replicaId;
}
if (other.isSetProductUri()) {
this.productUri = other.productUri;
}
if (other.isSetReplicaName()) {
this.replicaName = other.replicaName;
}
if (other.isSetReplicaDescription()) {
this.replicaDescription = other.replicaDescription;
}
this.creationTime = other.creationTime;
this.lastModifiedTime = other.lastModifiedTime;
this.validUntilTime = other.validUntilTime;
if (other.isSetReplicaLocationCategory()) {
this.replicaLocationCategory = other.replicaLocationCategory;
}
if (other.isSetReplicaPersistentType()) {
this.replicaPersistentType = other.replicaPersistentType;
}
if (other.isSetStorageResourceId()) {
this.storageResourceId = other.storageResourceId;
}
if (other.isSetFilePath()) {
this.filePath = other.filePath;
}
if (other.isSetReplicaMetadata()) {
java.util.Map<java.lang.String,java.lang.String> __this__replicaMetadata = new java.util.HashMap<java.lang.String,java.lang.String>(other.replicaMetadata);
this.replicaMetadata = __this__replicaMetadata;
}
}
@Override
public DataReplicaLocationModel deepCopy() {
return new DataReplicaLocationModel(this);
}
@Override
public void clear() {
this.replicaId = null;
this.productUri = null;
this.replicaName = null;
this.replicaDescription = null;
setCreationTimeIsSet(false);
this.creationTime = 0;
setLastModifiedTimeIsSet(false);
this.lastModifiedTime = 0;
setValidUntilTimeIsSet(false);
this.validUntilTime = 0;
this.replicaLocationCategory = null;
this.replicaPersistentType = null;
this.storageResourceId = null;
this.filePath = null;
this.replicaMetadata = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getReplicaId() {
return this.replicaId;
}
public void setReplicaId(@org.apache.thrift.annotation.Nullable java.lang.String replicaId) {
this.replicaId = replicaId;
}
public void unsetReplicaId() {
this.replicaId = null;
}
/** Returns true if field replicaId is set (has been assigned a value) and false otherwise */
public boolean isSetReplicaId() {
return this.replicaId != null;
}
public void setReplicaIdIsSet(boolean value) {
if (!value) {
this.replicaId = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getProductUri() {
return this.productUri;
}
public void setProductUri(@org.apache.thrift.annotation.Nullable java.lang.String productUri) {
this.productUri = productUri;
}
public void unsetProductUri() {
this.productUri = null;
}
/** Returns true if field productUri is set (has been assigned a value) and false otherwise */
public boolean isSetProductUri() {
return this.productUri != null;
}
public void setProductUriIsSet(boolean value) {
if (!value) {
this.productUri = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getReplicaName() {
return this.replicaName;
}
public void setReplicaName(@org.apache.thrift.annotation.Nullable java.lang.String replicaName) {
this.replicaName = replicaName;
}
public void unsetReplicaName() {
this.replicaName = null;
}
/** Returns true if field replicaName is set (has been assigned a value) and false otherwise */
public boolean isSetReplicaName() {
return this.replicaName != null;
}
public void setReplicaNameIsSet(boolean value) {
if (!value) {
this.replicaName = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getReplicaDescription() {
return this.replicaDescription;
}
public void setReplicaDescription(@org.apache.thrift.annotation.Nullable java.lang.String replicaDescription) {
this.replicaDescription = replicaDescription;
}
public void unsetReplicaDescription() {
this.replicaDescription = null;
}
/** Returns true if field replicaDescription is set (has been assigned a value) and false otherwise */
public boolean isSetReplicaDescription() {
return this.replicaDescription != null;
}
public void setReplicaDescriptionIsSet(boolean value) {
if (!value) {
this.replicaDescription = 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 getLastModifiedTime() {
return this.lastModifiedTime;
}
public void setLastModifiedTime(long lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
setLastModifiedTimeIsSet(true);
}
public void unsetLastModifiedTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LASTMODIFIEDTIME_ISSET_ID);
}
/** Returns true if field lastModifiedTime is set (has been assigned a value) and false otherwise */
public boolean isSetLastModifiedTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LASTMODIFIEDTIME_ISSET_ID);
}
public void setLastModifiedTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LASTMODIFIEDTIME_ISSET_ID, value);
}
public long getValidUntilTime() {
return this.validUntilTime;
}
public void setValidUntilTime(long validUntilTime) {
this.validUntilTime = validUntilTime;
setValidUntilTimeIsSet(true);
}
public void unsetValidUntilTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VALIDUNTILTIME_ISSET_ID);
}
/** Returns true if field validUntilTime is set (has been assigned a value) and false otherwise */
public boolean isSetValidUntilTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VALIDUNTILTIME_ISSET_ID);
}
public void setValidUntilTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VALIDUNTILTIME_ISSET_ID, value);
}
/**
*
* @see ReplicaLocationCategory
*/
@org.apache.thrift.annotation.Nullable
public ReplicaLocationCategory getReplicaLocationCategory() {
return this.replicaLocationCategory;
}
/**
*
* @see ReplicaLocationCategory
*/
public void setReplicaLocationCategory(@org.apache.thrift.annotation.Nullable ReplicaLocationCategory replicaLocationCategory) {
this.replicaLocationCategory = replicaLocationCategory;
}
public void unsetReplicaLocationCategory() {
this.replicaLocationCategory = null;
}
/** Returns true if field replicaLocationCategory is set (has been assigned a value) and false otherwise */
public boolean isSetReplicaLocationCategory() {
return this.replicaLocationCategory != null;
}
public void setReplicaLocationCategoryIsSet(boolean value) {
if (!value) {
this.replicaLocationCategory = null;
}
}
/**
*
* @see ReplicaPersistentType
*/
@org.apache.thrift.annotation.Nullable
public ReplicaPersistentType getReplicaPersistentType() {
return this.replicaPersistentType;
}
/**
*
* @see ReplicaPersistentType
*/
public void setReplicaPersistentType(@org.apache.thrift.annotation.Nullable ReplicaPersistentType replicaPersistentType) {
this.replicaPersistentType = replicaPersistentType;
}
public void unsetReplicaPersistentType() {
this.replicaPersistentType = null;
}
/** Returns true if field replicaPersistentType is set (has been assigned a value) and false otherwise */
public boolean isSetReplicaPersistentType() {
return this.replicaPersistentType != null;
}
public void setReplicaPersistentTypeIsSet(boolean value) {
if (!value) {
this.replicaPersistentType = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getStorageResourceId() {
return this.storageResourceId;
}
public void setStorageResourceId(@org.apache.thrift.annotation.Nullable java.lang.String storageResourceId) {
this.storageResourceId = storageResourceId;
}
public void unsetStorageResourceId() {
this.storageResourceId = null;
}
/** Returns true if field storageResourceId is set (has been assigned a value) and false otherwise */
public boolean isSetStorageResourceId() {
return this.storageResourceId != null;
}
public void setStorageResourceIdIsSet(boolean value) {
if (!value) {
this.storageResourceId = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getFilePath() {
return this.filePath;
}
public void setFilePath(@org.apache.thrift.annotation.Nullable java.lang.String filePath) {
this.filePath = filePath;
}
public void unsetFilePath() {
this.filePath = null;
}
/** Returns true if field filePath is set (has been assigned a value) and false otherwise */
public boolean isSetFilePath() {
return this.filePath != null;
}
public void setFilePathIsSet(boolean value) {
if (!value) {
this.filePath = null;
}
}
public int getReplicaMetadataSize() {
return (this.replicaMetadata == null) ? 0 : this.replicaMetadata.size();
}
public void putToReplicaMetadata(java.lang.String key, java.lang.String val) {
if (this.replicaMetadata == null) {
this.replicaMetadata = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.replicaMetadata.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.String,java.lang.String> getReplicaMetadata() {
return this.replicaMetadata;
}
public void setReplicaMetadata(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> replicaMetadata) {
this.replicaMetadata = replicaMetadata;
}
public void unsetReplicaMetadata() {
this.replicaMetadata = null;
}
/** Returns true if field replicaMetadata is set (has been assigned a value) and false otherwise */
public boolean isSetReplicaMetadata() {
return this.replicaMetadata != null;
}
public void setReplicaMetadataIsSet(boolean value) {
if (!value) {
this.replicaMetadata = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case REPLICA_ID:
if (value == null) {
unsetReplicaId();
} else {
setReplicaId((java.lang.String)value);
}
break;
case PRODUCT_URI:
if (value == null) {
unsetProductUri();
} else {
setProductUri((java.lang.String)value);
}
break;
case REPLICA_NAME:
if (value == null) {
unsetReplicaName();
} else {
setReplicaName((java.lang.String)value);
}
break;
case REPLICA_DESCRIPTION:
if (value == null) {
unsetReplicaDescription();
} else {
setReplicaDescription((java.lang.String)value);
}
break;
case CREATION_TIME:
if (value == null) {
unsetCreationTime();
} else {
setCreationTime((java.lang.Long)value);
}
break;
case LAST_MODIFIED_TIME:
if (value == null) {
unsetLastModifiedTime();
} else {
setLastModifiedTime((java.lang.Long)value);
}
break;
case VALID_UNTIL_TIME:
if (value == null) {
unsetValidUntilTime();
} else {
setValidUntilTime((java.lang.Long)value);
}
break;
case REPLICA_LOCATION_CATEGORY:
if (value == null) {
unsetReplicaLocationCategory();
} else {
setReplicaLocationCategory((ReplicaLocationCategory)value);
}
break;
case REPLICA_PERSISTENT_TYPE:
if (value == null) {
unsetReplicaPersistentType();
} else {
setReplicaPersistentType((ReplicaPersistentType)value);
}
break;
case STORAGE_RESOURCE_ID:
if (value == null) {
unsetStorageResourceId();
} else {
setStorageResourceId((java.lang.String)value);
}
break;
case FILE_PATH:
if (value == null) {
unsetFilePath();
} else {
setFilePath((java.lang.String)value);
}
break;
case REPLICA_METADATA:
if (value == null) {
unsetReplicaMetadata();
} else {
setReplicaMetadata((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case REPLICA_ID:
return getReplicaId();
case PRODUCT_URI:
return getProductUri();
case REPLICA_NAME:
return getReplicaName();
case REPLICA_DESCRIPTION:
return getReplicaDescription();
case CREATION_TIME:
return getCreationTime();
case LAST_MODIFIED_TIME:
return getLastModifiedTime();
case VALID_UNTIL_TIME:
return getValidUntilTime();
case REPLICA_LOCATION_CATEGORY:
return getReplicaLocationCategory();
case REPLICA_PERSISTENT_TYPE:
return getReplicaPersistentType();
case STORAGE_RESOURCE_ID:
return getStorageResourceId();
case FILE_PATH:
return getFilePath();
case REPLICA_METADATA:
return getReplicaMetadata();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case REPLICA_ID:
return isSetReplicaId();
case PRODUCT_URI:
return isSetProductUri();
case REPLICA_NAME:
return isSetReplicaName();
case REPLICA_DESCRIPTION:
return isSetReplicaDescription();
case CREATION_TIME:
return isSetCreationTime();
case LAST_MODIFIED_TIME:
return isSetLastModifiedTime();
case VALID_UNTIL_TIME:
return isSetValidUntilTime();
case REPLICA_LOCATION_CATEGORY:
return isSetReplicaLocationCategory();
case REPLICA_PERSISTENT_TYPE:
return isSetReplicaPersistentType();
case STORAGE_RESOURCE_ID:
return isSetStorageResourceId();
case FILE_PATH:
return isSetFilePath();
case REPLICA_METADATA:
return isSetReplicaMetadata();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof DataReplicaLocationModel)
return this.equals((DataReplicaLocationModel)that);
return false;
}
public boolean equals(DataReplicaLocationModel that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_replicaId = true && this.isSetReplicaId();
boolean that_present_replicaId = true && that.isSetReplicaId();
if (this_present_replicaId || that_present_replicaId) {
if (!(this_present_replicaId && that_present_replicaId))
return false;
if (!this.replicaId.equals(that.replicaId))
return false;
}
boolean this_present_productUri = true && this.isSetProductUri();
boolean that_present_productUri = true && that.isSetProductUri();
if (this_present_productUri || that_present_productUri) {
if (!(this_present_productUri && that_present_productUri))
return false;
if (!this.productUri.equals(that.productUri))
return false;
}
boolean this_present_replicaName = true && this.isSetReplicaName();
boolean that_present_replicaName = true && that.isSetReplicaName();
if (this_present_replicaName || that_present_replicaName) {
if (!(this_present_replicaName && that_present_replicaName))
return false;
if (!this.replicaName.equals(that.replicaName))
return false;
}
boolean this_present_replicaDescription = true && this.isSetReplicaDescription();
boolean that_present_replicaDescription = true && that.isSetReplicaDescription();
if (this_present_replicaDescription || that_present_replicaDescription) {
if (!(this_present_replicaDescription && that_present_replicaDescription))
return false;
if (!this.replicaDescription.equals(that.replicaDescription))
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_lastModifiedTime = true && this.isSetLastModifiedTime();
boolean that_present_lastModifiedTime = true && that.isSetLastModifiedTime();
if (this_present_lastModifiedTime || that_present_lastModifiedTime) {
if (!(this_present_lastModifiedTime && that_present_lastModifiedTime))
return false;
if (this.lastModifiedTime != that.lastModifiedTime)
return false;
}
boolean this_present_validUntilTime = true && this.isSetValidUntilTime();
boolean that_present_validUntilTime = true && that.isSetValidUntilTime();
if (this_present_validUntilTime || that_present_validUntilTime) {
if (!(this_present_validUntilTime && that_present_validUntilTime))
return false;
if (this.validUntilTime != that.validUntilTime)
return false;
}
boolean this_present_replicaLocationCategory = true && this.isSetReplicaLocationCategory();
boolean that_present_replicaLocationCategory = true && that.isSetReplicaLocationCategory();
if (this_present_replicaLocationCategory || that_present_replicaLocationCategory) {
if (!(this_present_replicaLocationCategory && that_present_replicaLocationCategory))
return false;
if (!this.replicaLocationCategory.equals(that.replicaLocationCategory))
return false;
}
boolean this_present_replicaPersistentType = true && this.isSetReplicaPersistentType();
boolean that_present_replicaPersistentType = true && that.isSetReplicaPersistentType();
if (this_present_replicaPersistentType || that_present_replicaPersistentType) {
if (!(this_present_replicaPersistentType && that_present_replicaPersistentType))
return false;
if (!this.replicaPersistentType.equals(that.replicaPersistentType))
return false;
}
boolean this_present_storageResourceId = true && this.isSetStorageResourceId();
boolean that_present_storageResourceId = true && that.isSetStorageResourceId();
if (this_present_storageResourceId || that_present_storageResourceId) {
if (!(this_present_storageResourceId && that_present_storageResourceId))
return false;
if (!this.storageResourceId.equals(that.storageResourceId))
return false;
}
boolean this_present_filePath = true && this.isSetFilePath();
boolean that_present_filePath = true && that.isSetFilePath();
if (this_present_filePath || that_present_filePath) {
if (!(this_present_filePath && that_present_filePath))
return false;
if (!this.filePath.equals(that.filePath))
return false;
}
boolean this_present_replicaMetadata = true && this.isSetReplicaMetadata();
boolean that_present_replicaMetadata = true && that.isSetReplicaMetadata();
if (this_present_replicaMetadata || that_present_replicaMetadata) {
if (!(this_present_replicaMetadata && that_present_replicaMetadata))
return false;
if (!this.replicaMetadata.equals(that.replicaMetadata))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetReplicaId()) ? 131071 : 524287);
if (isSetReplicaId())
hashCode = hashCode * 8191 + replicaId.hashCode();
hashCode = hashCode * 8191 + ((isSetProductUri()) ? 131071 : 524287);
if (isSetProductUri())
hashCode = hashCode * 8191 + productUri.hashCode();
hashCode = hashCode * 8191 + ((isSetReplicaName()) ? 131071 : 524287);
if (isSetReplicaName())
hashCode = hashCode * 8191 + replicaName.hashCode();
hashCode = hashCode * 8191 + ((isSetReplicaDescription()) ? 131071 : 524287);
if (isSetReplicaDescription())
hashCode = hashCode * 8191 + replicaDescription.hashCode();
hashCode = hashCode * 8191 + ((isSetCreationTime()) ? 131071 : 524287);
if (isSetCreationTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creationTime);
hashCode = hashCode * 8191 + ((isSetLastModifiedTime()) ? 131071 : 524287);
if (isSetLastModifiedTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lastModifiedTime);
hashCode = hashCode * 8191 + ((isSetValidUntilTime()) ? 131071 : 524287);
if (isSetValidUntilTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(validUntilTime);
hashCode = hashCode * 8191 + ((isSetReplicaLocationCategory()) ? 131071 : 524287);
if (isSetReplicaLocationCategory())
hashCode = hashCode * 8191 + replicaLocationCategory.getValue();
hashCode = hashCode * 8191 + ((isSetReplicaPersistentType()) ? 131071 : 524287);
if (isSetReplicaPersistentType())
hashCode = hashCode * 8191 + replicaPersistentType.getValue();
hashCode = hashCode * 8191 + ((isSetStorageResourceId()) ? 131071 : 524287);
if (isSetStorageResourceId())
hashCode = hashCode * 8191 + storageResourceId.hashCode();
hashCode = hashCode * 8191 + ((isSetFilePath()) ? 131071 : 524287);
if (isSetFilePath())
hashCode = hashCode * 8191 + filePath.hashCode();
hashCode = hashCode * 8191 + ((isSetReplicaMetadata()) ? 131071 : 524287);
if (isSetReplicaMetadata())
hashCode = hashCode * 8191 + replicaMetadata.hashCode();
return hashCode;
}
@Override
public int compareTo(DataReplicaLocationModel other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetReplicaId(), other.isSetReplicaId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReplicaId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicaId, other.replicaId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetProductUri(), other.isSetProductUri());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProductUri()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productUri, other.productUri);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetReplicaName(), other.isSetReplicaName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReplicaName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicaName, other.replicaName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetReplicaDescription(), other.isSetReplicaDescription());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReplicaDescription()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicaDescription, other.replicaDescription);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCreationTime(), 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.compare(isSetLastModifiedTime(), other.isSetLastModifiedTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastModifiedTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastModifiedTime, other.lastModifiedTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetValidUntilTime(), other.isSetValidUntilTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetValidUntilTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validUntilTime, other.validUntilTime);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetReplicaLocationCategory(), other.isSetReplicaLocationCategory());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReplicaLocationCategory()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicaLocationCategory, other.replicaLocationCategory);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetReplicaPersistentType(), other.isSetReplicaPersistentType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReplicaPersistentType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicaPersistentType, other.replicaPersistentType);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStorageResourceId(), other.isSetStorageResourceId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStorageResourceId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storageResourceId, other.storageResourceId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetFilePath(), other.isSetFilePath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFilePath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filePath, other.filePath);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetReplicaMetadata(), other.isSetReplicaMetadata());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReplicaMetadata()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replicaMetadata, other.replicaMetadata);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
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("DataReplicaLocationModel(");
boolean first = true;
if (isSetReplicaId()) {
sb.append("replicaId:");
if (this.replicaId == null) {
sb.append("null");
} else {
sb.append(this.replicaId);
}
first = false;
}
if (isSetProductUri()) {
if (!first) sb.append(", ");
sb.append("productUri:");
if (this.productUri == null) {
sb.append("null");
} else {
sb.append(this.productUri);
}
first = false;
}
if (isSetReplicaName()) {
if (!first) sb.append(", ");
sb.append("replicaName:");
if (this.replicaName == null) {
sb.append("null");
} else {
sb.append(this.replicaName);
}
first = false;
}
if (isSetReplicaDescription()) {
if (!first) sb.append(", ");
sb.append("replicaDescription:");
if (this.replicaDescription == null) {
sb.append("null");
} else {
sb.append(this.replicaDescription);
}
first = false;
}
if (isSetCreationTime()) {
if (!first) sb.append(", ");
sb.append("creationTime:");
sb.append(this.creationTime);
first = false;
}
if (isSetLastModifiedTime()) {
if (!first) sb.append(", ");
sb.append("lastModifiedTime:");
sb.append(this.lastModifiedTime);
first = false;
}
if (isSetValidUntilTime()) {
if (!first) sb.append(", ");
sb.append("validUntilTime:");
sb.append(this.validUntilTime);
first = false;
}
if (isSetReplicaLocationCategory()) {
if (!first) sb.append(", ");
sb.append("replicaLocationCategory:");
if (this.replicaLocationCategory == null) {
sb.append("null");
} else {
sb.append(this.replicaLocationCategory);
}
first = false;
}
if (isSetReplicaPersistentType()) {
if (!first) sb.append(", ");
sb.append("replicaPersistentType:");
if (this.replicaPersistentType == null) {
sb.append("null");
} else {
sb.append(this.replicaPersistentType);
}
first = false;
}
if (isSetStorageResourceId()) {
if (!first) sb.append(", ");
sb.append("storageResourceId:");
if (this.storageResourceId == null) {
sb.append("null");
} else {
sb.append(this.storageResourceId);
}
first = false;
}
if (isSetFilePath()) {
if (!first) sb.append(", ");
sb.append("filePath:");
if (this.filePath == null) {
sb.append("null");
} else {
sb.append(this.filePath);
}
first = false;
}
if (isSetReplicaMetadata()) {
if (!first) sb.append(", ");
sb.append("replicaMetadata:");
if (this.replicaMetadata == null) {
sb.append("null");
} else {
sb.append(this.replicaMetadata);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class DataReplicaLocationModelStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public DataReplicaLocationModelStandardScheme getScheme() {
return new DataReplicaLocationModelStandardScheme();
}
}
private static class DataReplicaLocationModelStandardScheme extends org.apache.thrift.scheme.StandardScheme<DataReplicaLocationModel> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, DataReplicaLocationModel 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: // REPLICA_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.replicaId = iprot.readString();
struct.setReplicaIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PRODUCT_URI
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.productUri = iprot.readString();
struct.setProductUriIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // REPLICA_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.replicaName = iprot.readString();
struct.setReplicaNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // REPLICA_DESCRIPTION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.replicaDescription = iprot.readString();
struct.setReplicaDescriptionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // 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 6: // LAST_MODIFIED_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.lastModifiedTime = iprot.readI64();
struct.setLastModifiedTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // VALID_UNTIL_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.validUntilTime = iprot.readI64();
struct.setValidUntilTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // REPLICA_LOCATION_CATEGORY
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.replicaLocationCategory = org.apache.airavata.model.data.replica.ReplicaLocationCategory.findByValue(iprot.readI32());
struct.setReplicaLocationCategoryIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // REPLICA_PERSISTENT_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.replicaPersistentType = org.apache.airavata.model.data.replica.ReplicaPersistentType.findByValue(iprot.readI32());
struct.setReplicaPersistentTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // STORAGE_RESOURCE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.storageResourceId = iprot.readString();
struct.setStorageResourceIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // FILE_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.filePath = iprot.readString();
struct.setFilePathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // REPLICA_METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
struct.replicaMetadata = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map0.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key1;
@org.apache.thrift.annotation.Nullable java.lang.String _val2;
for (int _i3 = 0; _i3 < _map0.size; ++_i3)
{
_key1 = iprot.readString();
_val2 = iprot.readString();
struct.replicaMetadata.put(_key1, _val2);
}
iprot.readMapEnd();
}
struct.setReplicaMetadataIsSet(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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, DataReplicaLocationModel struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.replicaId != null) {
if (struct.isSetReplicaId()) {
oprot.writeFieldBegin(REPLICA_ID_FIELD_DESC);
oprot.writeString(struct.replicaId);
oprot.writeFieldEnd();
}
}
if (struct.productUri != null) {
if (struct.isSetProductUri()) {
oprot.writeFieldBegin(PRODUCT_URI_FIELD_DESC);
oprot.writeString(struct.productUri);
oprot.writeFieldEnd();
}
}
if (struct.replicaName != null) {
if (struct.isSetReplicaName()) {
oprot.writeFieldBegin(REPLICA_NAME_FIELD_DESC);
oprot.writeString(struct.replicaName);
oprot.writeFieldEnd();
}
}
if (struct.replicaDescription != null) {
if (struct.isSetReplicaDescription()) {
oprot.writeFieldBegin(REPLICA_DESCRIPTION_FIELD_DESC);
oprot.writeString(struct.replicaDescription);
oprot.writeFieldEnd();
}
}
if (struct.isSetCreationTime()) {
oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC);
oprot.writeI64(struct.creationTime);
oprot.writeFieldEnd();
}
if (struct.isSetLastModifiedTime()) {
oprot.writeFieldBegin(LAST_MODIFIED_TIME_FIELD_DESC);
oprot.writeI64(struct.lastModifiedTime);
oprot.writeFieldEnd();
}
if (struct.isSetValidUntilTime()) {
oprot.writeFieldBegin(VALID_UNTIL_TIME_FIELD_DESC);
oprot.writeI64(struct.validUntilTime);
oprot.writeFieldEnd();
}
if (struct.replicaLocationCategory != null) {
if (struct.isSetReplicaLocationCategory()) {
oprot.writeFieldBegin(REPLICA_LOCATION_CATEGORY_FIELD_DESC);
oprot.writeI32(struct.replicaLocationCategory.getValue());
oprot.writeFieldEnd();
}
}
if (struct.replicaPersistentType != null) {
if (struct.isSetReplicaPersistentType()) {
oprot.writeFieldBegin(REPLICA_PERSISTENT_TYPE_FIELD_DESC);
oprot.writeI32(struct.replicaPersistentType.getValue());
oprot.writeFieldEnd();
}
}
if (struct.storageResourceId != null) {
if (struct.isSetStorageResourceId()) {
oprot.writeFieldBegin(STORAGE_RESOURCE_ID_FIELD_DESC);
oprot.writeString(struct.storageResourceId);
oprot.writeFieldEnd();
}
}
if (struct.filePath != null) {
if (struct.isSetFilePath()) {
oprot.writeFieldBegin(FILE_PATH_FIELD_DESC);
oprot.writeString(struct.filePath);
oprot.writeFieldEnd();
}
}
if (struct.replicaMetadata != null) {
if (struct.isSetReplicaMetadata()) {
oprot.writeFieldBegin(REPLICA_METADATA_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.replicaMetadata.size()));
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter4 : struct.replicaMetadata.entrySet())
{
oprot.writeString(_iter4.getKey());
oprot.writeString(_iter4.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class DataReplicaLocationModelTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public DataReplicaLocationModelTupleScheme getScheme() {
return new DataReplicaLocationModelTupleScheme();
}
}
private static class DataReplicaLocationModelTupleScheme extends org.apache.thrift.scheme.TupleScheme<DataReplicaLocationModel> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DataReplicaLocationModel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetReplicaId()) {
optionals.set(0);
}
if (struct.isSetProductUri()) {
optionals.set(1);
}
if (struct.isSetReplicaName()) {
optionals.set(2);
}
if (struct.isSetReplicaDescription()) {
optionals.set(3);
}
if (struct.isSetCreationTime()) {
optionals.set(4);
}
if (struct.isSetLastModifiedTime()) {
optionals.set(5);
}
if (struct.isSetValidUntilTime()) {
optionals.set(6);
}
if (struct.isSetReplicaLocationCategory()) {
optionals.set(7);
}
if (struct.isSetReplicaPersistentType()) {
optionals.set(8);
}
if (struct.isSetStorageResourceId()) {
optionals.set(9);
}
if (struct.isSetFilePath()) {
optionals.set(10);
}
if (struct.isSetReplicaMetadata()) {
optionals.set(11);
}
oprot.writeBitSet(optionals, 12);
if (struct.isSetReplicaId()) {
oprot.writeString(struct.replicaId);
}
if (struct.isSetProductUri()) {
oprot.writeString(struct.productUri);
}
if (struct.isSetReplicaName()) {
oprot.writeString(struct.replicaName);
}
if (struct.isSetReplicaDescription()) {
oprot.writeString(struct.replicaDescription);
}
if (struct.isSetCreationTime()) {
oprot.writeI64(struct.creationTime);
}
if (struct.isSetLastModifiedTime()) {
oprot.writeI64(struct.lastModifiedTime);
}
if (struct.isSetValidUntilTime()) {
oprot.writeI64(struct.validUntilTime);
}
if (struct.isSetReplicaLocationCategory()) {
oprot.writeI32(struct.replicaLocationCategory.getValue());
}
if (struct.isSetReplicaPersistentType()) {
oprot.writeI32(struct.replicaPersistentType.getValue());
}
if (struct.isSetStorageResourceId()) {
oprot.writeString(struct.storageResourceId);
}
if (struct.isSetFilePath()) {
oprot.writeString(struct.filePath);
}
if (struct.isSetReplicaMetadata()) {
{
oprot.writeI32(struct.replicaMetadata.size());
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter5 : struct.replicaMetadata.entrySet())
{
oprot.writeString(_iter5.getKey());
oprot.writeString(_iter5.getValue());
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, DataReplicaLocationModel struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(12);
if (incoming.get(0)) {
struct.replicaId = iprot.readString();
struct.setReplicaIdIsSet(true);
}
if (incoming.get(1)) {
struct.productUri = iprot.readString();
struct.setProductUriIsSet(true);
}
if (incoming.get(2)) {
struct.replicaName = iprot.readString();
struct.setReplicaNameIsSet(true);
}
if (incoming.get(3)) {
struct.replicaDescription = iprot.readString();
struct.setReplicaDescriptionIsSet(true);
}
if (incoming.get(4)) {
struct.creationTime = iprot.readI64();
struct.setCreationTimeIsSet(true);
}
if (incoming.get(5)) {
struct.lastModifiedTime = iprot.readI64();
struct.setLastModifiedTimeIsSet(true);
}
if (incoming.get(6)) {
struct.validUntilTime = iprot.readI64();
struct.setValidUntilTimeIsSet(true);
}
if (incoming.get(7)) {
struct.replicaLocationCategory = org.apache.airavata.model.data.replica.ReplicaLocationCategory.findByValue(iprot.readI32());
struct.setReplicaLocationCategoryIsSet(true);
}
if (incoming.get(8)) {
struct.replicaPersistentType = org.apache.airavata.model.data.replica.ReplicaPersistentType.findByValue(iprot.readI32());
struct.setReplicaPersistentTypeIsSet(true);
}
if (incoming.get(9)) {
struct.storageResourceId = iprot.readString();
struct.setStorageResourceIdIsSet(true);
}
if (incoming.get(10)) {
struct.filePath = iprot.readString();
struct.setFilePathIsSet(true);
}
if (incoming.get(11)) {
{
org.apache.thrift.protocol.TMap _map6 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.replicaMetadata = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map6.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key7;
@org.apache.thrift.annotation.Nullable java.lang.String _val8;
for (int _i9 = 0; _i9 < _map6.size; ++_i9)
{
_key7 = iprot.readString();
_val8 = iprot.readString();
struct.replicaMetadata.put(_key7, _val8);
}
}
struct.setReplicaMetadataIsSet(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();
}
}