/**
* Autogenerated by Thrift Compiler (0.15.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.openslx.bwlp.thrift.iface;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishData, ImagePublishData._Fields>, java.io.Serializable, Cloneable, Comparable<ImagePublishData> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImagePublishData");
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 IMAGE_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("imageVersionId", org.apache.thrift.protocol.TType.STRING, (short)2);
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)3);
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)4);
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)5);
private static final org.apache.thrift.protocol.TField UPLOADER_FIELD_DESC = new org.apache.thrift.protocol.TField("uploader", org.apache.thrift.protocol.TType.STRUCT, (short)6);
private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSize", org.apache.thrift.protocol.TType.I64, (short)7);
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)8);
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)9);
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)10);
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)11);
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)12);
private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRUCT, (short)13);
private static final org.apache.thrift.protocol.TField MACHINE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("machineDescription", org.apache.thrift.protocol.TType.STRING, (short)14);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImagePublishDataStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImagePublishDataTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required
public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required
public @org.apache.thrift.annotation.Nullable java.lang.String imageName; // required
public @org.apache.thrift.annotation.Nullable java.lang.String description; // required
public long createTime; // required
public @org.apache.thrift.annotation.Nullable UserInfo uploader; // required
public long fileSize; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> software; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> tags; // required
public int osId; // required
public @org.apache.thrift.annotation.Nullable java.lang.String virtId; // required
public boolean isTemplate; // required
public @org.apache.thrift.annotation.Nullable UserInfo owner; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
IMAGE_BASE_ID((short)1, "imageBaseId"),
IMAGE_VERSION_ID((short)2, "imageVersionId"),
IMAGE_NAME((short)3, "imageName"),
DESCRIPTION((short)4, "description"),
CREATE_TIME((short)5, "createTime"),
UPLOADER((short)6, "uploader"),
FILE_SIZE((short)7, "fileSize"),
SOFTWARE((short)8, "software"),
TAGS((short)9, "tags"),
OS_ID((short)10, "osId"),
VIRT_ID((short)11, "virtId"),
IS_TEMPLATE((short)12, "isTemplate"),
OWNER((short)13, "owner"),
MACHINE_DESCRIPTION((short)14, "machineDescription");
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: // IMAGE_BASE_ID
return IMAGE_BASE_ID;
case 2: // IMAGE_VERSION_ID
return IMAGE_VERSION_ID;
case 3: // IMAGE_NAME
return IMAGE_NAME;
case 4: // DESCRIPTION
return DESCRIPTION;
case 5: // CREATE_TIME
return CREATE_TIME;
case 6: // UPLOADER
return UPLOADER;
case 7: // FILE_SIZE
return FILE_SIZE;
case 8: // SOFTWARE
return SOFTWARE;
case 9: // TAGS
return TAGS;
case 10: // OS_ID
return OS_ID;
case 11: // VIRT_ID
return VIRT_ID;
case 12: // IS_TEMPLATE
return IS_TEMPLATE;
case 13: // OWNER
return OWNER;
case 14: // MACHINE_DESCRIPTION
return MACHINE_DESCRIPTION;
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;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __CREATETIME_ISSET_ID = 0;
private static final int __FILESIZE_ISSET_ID = 1;
private static final int __OSID_ISSET_ID = 2;
private static final int __ISTEMPLATE_ISSET_ID = 3;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.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.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
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.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.UPLOADER, new org.apache.thrift.meta_data.FieldMetaData("uploader", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fileSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
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.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.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.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.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
tmpMap.put(_Fields.MACHINE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("machineDescription", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImagePublishData.class, metaDataMap);
}
public ImagePublishData() {
}
public ImagePublishData(
java.lang.String imageBaseId,
java.lang.String imageVersionId,
java.lang.String imageName,
java.lang.String description,
long createTime,
UserInfo uploader,
long fileSize,
java.util.List<java.lang.String> software,
java.util.List<java.lang.String> tags,
int osId,
java.lang.String virtId,
boolean isTemplate,
UserInfo owner,
java.nio.ByteBuffer machineDescription)
{
this();
this.imageBaseId = imageBaseId;
this.imageVersionId = imageVersionId;
this.imageName = imageName;
this.description = description;
this.createTime = createTime;
setCreateTimeIsSet(true);
this.uploader = uploader;
this.fileSize = fileSize;
setFileSizeIsSet(true);
this.software = software;
this.tags = tags;
this.osId = osId;
setOsIdIsSet(true);
this.virtId = virtId;
this.isTemplate = isTemplate;
setIsTemplateIsSet(true);
this.owner = owner;
this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ImagePublishData(ImagePublishData other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetImageBaseId()) {
this.imageBaseId = other.imageBaseId;
}
if (other.isSetImageVersionId()) {
this.imageVersionId = other.imageVersionId;
}
if (other.isSetImageName()) {
this.imageName = other.imageName;
}
if (other.isSetDescription()) {
this.description = other.description;
}
this.createTime = other.createTime;
if (other.isSetUploader()) {
this.uploader = new UserInfo(other.uploader);
}
this.fileSize = other.fileSize;
if (other.isSetSoftware()) {
java.util.List<java.lang.String> __this__software = new java.util.ArrayList<java.lang.String>(other.software);
this.software = __this__software;
}
if (other.isSetTags()) {
java.util.List<java.lang.String> __this__tags = new java.util.ArrayList<java.lang.String>(other.tags);
this.tags = __this__tags;
}
this.osId = other.osId;
if (other.isSetVirtId()) {
this.virtId = other.virtId;
}
this.isTemplate = other.isTemplate;
if (other.isSetOwner()) {
this.owner = new UserInfo(other.owner);
}
if (other.isSetMachineDescription()) {
this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(other.machineDescription);
}
}
public ImagePublishData deepCopy() {
return new ImagePublishData(this);
}
@Override
public void clear() {
this.imageBaseId = null;
this.imageVersionId = null;
this.imageName = null;
this.description = null;
setCreateTimeIsSet(false);
this.createTime = 0;
this.uploader = null;
setFileSizeIsSet(false);
this.fileSize = 0;
this.software = null;
this.tags = null;
setOsIdIsSet(false);
this.osId = 0;
this.virtId = null;
setIsTemplateIsSet(false);
this.isTemplate = false;
this.owner = null;
this.machineDescription = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
public ImagePublishData setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.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;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
public ImagePublishData setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
public void unsetImageVersionId() {
this.imageVersionId = null;
}
/** Returns true if field imageVersionId is set (has been assigned a value) and false otherwise */
public boolean isSetImageVersionId() {
return this.imageVersionId != null;
}
public void setImageVersionIdIsSet(boolean value) {
if (!value) {
this.imageVersionId = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getImageName() {
return this.imageName;
}
public ImagePublishData setImageName(@org.apache.thrift.annotation.Nullable java.lang.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;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDescription() {
return this.description;
}
public ImagePublishData setDescription(@org.apache.thrift.annotation.Nullable java.lang.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 long getCreateTime() {
return this.createTime;
}
public ImagePublishData setCreateTime(long createTime) {
this.createTime = createTime;
setCreateTimeIsSet(true);
return this;
}
public void unsetCreateTime() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public UserInfo getUploader() {
return this.uploader;
}
public ImagePublishData setUploader(@org.apache.thrift.annotation.Nullable UserInfo uploader) {
this.uploader = uploader;
return this;
}
public void unsetUploader() {
this.uploader = null;
}
/** Returns true if field uploader is set (has been assigned a value) and false otherwise */
public boolean isSetUploader() {
return this.uploader != null;
}
public void setUploaderIsSet(boolean value) {
if (!value) {
this.uploader = null;
}
}
public long getFileSize() {
return this.fileSize;
}
public ImagePublishData setFileSize(long fileSize) {
this.fileSize = fileSize;
setFileSizeIsSet(true);
return this;
}
public void unsetFileSize() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
}
/** Returns true if field fileSize is set (has been assigned a value) and false otherwise */
public boolean isSetFileSize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
}
public void setFileSizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
}
public int getSoftwareSize() {
return (this.software == null) ? 0 : this.software.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getSoftwareIterator() {
return (this.software == null) ? null : this.software.iterator();
}
public void addToSoftware(java.lang.String elem) {
if (this.software == null) {
this.software = new java.util.ArrayList<java.lang.String>();
}
this.software.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getSoftware() {
return this.software;
}
public ImagePublishData setSoftware(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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 getTagsSize() {
return (this.tags == null) ? 0 : this.tags.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getTagsIterator() {
return (this.tags == null) ? null : this.tags.iterator();
}
public void addToTags(java.lang.String elem) {
if (this.tags == null) {
this.tags = new java.util.ArrayList<java.lang.String>();
}
this.tags.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getTags() {
return this.tags;
}
public ImagePublishData setTags(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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 getOsId() {
return this.osId;
}
public ImagePublishData setOsId(int osId) {
this.osId = osId;
setOsIdIsSet(true);
return this;
}
public void unsetOsId() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
}
public void setOsIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getVirtId() {
return this.virtId;
}
public ImagePublishData setVirtId(@org.apache.thrift.annotation.Nullable java.lang.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 boolean isIsTemplate() {
return this.isTemplate;
}
public ImagePublishData setIsTemplate(boolean isTemplate) {
this.isTemplate = isTemplate;
setIsTemplateIsSet(true);
return this;
}
public void unsetIsTemplate() {
__isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
}
public void setIsTemplateIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public UserInfo getOwner() {
return this.owner;
}
public ImagePublishData setOwner(@org.apache.thrift.annotation.Nullable UserInfo owner) {
this.owner = owner;
return this;
}
public void unsetOwner() {
this.owner = null;
}
/** Returns true if field owner is set (has been assigned a value) and false otherwise */
public boolean isSetOwner() {
return this.owner != null;
}
public void setOwnerIsSet(boolean value) {
if (!value) {
this.owner = null;
}
}
public byte[] getMachineDescription() {
setMachineDescription(org.apache.thrift.TBaseHelper.rightSize(machineDescription));
return machineDescription == null ? null : machineDescription.array();
}
public java.nio.ByteBuffer bufferForMachineDescription() {
return org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
}
public ImagePublishData setMachineDescription(byte[] machineDescription) {
this.machineDescription = machineDescription == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(machineDescription.clone());
return this;
}
public ImagePublishData setMachineDescription(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription) {
this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
return this;
}
public void unsetMachineDescription() {
this.machineDescription = null;
}
/** Returns true if field machineDescription is set (has been assigned a value) and false otherwise */
public boolean isSetMachineDescription() {
return this.machineDescription != null;
}
public void setMachineDescriptionIsSet(boolean value) {
if (!value) {
this.machineDescription = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case IMAGE_BASE_ID:
if (value == null) {
unsetImageBaseId();
} else {
setImageBaseId((java.lang.String)value);
}
break;
case IMAGE_VERSION_ID:
if (value == null) {
unsetImageVersionId();
} else {
setImageVersionId((java.lang.String)value);
}
break;
case IMAGE_NAME:
if (value == null) {
unsetImageName();
} else {
setImageName((java.lang.String)value);
}
break;
case DESCRIPTION:
if (value == null) {
unsetDescription();
} else {
setDescription((java.lang.String)value);
}
break;
case CREATE_TIME:
if (value == null) {
unsetCreateTime();
} else {
setCreateTime((java.lang.Long)value);
}
break;
case UPLOADER:
if (value == null) {
unsetUploader();
} else {
setUploader((UserInfo)value);
}
break;
case FILE_SIZE:
if (value == null) {
unsetFileSize();
} else {
setFileSize((java.lang.Long)value);
}
break;
case SOFTWARE:
if (value == null) {
unsetSoftware();
} else {
setSoftware((java.util.List<java.lang.String>)value);
}
break;
case TAGS:
if (value == null) {
unsetTags();
} else {
setTags((java.util.List<java.lang.String>)value);
}
break;
case OS_ID:
if (value == null) {
unsetOsId();
} else {
setOsId((java.lang.Integer)value);
}
break;
case VIRT_ID:
if (value == null) {
unsetVirtId();
} else {
setVirtId((java.lang.String)value);
}
break;
case IS_TEMPLATE:
if (value == null) {
unsetIsTemplate();
} else {
setIsTemplate((java.lang.Boolean)value);
}
break;
case OWNER:
if (value == null) {
unsetOwner();
} else {
setOwner((UserInfo)value);
}
break;
case MACHINE_DESCRIPTION:
if (value == null) {
unsetMachineDescription();
} else {
if (value instanceof byte[]) {
setMachineDescription((byte[])value);
} else {
setMachineDescription((java.nio.ByteBuffer)value);
}
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IMAGE_BASE_ID:
return getImageBaseId();
case IMAGE_VERSION_ID:
return getImageVersionId();
case IMAGE_NAME:
return getImageName();
case DESCRIPTION:
return getDescription();
case CREATE_TIME:
return getCreateTime();
case UPLOADER:
return getUploader();
case FILE_SIZE:
return getFileSize();
case SOFTWARE:
return getSoftware();
case TAGS:
return getTags();
case OS_ID:
return getOsId();
case VIRT_ID:
return getVirtId();
case IS_TEMPLATE:
return isIsTemplate();
case OWNER:
return getOwner();
case MACHINE_DESCRIPTION:
return getMachineDescription();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case IMAGE_BASE_ID:
return isSetImageBaseId();
case IMAGE_VERSION_ID:
return isSetImageVersionId();
case IMAGE_NAME:
return isSetImageName();
case DESCRIPTION:
return isSetDescription();
case CREATE_TIME:
return isSetCreateTime();
case UPLOADER:
return isSetUploader();
case FILE_SIZE:
return isSetFileSize();
case SOFTWARE:
return isSetSoftware();
case TAGS:
return isSetTags();
case OS_ID:
return isSetOsId();
case VIRT_ID:
return isSetVirtId();
case IS_TEMPLATE:
return isSetIsTemplate();
case OWNER:
return isSetOwner();
case MACHINE_DESCRIPTION:
return isSetMachineDescription();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof ImagePublishData)
return this.equals((ImagePublishData)that);
return false;
}
public boolean equals(ImagePublishData that) {
if (that == null)
return false;
if (this == that)
return true;
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_imageVersionId = true && this.isSetImageVersionId();
boolean that_present_imageVersionId = true && that.isSetImageVersionId();
if (this_present_imageVersionId || that_present_imageVersionId) {
if (!(this_present_imageVersionId && that_present_imageVersionId))
return false;
if (!this.imageVersionId.equals(that.imageVersionId))
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_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_uploader = true && this.isSetUploader();
boolean that_present_uploader = true && that.isSetUploader();
if (this_present_uploader || that_present_uploader) {
if (!(this_present_uploader && that_present_uploader))
return false;
if (!this.uploader.equals(that.uploader))
return false;
}
boolean this_present_fileSize = true;
boolean that_present_fileSize = true;
if (this_present_fileSize || that_present_fileSize) {
if (!(this_present_fileSize && that_present_fileSize))
return false;
if (this.fileSize != that.fileSize)
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_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_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_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_owner = true && this.isSetOwner();
boolean that_present_owner = true && that.isSetOwner();
if (this_present_owner || that_present_owner) {
if (!(this_present_owner && that_present_owner))
return false;
if (!this.owner.equals(that.owner))
return false;
}
boolean this_present_machineDescription = true && this.isSetMachineDescription();
boolean that_present_machineDescription = true && that.isSetMachineDescription();
if (this_present_machineDescription || that_present_machineDescription) {
if (!(this_present_machineDescription && that_present_machineDescription))
return false;
if (!this.machineDescription.equals(that.machineDescription))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
if (isSetImageBaseId())
hashCode = hashCode * 8191 + imageBaseId.hashCode();
hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
if (isSetImageVersionId())
hashCode = hashCode * 8191 + imageVersionId.hashCode();
hashCode = hashCode * 8191 + ((isSetImageName()) ? 131071 : 524287);
if (isSetImageName())
hashCode = hashCode * 8191 + imageName.hashCode();
hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
if (isSetDescription())
hashCode = hashCode * 8191 + description.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createTime);
hashCode = hashCode * 8191 + ((isSetUploader()) ? 131071 : 524287);
if (isSetUploader())
hashCode = hashCode * 8191 + uploader.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fileSize);
hashCode = hashCode * 8191 + ((isSetSoftware()) ? 131071 : 524287);
if (isSetSoftware())
hashCode = hashCode * 8191 + software.hashCode();
hashCode = hashCode * 8191 + ((isSetTags()) ? 131071 : 524287);
if (isSetTags())
hashCode = hashCode * 8191 + tags.hashCode();
hashCode = hashCode * 8191 + osId;
hashCode = hashCode * 8191 + ((isSetVirtId()) ? 131071 : 524287);
if (isSetVirtId())
hashCode = hashCode * 8191 + virtId.hashCode();
hashCode = hashCode * 8191 + ((isTemplate) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetOwner()) ? 131071 : 524287);
if (isSetOwner())
hashCode = hashCode * 8191 + owner.hashCode();
hashCode = hashCode * 8191 + ((isSetMachineDescription()) ? 131071 : 524287);
if (isSetMachineDescription())
hashCode = hashCode * 8191 + machineDescription.hashCode();
return hashCode;
}
@Override
public int compareTo(ImagePublishData other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), 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 = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetImageVersionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageVersionId, other.imageVersionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetImageName(), 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 = java.lang.Boolean.compare(isSetDescription(), 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 = java.lang.Boolean.compare(isSetCreateTime(), 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 = java.lang.Boolean.compare(isSetUploader(), other.isSetUploader());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUploader()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uploader, other.uploader);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetFileSize(), other.isSetFileSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSoftware(), 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 = java.lang.Boolean.compare(isSetTags(), 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 = java.lang.Boolean.compare(isSetOsId(), 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 = java.lang.Boolean.compare(isSetVirtId(), 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 = java.lang.Boolean.compare(isSetIsTemplate(), 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 = java.lang.Boolean.compare(isSetOwner(), other.isSetOwner());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOwner()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMachineDescription(), other.isSetMachineDescription());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMachineDescription()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.machineDescription, other.machineDescription);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("ImagePublishData(");
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("imageVersionId:");
if (this.imageVersionId == null) {
sb.append("null");
} else {
sb.append(this.imageVersionId);
}
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("createTime:");
sb.append(this.createTime);
first = false;
if (!first) sb.append(", ");
sb.append("uploader:");
if (this.uploader == null) {
sb.append("null");
} else {
sb.append(this.uploader);
}
first = false;
if (!first) sb.append(", ");
sb.append("fileSize:");
sb.append(this.fileSize);
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("tags:");
if (this.tags == null) {
sb.append("null");
} else {
sb.append(this.tags);
}
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("isTemplate:");
sb.append(this.isTemplate);
first = false;
if (!first) sb.append(", ");
sb.append("owner:");
if (this.owner == null) {
sb.append("null");
} else {
sb.append(this.owner);
}
first = false;
if (!first) sb.append(", ");
sb.append("machineDescription:");
if (this.machineDescription == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.machineDescription, sb);
}
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 (uploader != null) {
uploader.validate();
}
if (owner != null) {
owner.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, 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 ImagePublishDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImagePublishDataStandardScheme getScheme() {
return new ImagePublishDataStandardScheme();
}
}
private static class ImagePublishDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImagePublishData> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ImagePublishData 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: // IMAGE_VERSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.imageVersionId = iprot.readString();
struct.setImageVersionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // 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 4: // 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 5: // 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 6: // UPLOADER
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.uploader = new UserInfo();
struct.uploader.read(iprot);
struct.setUploaderIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // FILE_SIZE
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.fileSize = iprot.readI64();
struct.setFileSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // SOFTWARE
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list74 = iprot.readListBegin();
struct.software = new java.util.ArrayList<java.lang.String>(_list74.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem75;
for (int _i76 = 0; _i76 < _list74.size; ++_i76)
{
_elem75 = iprot.readString();
struct.software.add(_elem75);
}
iprot.readListEnd();
}
struct.setSoftwareIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // TAGS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list77 = iprot.readListBegin();
struct.tags = new java.util.ArrayList<java.lang.String>(_list77.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem78;
for (int _i79 = 0; _i79 < _list77.size; ++_i79)
{
_elem78 = iprot.readString();
struct.tags.add(_elem78);
}
iprot.readListEnd();
}
struct.setTagsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // 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 11: // 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 12: // 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 13: // OWNER
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.owner = new UserInfo();
struct.owner.read(iprot);
struct.setOwnerIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // MACHINE_DESCRIPTION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.machineDescription = iprot.readBinary();
struct.setMachineDescriptionIsSet(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, ImagePublishData 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.imageVersionId != null) {
oprot.writeFieldBegin(IMAGE_VERSION_ID_FIELD_DESC);
oprot.writeString(struct.imageVersionId);
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();
}
oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
oprot.writeI64(struct.createTime);
oprot.writeFieldEnd();
if (struct.uploader != null) {
oprot.writeFieldBegin(UPLOADER_FIELD_DESC);
struct.uploader.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
oprot.writeI64(struct.fileSize);
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 (java.lang.String _iter80 : struct.software)
{
oprot.writeString(_iter80);
}
oprot.writeListEnd();
}
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 (java.lang.String _iter81 : struct.tags)
{
oprot.writeString(_iter81);
}
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(IS_TEMPLATE_FIELD_DESC);
oprot.writeBool(struct.isTemplate);
oprot.writeFieldEnd();
if (struct.owner != null) {
oprot.writeFieldBegin(OWNER_FIELD_DESC);
struct.owner.write(oprot);
oprot.writeFieldEnd();
}
if (struct.machineDescription != null) {
oprot.writeFieldBegin(MACHINE_DESCRIPTION_FIELD_DESC);
oprot.writeBinary(struct.machineDescription);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class ImagePublishDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImagePublishDataTupleScheme getScheme() {
return new ImagePublishDataTupleScheme();
}
}
private static class ImagePublishDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<ImagePublishData> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ImagePublishData 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.isSetImageBaseId()) {
optionals.set(0);
}
if (struct.isSetImageVersionId()) {
optionals.set(1);
}
if (struct.isSetImageName()) {
optionals.set(2);
}
if (struct.isSetDescription()) {
optionals.set(3);
}
if (struct.isSetCreateTime()) {
optionals.set(4);
}
if (struct.isSetUploader()) {
optionals.set(5);
}
if (struct.isSetFileSize()) {
optionals.set(6);
}
if (struct.isSetSoftware()) {
optionals.set(7);
}
if (struct.isSetTags()) {
optionals.set(8);
}
if (struct.isSetOsId()) {
optionals.set(9);
}
if (struct.isSetVirtId()) {
optionals.set(10);
}
if (struct.isSetIsTemplate()) {
optionals.set(11);
}
if (struct.isSetOwner()) {
optionals.set(12);
}
if (struct.isSetMachineDescription()) {
optionals.set(13);
}
oprot.writeBitSet(optionals, 14);
if (struct.isSetImageBaseId()) {
oprot.writeString(struct.imageBaseId);
}
if (struct.isSetImageVersionId()) {
oprot.writeString(struct.imageVersionId);
}
if (struct.isSetImageName()) {
oprot.writeString(struct.imageName);
}
if (struct.isSetDescription()) {
oprot.writeString(struct.description);
}
if (struct.isSetCreateTime()) {
oprot.writeI64(struct.createTime);
}
if (struct.isSetUploader()) {
struct.uploader.write(oprot);
}
if (struct.isSetFileSize()) {
oprot.writeI64(struct.fileSize);
}
if (struct.isSetSoftware()) {
{
oprot.writeI32(struct.software.size());
for (java.lang.String _iter82 : struct.software)
{
oprot.writeString(_iter82);
}
}
}
if (struct.isSetTags()) {
{
oprot.writeI32(struct.tags.size());
for (java.lang.String _iter83 : struct.tags)
{
oprot.writeString(_iter83);
}
}
}
if (struct.isSetOsId()) {
oprot.writeI32(struct.osId);
}
if (struct.isSetVirtId()) {
oprot.writeString(struct.virtId);
}
if (struct.isSetIsTemplate()) {
oprot.writeBool(struct.isTemplate);
}
if (struct.isSetOwner()) {
struct.owner.write(oprot);
}
if (struct.isSetMachineDescription()) {
oprot.writeBinary(struct.machineDescription);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ImagePublishData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(14);
if (incoming.get(0)) {
struct.imageBaseId = iprot.readString();
struct.setImageBaseIdIsSet(true);
}
if (incoming.get(1)) {
struct.imageVersionId = iprot.readString();
struct.setImageVersionIdIsSet(true);
}
if (incoming.get(2)) {
struct.imageName = iprot.readString();
struct.setImageNameIsSet(true);
}
if (incoming.get(3)) {
struct.description = iprot.readString();
struct.setDescriptionIsSet(true);
}
if (incoming.get(4)) {
struct.createTime = iprot.readI64();
struct.setCreateTimeIsSet(true);
}
if (incoming.get(5)) {
struct.uploader = new UserInfo();
struct.uploader.read(iprot);
struct.setUploaderIsSet(true);
}
if (incoming.get(6)) {
struct.fileSize = iprot.readI64();
struct.setFileSizeIsSet(true);
}
if (incoming.get(7)) {
{
org.apache.thrift.protocol.TList _list84 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.software = new java.util.ArrayList<java.lang.String>(_list84.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem85;
for (int _i86 = 0; _i86 < _list84.size; ++_i86)
{
_elem85 = iprot.readString();
struct.software.add(_elem85);
}
}
struct.setSoftwareIsSet(true);
}
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TList _list87 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.tags = new java.util.ArrayList<java.lang.String>(_list87.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem88;
for (int _i89 = 0; _i89 < _list87.size; ++_i89)
{
_elem88 = iprot.readString();
struct.tags.add(_elem88);
}
}
struct.setTagsIsSet(true);
}
if (incoming.get(9)) {
struct.osId = iprot.readI32();
struct.setOsIdIsSet(true);
}
if (incoming.get(10)) {
struct.virtId = iprot.readString();
struct.setVirtIdIsSet(true);
}
if (incoming.get(11)) {
struct.isTemplate = iprot.readBool();
struct.setIsTemplateIsSet(true);
}
if (incoming.get(12)) {
struct.owner = new UserInfo();
struct.owner.read(iprot);
struct.setOwnerIsSet(true);
}
if (incoming.get(13)) {
struct.machineDescription = iprot.readBinary();
struct.setMachineDescriptionIsSet(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();
}
}