diff options
author | Simon Rettberg | 2015-06-09 18:57:14 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-06-09 18:57:14 +0200 |
commit | c121d65bb33a42c324b746f6dc5300aee68487dd (patch) | |
tree | fd72496dcf56338af387ff0345636e2d77b6ff86 /src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java | |
parent | Changes for Dozmod v1.1 (diff) | |
download | master-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.tar.gz master-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.tar.xz master-sync-shared-c121d65bb33a42c324b746f6dc5300aee68487dd.zip |
Unified thrift definitions for master and satellite
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java | 2149 |
1 files changed, 2149 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java new file mode 100644 index 0000000..cf4bb9d --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java @@ -0,0 +1,2149 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.openslx.bwlp.thrift.iface; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import org.apache.thrift.protocol.TProtocolException; +import org.apache.thrift.EncodingUtils; +import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRead, ImageDetailsRead._Fields>, java.io.Serializable, Cloneable, Comparable<ImageDetailsRead> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageDetailsRead"); + + private static final org.apache.thrift.protocol.TField IMAGE_BASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageBaseId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField CURRENT_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("currentVersionId", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("versions", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField IMAGE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("imageName", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("tags", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField SOFTWARE_FIELD_DESC = new org.apache.thrift.protocol.TField("software", org.apache.thrift.protocol.TType.LIST, (short)7); + private static final org.apache.thrift.protocol.TField OS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("osId", org.apache.thrift.protocol.TType.I32, (short)8); + private static final org.apache.thrift.protocol.TField VIRT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("virtId", org.apache.thrift.protocol.TType.STRING, (short)9); + private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)10); + private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.I64, (short)11); + private static final org.apache.thrift.protocol.TField OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerId", org.apache.thrift.protocol.TType.STRING, (short)12); + private static final org.apache.thrift.protocol.TField UPDATER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("updaterId", org.apache.thrift.protocol.TType.STRING, (short)13); + private static final org.apache.thrift.protocol.TField SHARE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("shareMode", org.apache.thrift.protocol.TType.I32, (short)14); + private static final org.apache.thrift.protocol.TField IS_TEMPLATE_FIELD_DESC = new org.apache.thrift.protocol.TField("isTemplate", org.apache.thrift.protocol.TType.BOOL, (short)15); + private static final org.apache.thrift.protocol.TField DEFAULT_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)16); + private static final org.apache.thrift.protocol.TField USER_PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("userPermissions", org.apache.thrift.protocol.TType.STRUCT, (short)17); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ImageDetailsReadStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ImageDetailsReadTupleSchemeFactory()); + } + + public String imageBaseId; // required + public String currentVersionId; // required + public List<ImageVersionDetails> versions; // required + public String imageName; // required + public String description; // required + public List<String> tags; // required + public List<String> software; // required + public int osId; // required + public String virtId; // required + public long createTime; // required + public long updateTime; // required + public String ownerId; // required + public String updaterId; // required + /** + * + * @see ShareMode + */ + public ShareMode shareMode; // required + public boolean isTemplate; // required + public ImagePermissions defaultPermissions; // required + public ImagePermissions userPermissions; // 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 { + IMAGE_BASE_ID((short)1, "imageBaseId"), + CURRENT_VERSION_ID((short)2, "currentVersionId"), + VERSIONS((short)3, "versions"), + IMAGE_NAME((short)4, "imageName"), + DESCRIPTION((short)5, "description"), + TAGS((short)6, "tags"), + SOFTWARE((short)7, "software"), + OS_ID((short)8, "osId"), + VIRT_ID((short)9, "virtId"), + CREATE_TIME((short)10, "createTime"), + UPDATE_TIME((short)11, "updateTime"), + OWNER_ID((short)12, "ownerId"), + UPDATER_ID((short)13, "updaterId"), + /** + * + * @see ShareMode + */ + SHARE_MODE((short)14, "shareMode"), + IS_TEMPLATE((short)15, "isTemplate"), + DEFAULT_PERMISSIONS((short)16, "defaultPermissions"), + USER_PERMISSIONS((short)17, "userPermissions"); + + private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IMAGE_BASE_ID + return IMAGE_BASE_ID; + case 2: // CURRENT_VERSION_ID + return CURRENT_VERSION_ID; + case 3: // VERSIONS + return VERSIONS; + case 4: // IMAGE_NAME + return IMAGE_NAME; + case 5: // DESCRIPTION + return DESCRIPTION; + case 6: // TAGS + return TAGS; + case 7: // SOFTWARE + return SOFTWARE; + case 8: // OS_ID + return OS_ID; + case 9: // VIRT_ID + return VIRT_ID; + case 10: // CREATE_TIME + return CREATE_TIME; + case 11: // UPDATE_TIME + return UPDATE_TIME; + case 12: // OWNER_ID + return OWNER_ID; + case 13: // UPDATER_ID + return UPDATER_ID; + case 14: // SHARE_MODE + return SHARE_MODE; + case 15: // IS_TEMPLATE + return IS_TEMPLATE; + case 16: // DEFAULT_PERMISSIONS + return DEFAULT_PERMISSIONS; + case 17: // USER_PERMISSIONS + return USER_PERMISSIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __OSID_ISSET_ID = 0; + private static final int __CREATETIME_ISSET_ID = 1; + private static final int __UPDATETIME_ISSET_ID = 2; + private static final int __ISTEMPLATE_ISSET_ID = 3; + private byte __isset_bitfield = 0; + private _Fields optionals[] = {_Fields.USER_PERMISSIONS}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.CURRENT_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("currentVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("versions", org.apache.thrift.TFieldRequirementType.DEFAULT, + 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, ImageVersionDetails.class)))); + tmpMap.put(_Fields.IMAGE_NAME, new org.apache.thrift.meta_data.FieldMetaData("imageName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TAGS, new org.apache.thrift.meta_data.FieldMetaData("tags", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.SOFTWARE, new org.apache.thrift.meta_data.FieldMetaData("software", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.OS_ID, new org.apache.thrift.meta_data.FieldMetaData("osId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.VIRT_ID, new org.apache.thrift.meta_data.FieldMetaData("virtId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + tmpMap.put(_Fields.OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("ownerId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.UPDATER_ID, new org.apache.thrift.meta_data.FieldMetaData("updaterId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"))); + tmpMap.put(_Fields.SHARE_MODE, new org.apache.thrift.meta_data.FieldMetaData("shareMode", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ShareMode.class))); + tmpMap.put(_Fields.IS_TEMPLATE, new org.apache.thrift.meta_data.FieldMetaData("isTemplate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.DEFAULT_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultPermissions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class))); + tmpMap.put(_Fields.USER_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("userPermissions", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageDetailsRead.class, metaDataMap); + } + + public ImageDetailsRead() { + } + + public ImageDetailsRead( + String imageBaseId, + String currentVersionId, + List<ImageVersionDetails> versions, + String imageName, + String description, + List<String> tags, + List<String> software, + int osId, + String virtId, + long createTime, + long updateTime, + String ownerId, + String updaterId, + ShareMode shareMode, + boolean isTemplate, + ImagePermissions defaultPermissions) + { + this(); + this.imageBaseId = imageBaseId; + this.currentVersionId = currentVersionId; + this.versions = versions; + this.imageName = imageName; + this.description = description; + this.tags = tags; + this.software = software; + this.osId = osId; + setOsIdIsSet(true); + this.virtId = virtId; + this.createTime = createTime; + setCreateTimeIsSet(true); + this.updateTime = updateTime; + setUpdateTimeIsSet(true); + this.ownerId = ownerId; + this.updaterId = updaterId; + this.shareMode = shareMode; + this.isTemplate = isTemplate; + setIsTemplateIsSet(true); + this.defaultPermissions = defaultPermissions; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public ImageDetailsRead(ImageDetailsRead other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetImageBaseId()) { + this.imageBaseId = other.imageBaseId; + } + if (other.isSetCurrentVersionId()) { + this.currentVersionId = other.currentVersionId; + } + if (other.isSetVersions()) { + List<ImageVersionDetails> __this__versions = new ArrayList<ImageVersionDetails>(other.versions.size()); + for (ImageVersionDetails other_element : other.versions) { + __this__versions.add(new ImageVersionDetails(other_element)); + } + this.versions = __this__versions; + } + if (other.isSetImageName()) { + this.imageName = other.imageName; + } + if (other.isSetDescription()) { + this.description = other.description; + } + if (other.isSetTags()) { + List<String> __this__tags = new ArrayList<String>(other.tags); + this.tags = __this__tags; + } + if (other.isSetSoftware()) { + List<String> __this__software = new ArrayList<String>(other.software); + this.software = __this__software; + } + this.osId = other.osId; + if (other.isSetVirtId()) { + this.virtId = other.virtId; + } + this.createTime = other.createTime; + this.updateTime = other.updateTime; + if (other.isSetOwnerId()) { + this.ownerId = other.ownerId; + } + if (other.isSetUpdaterId()) { + this.updaterId = other.updaterId; + } + if (other.isSetShareMode()) { + this.shareMode = other.shareMode; + } + this.isTemplate = other.isTemplate; + if (other.isSetDefaultPermissions()) { + this.defaultPermissions = new ImagePermissions(other.defaultPermissions); + } + if (other.isSetUserPermissions()) { + this.userPermissions = new ImagePermissions(other.userPermissions); + } + } + + public ImageDetailsRead deepCopy() { + return new ImageDetailsRead(this); + } + + @Override + public void clear() { + this.imageBaseId = null; + this.currentVersionId = null; + this.versions = null; + this.imageName = null; + this.description = null; + this.tags = null; + this.software = null; + setOsIdIsSet(false); + this.osId = 0; + this.virtId = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setUpdateTimeIsSet(false); + this.updateTime = 0; + this.ownerId = null; + this.updaterId = null; + this.shareMode = null; + setIsTemplateIsSet(false); + this.isTemplate = false; + this.defaultPermissions = null; + this.userPermissions = null; + } + + public String getImageBaseId() { + return this.imageBaseId; + } + + public ImageDetailsRead setImageBaseId(String imageBaseId) { + this.imageBaseId = imageBaseId; + return this; + } + + public void unsetImageBaseId() { + this.imageBaseId = null; + } + + /** Returns true if field imageBaseId is set (has been assigned a value) and false otherwise */ + public boolean isSetImageBaseId() { + return this.imageBaseId != null; + } + + public void setImageBaseIdIsSet(boolean value) { + if (!value) { + this.imageBaseId = null; + } + } + + public String getCurrentVersionId() { + return this.currentVersionId; + } + + public ImageDetailsRead setCurrentVersionId(String currentVersionId) { + this.currentVersionId = currentVersionId; + return this; + } + + public void unsetCurrentVersionId() { + this.currentVersionId = null; + } + + /** Returns true if field currentVersionId is set (has been assigned a value) and false otherwise */ + public boolean isSetCurrentVersionId() { + return this.currentVersionId != null; + } + + public void setCurrentVersionIdIsSet(boolean value) { + if (!value) { + this.currentVersionId = null; + } + } + + public int getVersionsSize() { + return (this.versions == null) ? 0 : this.versions.size(); + } + + public java.util.Iterator<ImageVersionDetails> getVersionsIterator() { + return (this.versions == null) ? null : this.versions.iterator(); + } + + public void addToVersions(ImageVersionDetails elem) { + if (this.versions == null) { + this.versions = new ArrayList<ImageVersionDetails>(); + } + this.versions.add(elem); + } + + public List<ImageVersionDetails> getVersions() { + return this.versions; + } + + public ImageDetailsRead setVersions(List<ImageVersionDetails> versions) { + this.versions = versions; + return this; + } + + public void unsetVersions() { + this.versions = null; + } + + /** Returns true if field versions is set (has been assigned a value) and false otherwise */ + public boolean isSetVersions() { + return this.versions != null; + } + + public void setVersionsIsSet(boolean value) { + if (!value) { + this.versions = null; + } + } + + public String getImageName() { + return this.imageName; + } + + public ImageDetailsRead setImageName(String imageName) { + this.imageName = imageName; + return this; + } + + public void unsetImageName() { + this.imageName = null; + } + + /** Returns true if field imageName is set (has been assigned a value) and false otherwise */ + public boolean isSetImageName() { + return this.imageName != null; + } + + public void setImageNameIsSet(boolean value) { + if (!value) { + this.imageName = null; + } + } + + public String getDescription() { + return this.description; + } + + public ImageDetailsRead setDescription(String description) { + this.description = description; + return this; + } + + public void unsetDescription() { + this.description = null; + } + + /** Returns true if field description is set (has been assigned a value) and false otherwise */ + public boolean isSetDescription() { + return this.description != null; + } + + public void setDescriptionIsSet(boolean value) { + if (!value) { + this.description = null; + } + } + + public int getTagsSize() { + return (this.tags == null) ? 0 : this.tags.size(); + } + + public java.util.Iterator<String> getTagsIterator() { + return (this.tags == null) ? null : this.tags.iterator(); + } + + public void addToTags(String elem) { + if (this.tags == null) { + this.tags = new ArrayList<String>(); + } + this.tags.add(elem); + } + + public List<String> getTags() { + return this.tags; + } + + public ImageDetailsRead setTags(List<String> tags) { + this.tags = tags; + return this; + } + + public void unsetTags() { + this.tags = null; + } + + /** Returns true if field tags is set (has been assigned a value) and false otherwise */ + public boolean isSetTags() { + return this.tags != null; + } + + public void setTagsIsSet(boolean value) { + if (!value) { + this.tags = null; + } + } + + public int getSoftwareSize() { + return (this.software == null) ? 0 : this.software.size(); + } + + public java.util.Iterator<String> getSoftwareIterator() { + return (this.software == null) ? null : this.software.iterator(); + } + + public void addToSoftware(String elem) { + if (this.software == null) { + this.software = new ArrayList<String>(); + } + this.software.add(elem); + } + + public List<String> getSoftware() { + return this.software; + } + + public ImageDetailsRead setSoftware(List<String> software) { + this.software = software; + return this; + } + + public void unsetSoftware() { + this.software = null; + } + + /** Returns true if field software is set (has been assigned a value) and false otherwise */ + public boolean isSetSoftware() { + return this.software != null; + } + + public void setSoftwareIsSet(boolean value) { + if (!value) { + this.software = null; + } + } + + public int getOsId() { + return this.osId; + } + + public ImageDetailsRead setOsId(int osId) { + this.osId = osId; + setOsIdIsSet(true); + return this; + } + + public void unsetOsId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID); + } + + /** Returns true if field osId is set (has been assigned a value) and false otherwise */ + public boolean isSetOsId() { + return EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID); + } + + public void setOsIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value); + } + + public String getVirtId() { + return this.virtId; + } + + public ImageDetailsRead setVirtId(String virtId) { + this.virtId = virtId; + return this; + } + + public void unsetVirtId() { + this.virtId = null; + } + + /** Returns true if field virtId is set (has been assigned a value) and false otherwise */ + public boolean isSetVirtId() { + return this.virtId != null; + } + + public void setVirtIdIsSet(boolean value) { + if (!value) { + this.virtId = null; + } + } + + public long getCreateTime() { + return this.createTime; + } + + public ImageDetailsRead setCreateTime(long createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + return this; + } + + public void unsetCreateTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public long getUpdateTime() { + return this.updateTime; + } + + public ImageDetailsRead setUpdateTime(long updateTime) { + this.updateTime = updateTime; + setUpdateTimeIsSet(true); + return this; + } + + public void unsetUpdateTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID); + } + + /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */ + public boolean isSetUpdateTime() { + return EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID); + } + + public void setUpdateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value); + } + + public String getOwnerId() { + return this.ownerId; + } + + public ImageDetailsRead setOwnerId(String ownerId) { + this.ownerId = ownerId; + return this; + } + + public void unsetOwnerId() { + this.ownerId = null; + } + + /** Returns true if field ownerId is set (has been assigned a value) and false otherwise */ + public boolean isSetOwnerId() { + return this.ownerId != null; + } + + public void setOwnerIdIsSet(boolean value) { + if (!value) { + this.ownerId = null; + } + } + + public String getUpdaterId() { + return this.updaterId; + } + + public ImageDetailsRead setUpdaterId(String updaterId) { + this.updaterId = updaterId; + return this; + } + + public void unsetUpdaterId() { + this.updaterId = null; + } + + /** Returns true if field updaterId is set (has been assigned a value) and false otherwise */ + public boolean isSetUpdaterId() { + return this.updaterId != null; + } + + public void setUpdaterIdIsSet(boolean value) { + if (!value) { + this.updaterId = null; + } + } + + /** + * + * @see ShareMode + */ + public ShareMode getShareMode() { + return this.shareMode; + } + + /** + * + * @see ShareMode + */ + public ImageDetailsRead setShareMode(ShareMode shareMode) { + this.shareMode = shareMode; + return this; + } + + public void unsetShareMode() { + this.shareMode = null; + } + + /** Returns true if field shareMode is set (has been assigned a value) and false otherwise */ + public boolean isSetShareMode() { + return this.shareMode != null; + } + + public void setShareModeIsSet(boolean value) { + if (!value) { + this.shareMode = null; + } + } + + public boolean isIsTemplate() { + return this.isTemplate; + } + + public ImageDetailsRead setIsTemplate(boolean isTemplate) { + this.isTemplate = isTemplate; + setIsTemplateIsSet(true); + return this; + } + + public void unsetIsTemplate() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); + } + + /** Returns true if field isTemplate is set (has been assigned a value) and false otherwise */ + public boolean isSetIsTemplate() { + return EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID); + } + + public void setIsTemplateIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value); + } + + public ImagePermissions getDefaultPermissions() { + return this.defaultPermissions; + } + + public ImageDetailsRead setDefaultPermissions(ImagePermissions defaultPermissions) { + this.defaultPermissions = defaultPermissions; + return this; + } + + public void unsetDefaultPermissions() { + this.defaultPermissions = null; + } + + /** Returns true if field defaultPermissions is set (has been assigned a value) and false otherwise */ + public boolean isSetDefaultPermissions() { + return this.defaultPermissions != null; + } + + public void setDefaultPermissionsIsSet(boolean value) { + if (!value) { + this.defaultPermissions = null; + } + } + + public ImagePermissions getUserPermissions() { + return this.userPermissions; + } + + public ImageDetailsRead setUserPermissions(ImagePermissions userPermissions) { + this.userPermissions = userPermissions; + return this; + } + + public void unsetUserPermissions() { + this.userPermissions = null; + } + + /** Returns true if field userPermissions is set (has been assigned a value) and false otherwise */ + public boolean isSetUserPermissions() { + return this.userPermissions != null; + } + + public void setUserPermissionsIsSet(boolean value) { + if (!value) { + this.userPermissions = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IMAGE_BASE_ID: + if (value == null) { + unsetImageBaseId(); + } else { + setImageBaseId((String)value); + } + break; + + case CURRENT_VERSION_ID: + if (value == null) { + unsetCurrentVersionId(); + } else { + setCurrentVersionId((String)value); + } + break; + + case VERSIONS: + if (value == null) { + unsetVersions(); + } else { + setVersions((List<ImageVersionDetails>)value); + } + break; + + case IMAGE_NAME: + if (value == null) { + unsetImageName(); + } else { + setImageName((String)value); + } + break; + + case DESCRIPTION: + if (value == null) { + unsetDescription(); + } else { + setDescription((String)value); + } + break; + + case TAGS: + if (value == null) { + unsetTags(); + } else { + setTags((List<String>)value); + } + break; + + case SOFTWARE: + if (value == null) { + unsetSoftware(); + } else { + setSoftware((List<String>)value); + } + break; + + case OS_ID: + if (value == null) { + unsetOsId(); + } else { + setOsId((Integer)value); + } + break; + + case VIRT_ID: + if (value == null) { + unsetVirtId(); + } else { + setVirtId((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Long)value); + } + break; + + case UPDATE_TIME: + if (value == null) { + unsetUpdateTime(); + } else { + setUpdateTime((Long)value); + } + break; + + case OWNER_ID: + if (value == null) { + unsetOwnerId(); + } else { + setOwnerId((String)value); + } + break; + + case UPDATER_ID: + if (value == null) { + unsetUpdaterId(); + } else { + setUpdaterId((String)value); + } + break; + + case SHARE_MODE: + if (value == null) { + unsetShareMode(); + } else { + setShareMode((ShareMode)value); + } + break; + + case IS_TEMPLATE: + if (value == null) { + unsetIsTemplate(); + } else { + setIsTemplate((Boolean)value); + } + break; + + case DEFAULT_PERMISSIONS: + if (value == null) { + unsetDefaultPermissions(); + } else { + setDefaultPermissions((ImagePermissions)value); + } + break; + + case USER_PERMISSIONS: + if (value == null) { + unsetUserPermissions(); + } else { + setUserPermissions((ImagePermissions)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IMAGE_BASE_ID: + return getImageBaseId(); + + case CURRENT_VERSION_ID: + return getCurrentVersionId(); + + case VERSIONS: + return getVersions(); + + case IMAGE_NAME: + return getImageName(); + + case DESCRIPTION: + return getDescription(); + + case TAGS: + return getTags(); + + case SOFTWARE: + return getSoftware(); + + case OS_ID: + return Integer.valueOf(getOsId()); + + case VIRT_ID: + return getVirtId(); + + case CREATE_TIME: + return Long.valueOf(getCreateTime()); + + case UPDATE_TIME: + return Long.valueOf(getUpdateTime()); + + case OWNER_ID: + return getOwnerId(); + + case UPDATER_ID: + return getUpdaterId(); + + case SHARE_MODE: + return getShareMode(); + + case IS_TEMPLATE: + return Boolean.valueOf(isIsTemplate()); + + case DEFAULT_PERMISSIONS: + return getDefaultPermissions(); + + case USER_PERMISSIONS: + return getUserPermissions(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IMAGE_BASE_ID: + return isSetImageBaseId(); + case CURRENT_VERSION_ID: + return isSetCurrentVersionId(); + case VERSIONS: + return isSetVersions(); + case IMAGE_NAME: + return isSetImageName(); + case DESCRIPTION: + return isSetDescription(); + case TAGS: + return isSetTags(); + case SOFTWARE: + return isSetSoftware(); + case OS_ID: + return isSetOsId(); + case VIRT_ID: + return isSetVirtId(); + case CREATE_TIME: + return isSetCreateTime(); + case UPDATE_TIME: + return isSetUpdateTime(); + case OWNER_ID: + return isSetOwnerId(); + case UPDATER_ID: + return isSetUpdaterId(); + case SHARE_MODE: + return isSetShareMode(); + case IS_TEMPLATE: + return isSetIsTemplate(); + case DEFAULT_PERMISSIONS: + return isSetDefaultPermissions(); + case USER_PERMISSIONS: + return isSetUserPermissions(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ImageDetailsRead) + return this.equals((ImageDetailsRead)that); + return false; + } + + public boolean equals(ImageDetailsRead that) { + if (that == null) + return false; + + boolean this_present_imageBaseId = true && this.isSetImageBaseId(); + boolean that_present_imageBaseId = true && that.isSetImageBaseId(); + if (this_present_imageBaseId || that_present_imageBaseId) { + if (!(this_present_imageBaseId && that_present_imageBaseId)) + return false; + if (!this.imageBaseId.equals(that.imageBaseId)) + return false; + } + + boolean this_present_currentVersionId = true && this.isSetCurrentVersionId(); + boolean that_present_currentVersionId = true && that.isSetCurrentVersionId(); + if (this_present_currentVersionId || that_present_currentVersionId) { + if (!(this_present_currentVersionId && that_present_currentVersionId)) + return false; + if (!this.currentVersionId.equals(that.currentVersionId)) + return false; + } + + boolean this_present_versions = true && this.isSetVersions(); + boolean that_present_versions = true && that.isSetVersions(); + if (this_present_versions || that_present_versions) { + if (!(this_present_versions && that_present_versions)) + return false; + if (!this.versions.equals(that.versions)) + return false; + } + + boolean this_present_imageName = true && this.isSetImageName(); + boolean that_present_imageName = true && that.isSetImageName(); + if (this_present_imageName || that_present_imageName) { + if (!(this_present_imageName && that_present_imageName)) + return false; + if (!this.imageName.equals(that.imageName)) + return false; + } + + boolean this_present_description = true && this.isSetDescription(); + boolean that_present_description = true && that.isSetDescription(); + if (this_present_description || that_present_description) { + if (!(this_present_description && that_present_description)) + return false; + if (!this.description.equals(that.description)) + return false; + } + + boolean this_present_tags = true && this.isSetTags(); + boolean that_present_tags = true && that.isSetTags(); + if (this_present_tags || that_present_tags) { + if (!(this_present_tags && that_present_tags)) + return false; + if (!this.tags.equals(that.tags)) + return false; + } + + boolean this_present_software = true && this.isSetSoftware(); + boolean that_present_software = true && that.isSetSoftware(); + if (this_present_software || that_present_software) { + if (!(this_present_software && that_present_software)) + return false; + if (!this.software.equals(that.software)) + return false; + } + + boolean this_present_osId = true; + boolean that_present_osId = true; + if (this_present_osId || that_present_osId) { + if (!(this_present_osId && that_present_osId)) + return false; + if (this.osId != that.osId) + return false; + } + + boolean this_present_virtId = true && this.isSetVirtId(); + boolean that_present_virtId = true && that.isSetVirtId(); + if (this_present_virtId || that_present_virtId) { + if (!(this_present_virtId && that_present_virtId)) + return false; + if (!this.virtId.equals(that.virtId)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_updateTime = true; + boolean that_present_updateTime = true; + if (this_present_updateTime || that_present_updateTime) { + if (!(this_present_updateTime && that_present_updateTime)) + return false; + if (this.updateTime != that.updateTime) + return false; + } + + boolean this_present_ownerId = true && this.isSetOwnerId(); + boolean that_present_ownerId = true && that.isSetOwnerId(); + if (this_present_ownerId || that_present_ownerId) { + if (!(this_present_ownerId && that_present_ownerId)) + return false; + if (!this.ownerId.equals(that.ownerId)) + return false; + } + + boolean this_present_updaterId = true && this.isSetUpdaterId(); + boolean that_present_updaterId = true && that.isSetUpdaterId(); + if (this_present_updaterId || that_present_updaterId) { + if (!(this_present_updaterId && that_present_updaterId)) + return false; + if (!this.updaterId.equals(that.updaterId)) + return false; + } + + boolean this_present_shareMode = true && this.isSetShareMode(); + boolean that_present_shareMode = true && that.isSetShareMode(); + if (this_present_shareMode || that_present_shareMode) { + if (!(this_present_shareMode && that_present_shareMode)) + return false; + if (!this.shareMode.equals(that.shareMode)) + return false; + } + + boolean this_present_isTemplate = true; + boolean that_present_isTemplate = true; + if (this_present_isTemplate || that_present_isTemplate) { + if (!(this_present_isTemplate && that_present_isTemplate)) + return false; + if (this.isTemplate != that.isTemplate) + return false; + } + + boolean this_present_defaultPermissions = true && this.isSetDefaultPermissions(); + boolean that_present_defaultPermissions = true && that.isSetDefaultPermissions(); + if (this_present_defaultPermissions || that_present_defaultPermissions) { + if (!(this_present_defaultPermissions && that_present_defaultPermissions)) + return false; + if (!this.defaultPermissions.equals(that.defaultPermissions)) + return false; + } + + boolean this_present_userPermissions = true && this.isSetUserPermissions(); + boolean that_present_userPermissions = true && that.isSetUserPermissions(); + if (this_present_userPermissions || that_present_userPermissions) { + if (!(this_present_userPermissions && that_present_userPermissions)) + return false; + if (!this.userPermissions.equals(that.userPermissions)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(ImageDetailsRead other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageBaseId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageBaseId, other.imageBaseId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCurrentVersionId()).compareTo(other.isSetCurrentVersionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCurrentVersionId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.currentVersionId, other.currentVersionId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVersions()).compareTo(other.isSetVersions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.versions, other.versions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImageName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageName, other.imageName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDescription()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTags()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tags, other.tags); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSoftware()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.software, other.software); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOsId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.osId, other.osId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVirtId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.virtId, other.virtId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUpdateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwnerId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerId, other.ownerId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUpdaterId()).compareTo(other.isSetUpdaterId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUpdaterId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updaterId, other.updaterId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetShareMode()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shareMode, other.shareMode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsTemplate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isTemplate, other.isTemplate); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDefaultPermissions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultPermissions, other.defaultPermissions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUserPermissions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userPermissions, other.userPermissions); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ImageDetailsRead("); + boolean first = true; + + sb.append("imageBaseId:"); + if (this.imageBaseId == null) { + sb.append("null"); + } else { + sb.append(this.imageBaseId); + } + first = false; + if (!first) sb.append(", "); + sb.append("currentVersionId:"); + if (this.currentVersionId == null) { + sb.append("null"); + } else { + sb.append(this.currentVersionId); + } + first = false; + if (!first) sb.append(", "); + sb.append("versions:"); + if (this.versions == null) { + sb.append("null"); + } else { + sb.append(this.versions); + } + first = false; + if (!first) sb.append(", "); + sb.append("imageName:"); + if (this.imageName == null) { + sb.append("null"); + } else { + sb.append(this.imageName); + } + first = false; + if (!first) sb.append(", "); + sb.append("description:"); + if (this.description == null) { + sb.append("null"); + } else { + sb.append(this.description); + } + first = false; + if (!first) sb.append(", "); + sb.append("tags:"); + if (this.tags == null) { + sb.append("null"); + } else { + sb.append(this.tags); + } + first = false; + if (!first) sb.append(", "); + sb.append("software:"); + if (this.software == null) { + sb.append("null"); + } else { + sb.append(this.software); + } + first = false; + if (!first) sb.append(", "); + sb.append("osId:"); + sb.append(this.osId); + first = false; + if (!first) sb.append(", "); + sb.append("virtId:"); + if (this.virtId == null) { + sb.append("null"); + } else { + sb.append(this.virtId); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("updateTime:"); + sb.append(this.updateTime); + first = false; + if (!first) sb.append(", "); + sb.append("ownerId:"); + if (this.ownerId == null) { + sb.append("null"); + } else { + sb.append(this.ownerId); + } + first = false; + if (!first) sb.append(", "); + sb.append("updaterId:"); + if (this.updaterId == null) { + sb.append("null"); + } else { + sb.append(this.updaterId); + } + first = false; + if (!first) sb.append(", "); + sb.append("shareMode:"); + if (this.shareMode == null) { + sb.append("null"); + } else { + sb.append(this.shareMode); + } + first = false; + if (!first) sb.append(", "); + sb.append("isTemplate:"); + sb.append(this.isTemplate); + first = false; + if (!first) sb.append(", "); + sb.append("defaultPermissions:"); + if (this.defaultPermissions == null) { + sb.append("null"); + } else { + sb.append(this.defaultPermissions); + } + first = false; + if (isSetUserPermissions()) { + if (!first) sb.append(", "); + sb.append("userPermissions:"); + if (this.userPermissions == null) { + sb.append("null"); + } else { + sb.append(this.userPermissions); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + if (defaultPermissions != null) { + defaultPermissions.validate(); + } + if (userPermissions != null) { + userPermissions.validate(); + } + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // 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 ImageDetailsReadStandardSchemeFactory implements SchemeFactory { + public ImageDetailsReadStandardScheme getScheme() { + return new ImageDetailsReadStandardScheme(); + } + } + + private static class ImageDetailsReadStandardScheme extends StandardScheme<ImageDetailsRead> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ImageDetailsRead 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: // IMAGE_BASE_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CURRENT_VERSION_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.currentVersionId = iprot.readString(); + struct.setCurrentVersionIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // VERSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list34 = iprot.readListBegin(); + struct.versions = new ArrayList<ImageVersionDetails>(_list34.size); + for (int _i35 = 0; _i35 < _list34.size; ++_i35) + { + ImageVersionDetails _elem36; + _elem36 = new ImageVersionDetails(); + _elem36.read(iprot); + struct.versions.add(_elem36); + } + iprot.readListEnd(); + } + struct.setVersionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // IMAGE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imageName = iprot.readString(); + struct.setImageNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DESCRIPTION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.description = iprot.readString(); + struct.setDescriptionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // TAGS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list37 = iprot.readListBegin(); + struct.tags = new ArrayList<String>(_list37.size); + for (int _i38 = 0; _i38 < _list37.size; ++_i38) + { + String _elem39; + _elem39 = iprot.readString(); + struct.tags.add(_elem39); + } + iprot.readListEnd(); + } + struct.setTagsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // SOFTWARE + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list40 = iprot.readListBegin(); + struct.software = new ArrayList<String>(_list40.size); + for (int _i41 = 0; _i41 < _list40.size; ++_i41) + { + String _elem42; + _elem42 = iprot.readString(); + struct.software.add(_elem42); + } + iprot.readListEnd(); + } + struct.setSoftwareIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // OS_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.osId = iprot.readI32(); + struct.setOsIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // VIRT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.virtId = iprot.readString(); + struct.setVirtIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // UPDATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.updateTime = iprot.readI64(); + struct.setUpdateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // OWNER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.ownerId = iprot.readString(); + struct.setOwnerIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // UPDATER_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.updaterId = iprot.readString(); + struct.setUpdaterIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // SHARE_MODE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.shareMode = ShareMode.findByValue(iprot.readI32()); + struct.setShareModeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // IS_TEMPLATE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isTemplate = iprot.readBool(); + struct.setIsTemplateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // DEFAULT_PERMISSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.defaultPermissions = new ImagePermissions(); + struct.defaultPermissions.read(iprot); + struct.setDefaultPermissionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 17: // USER_PERMISSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.userPermissions = new ImagePermissions(); + struct.userPermissions.read(iprot); + struct.setUserPermissionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ImageDetailsRead struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.imageBaseId != null) { + oprot.writeFieldBegin(IMAGE_BASE_ID_FIELD_DESC); + oprot.writeString(struct.imageBaseId); + oprot.writeFieldEnd(); + } + if (struct.currentVersionId != null) { + oprot.writeFieldBegin(CURRENT_VERSION_ID_FIELD_DESC); + oprot.writeString(struct.currentVersionId); + oprot.writeFieldEnd(); + } + if (struct.versions != null) { + oprot.writeFieldBegin(VERSIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.versions.size())); + for (ImageVersionDetails _iter43 : struct.versions) + { + _iter43.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.imageName != null) { + oprot.writeFieldBegin(IMAGE_NAME_FIELD_DESC); + oprot.writeString(struct.imageName); + oprot.writeFieldEnd(); + } + if (struct.description != null) { + oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); + oprot.writeString(struct.description); + oprot.writeFieldEnd(); + } + if (struct.tags != null) { + oprot.writeFieldBegin(TAGS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tags.size())); + for (String _iter44 : struct.tags) + { + oprot.writeString(_iter44); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.software != null) { + oprot.writeFieldBegin(SOFTWARE_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.software.size())); + for (String _iter45 : struct.software) + { + oprot.writeString(_iter45); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(OS_ID_FIELD_DESC); + oprot.writeI32(struct.osId); + oprot.writeFieldEnd(); + if (struct.virtId != null) { + oprot.writeFieldBegin(VIRT_ID_FIELD_DESC); + oprot.writeString(struct.virtId); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI64(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC); + oprot.writeI64(struct.updateTime); + oprot.writeFieldEnd(); + if (struct.ownerId != null) { + oprot.writeFieldBegin(OWNER_ID_FIELD_DESC); + oprot.writeString(struct.ownerId); + oprot.writeFieldEnd(); + } + if (struct.updaterId != null) { + oprot.writeFieldBegin(UPDATER_ID_FIELD_DESC); + oprot.writeString(struct.updaterId); + oprot.writeFieldEnd(); + } + if (struct.shareMode != null) { + oprot.writeFieldBegin(SHARE_MODE_FIELD_DESC); + oprot.writeI32(struct.shareMode.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_TEMPLATE_FIELD_DESC); + oprot.writeBool(struct.isTemplate); + oprot.writeFieldEnd(); + if (struct.defaultPermissions != null) { + oprot.writeFieldBegin(DEFAULT_PERMISSIONS_FIELD_DESC); + struct.defaultPermissions.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.userPermissions != null) { + if (struct.isSetUserPermissions()) { + oprot.writeFieldBegin(USER_PERMISSIONS_FIELD_DESC); + struct.userPermissions.write(oprot); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ImageDetailsReadTupleSchemeFactory implements SchemeFactory { + public ImageDetailsReadTupleScheme getScheme() { + return new ImageDetailsReadTupleScheme(); + } + } + + private static class ImageDetailsReadTupleScheme extends TupleScheme<ImageDetailsRead> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ImageDetailsRead struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetImageBaseId()) { + optionals.set(0); + } + if (struct.isSetCurrentVersionId()) { + optionals.set(1); + } + if (struct.isSetVersions()) { + optionals.set(2); + } + if (struct.isSetImageName()) { + optionals.set(3); + } + if (struct.isSetDescription()) { + optionals.set(4); + } + if (struct.isSetTags()) { + optionals.set(5); + } + if (struct.isSetSoftware()) { + optionals.set(6); + } + if (struct.isSetOsId()) { + optionals.set(7); + } + if (struct.isSetVirtId()) { + optionals.set(8); + } + if (struct.isSetCreateTime()) { + optionals.set(9); + } + if (struct.isSetUpdateTime()) { + optionals.set(10); + } + if (struct.isSetOwnerId()) { + optionals.set(11); + } + if (struct.isSetUpdaterId()) { + optionals.set(12); + } + if (struct.isSetShareMode()) { + optionals.set(13); + } + if (struct.isSetIsTemplate()) { + optionals.set(14); + } + if (struct.isSetDefaultPermissions()) { + optionals.set(15); + } + if (struct.isSetUserPermissions()) { + optionals.set(16); + } + oprot.writeBitSet(optionals, 17); + if (struct.isSetImageBaseId()) { + oprot.writeString(struct.imageBaseId); + } + if (struct.isSetCurrentVersionId()) { + oprot.writeString(struct.currentVersionId); + } + if (struct.isSetVersions()) { + { + oprot.writeI32(struct.versions.size()); + for (ImageVersionDetails _iter46 : struct.versions) + { + _iter46.write(oprot); + } + } + } + if (struct.isSetImageName()) { + oprot.writeString(struct.imageName); + } + if (struct.isSetDescription()) { + oprot.writeString(struct.description); + } + if (struct.isSetTags()) { + { + oprot.writeI32(struct.tags.size()); + for (String _iter47 : struct.tags) + { + oprot.writeString(_iter47); + } + } + } + if (struct.isSetSoftware()) { + { + oprot.writeI32(struct.software.size()); + for (String _iter48 : struct.software) + { + oprot.writeString(_iter48); + } + } + } + if (struct.isSetOsId()) { + oprot.writeI32(struct.osId); + } + if (struct.isSetVirtId()) { + oprot.writeString(struct.virtId); + } + if (struct.isSetCreateTime()) { + oprot.writeI64(struct.createTime); + } + if (struct.isSetUpdateTime()) { + oprot.writeI64(struct.updateTime); + } + if (struct.isSetOwnerId()) { + oprot.writeString(struct.ownerId); + } + if (struct.isSetUpdaterId()) { + oprot.writeString(struct.updaterId); + } + if (struct.isSetShareMode()) { + oprot.writeI32(struct.shareMode.getValue()); + } + if (struct.isSetIsTemplate()) { + oprot.writeBool(struct.isTemplate); + } + if (struct.isSetDefaultPermissions()) { + struct.defaultPermissions.write(oprot); + } + if (struct.isSetUserPermissions()) { + struct.userPermissions.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ImageDetailsRead struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(17); + if (incoming.get(0)) { + struct.imageBaseId = iprot.readString(); + struct.setImageBaseIdIsSet(true); + } + if (incoming.get(1)) { + struct.currentVersionId = iprot.readString(); + struct.setCurrentVersionIdIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list49 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.versions = new ArrayList<ImageVersionDetails>(_list49.size); + for (int _i50 = 0; _i50 < _list49.size; ++_i50) + { + ImageVersionDetails _elem51; + _elem51 = new ImageVersionDetails(); + _elem51.read(iprot); + struct.versions.add(_elem51); + } + } + struct.setVersionsIsSet(true); + } + if (incoming.get(3)) { + struct.imageName = iprot.readString(); + struct.setImageNameIsSet(true); + } + if (incoming.get(4)) { + struct.description = iprot.readString(); + struct.setDescriptionIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TList _list52 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tags = new ArrayList<String>(_list52.size); + for (int _i53 = 0; _i53 < _list52.size; ++_i53) + { + String _elem54; + _elem54 = iprot.readString(); + struct.tags.add(_elem54); + } + } + struct.setTagsIsSet(true); + } + if (incoming.get(6)) { + { + org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.software = new ArrayList<String>(_list55.size); + for (int _i56 = 0; _i56 < _list55.size; ++_i56) + { + String _elem57; + _elem57 = iprot.readString(); + struct.software.add(_elem57); + } + } + struct.setSoftwareIsSet(true); + } + if (incoming.get(7)) { + struct.osId = iprot.readI32(); + struct.setOsIdIsSet(true); + } + if (incoming.get(8)) { + struct.virtId = iprot.readString(); + struct.setVirtIdIsSet(true); + } + if (incoming.get(9)) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } + if (incoming.get(10)) { + struct.updateTime = iprot.readI64(); + struct.setUpdateTimeIsSet(true); + } + if (incoming.get(11)) { + struct.ownerId = iprot.readString(); + struct.setOwnerIdIsSet(true); + } + if (incoming.get(12)) { + struct.updaterId = iprot.readString(); + struct.setUpdaterIdIsSet(true); + } + if (incoming.get(13)) { + struct.shareMode = ShareMode.findByValue(iprot.readI32()); + struct.setShareModeIsSet(true); + } + if (incoming.get(14)) { + struct.isTemplate = iprot.readBool(); + struct.setIsTemplateIsSet(true); + } + if (incoming.get(15)) { + struct.defaultPermissions = new ImagePermissions(); + struct.defaultPermissions.read(iprot); + struct.setDefaultPermissionsIsSet(true); + } + if (incoming.get(16)) { + struct.userPermissions = new ImagePermissions(); + struct.userPermissions.read(iprot); + struct.setUserPermissionsIsSet(true); + } + } + } + +} + |