From 746af5d07d2b7745618eb75ef3757d150ab02042 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 17 Dec 2021 17:03:51 +0100 Subject: Update generated Thrift API to version 0.15.0 --- .../bwlp/thrift/iface/ImageDetailsRead.java | 467 ++++++++++----------- 1 file changed, 217 insertions(+), 250 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java') diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java index e4e7eac..62e6854 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * 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; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-04") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17") public class ImageDetailsRead implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageDetailsRead"); @@ -55,32 +28,29 @@ public class ImageDetailsRead implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ImageDetailsReadStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ImageDetailsReadTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImageDetailsReadStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImageDetailsReadTupleSchemeFactory(); - public String imageBaseId; // required - public String latestVersionId; // required - public List versions; // required - public String imageName; // required - public String description; // required - public List tags; // required + public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String latestVersionId; // required + public @org.apache.thrift.annotation.Nullable java.util.List versions; // required + public @org.apache.thrift.annotation.Nullable java.lang.String imageName; // required + public @org.apache.thrift.annotation.Nullable java.lang.String description; // required + public @org.apache.thrift.annotation.Nullable java.util.List tags; // required public int osId; // required - public String virtId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String virtId; // required public long createTime; // required public long updateTime; // required - public String ownerId; // required - public String updaterId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String ownerId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String updaterId; // required /** * * @see ShareMode */ - public ShareMode shareMode; // required + public @org.apache.thrift.annotation.Nullable ShareMode shareMode; // required public boolean isTemplate; // required - public ImagePermissions defaultPermissions; // required - public ImagePermissions userPermissions; // optional + public @org.apache.thrift.annotation.Nullable ImagePermissions defaultPermissions; // required + public @org.apache.thrift.annotation.Nullable 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 { @@ -105,10 +75,10 @@ public class ImageDetailsRead implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -116,6 +86,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase metaDataMap; + public static final java.util.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); + 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.LATEST_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("latestVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -233,7 +205,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase versions, - String imageName, - String description, - List tags, + java.lang.String imageBaseId, + java.lang.String latestVersionId, + java.util.List versions, + java.lang.String imageName, + java.lang.String description, + java.util.List tags, int osId, - String virtId, + java.lang.String virtId, long createTime, long updateTime, - String ownerId, - String updaterId, + java.lang.String ownerId, + java.lang.String updaterId, ShareMode shareMode, boolean isTemplate, ImagePermissions defaultPermissions) @@ -291,7 +263,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase __this__versions = new ArrayList(other.versions.size()); + java.util.List __this__versions = new java.util.ArrayList(other.versions.size()); for (ImageVersionDetails other_element : other.versions) { __this__versions.add(new ImageVersionDetails(other_element)); } @@ -304,7 +276,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase __this__tags = new ArrayList(other.tags); + java.util.List __this__tags = new java.util.ArrayList(other.tags); this.tags = __this__tags; } this.osId = other.osId; @@ -359,11 +331,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase getVersionsIterator() { return (this.versions == null) ? null : this.versions.iterator(); } public void addToVersions(ImageVersionDetails elem) { if (this.versions == null) { - this.versions = new ArrayList(); + this.versions = new java.util.ArrayList(); } this.versions.add(elem); } - public List getVersions() { + @org.apache.thrift.annotation.Nullable + public java.util.List getVersions() { return this.versions; } - public ImageDetailsRead setVersions(List versions) { + public ImageDetailsRead setVersions(@org.apache.thrift.annotation.Nullable java.util.List versions) { this.versions = versions; return this; } @@ -446,11 +422,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase getTagsIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTagsIterator() { return (this.tags == null) ? null : this.tags.iterator(); } - public void addToTags(String elem) { + public void addToTags(java.lang.String elem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new java.util.ArrayList(); } this.tags.add(elem); } - public List getTags() { + @org.apache.thrift.annotation.Nullable + public java.util.List getTags() { return this.tags; } - public ImageDetailsRead setTags(List tags) { + public ImageDetailsRead setTags(@org.apache.thrift.annotation.Nullable java.util.List tags) { this.tags = tags; return this; } @@ -544,23 +524,24 @@ public class ImageDetailsRead implements org.apache.thrift.TBase)value); + setVersions((java.util.List)value); } break; @@ -807,7 +793,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase)value); + setTags((java.util.List)value); } break; @@ -831,7 +817,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase list = new ArrayList(); - - boolean present_imageBaseId = true && (isSetImageBaseId()); - list.add(present_imageBaseId); - if (present_imageBaseId) - list.add(imageBaseId); - - boolean present_latestVersionId = true && (isSetLatestVersionId()); - list.add(present_latestVersionId); - if (present_latestVersionId) - list.add(latestVersionId); - - boolean present_versions = true && (isSetVersions()); - list.add(present_versions); - if (present_versions) - list.add(versions); - - boolean present_imageName = true && (isSetImageName()); - list.add(present_imageName); - if (present_imageName) - list.add(imageName); - - boolean present_description = true && (isSetDescription()); - list.add(present_description); - if (present_description) - list.add(description); - - boolean present_tags = true && (isSetTags()); - list.add(present_tags); - if (present_tags) - list.add(tags); - - boolean present_osId = true; - list.add(present_osId); - if (present_osId) - list.add(osId); - - boolean present_virtId = true && (isSetVirtId()); - list.add(present_virtId); - if (present_virtId) - list.add(virtId); - - boolean present_createTime = true; - list.add(present_createTime); - if (present_createTime) - list.add(createTime); - - boolean present_updateTime = true; - list.add(present_updateTime); - if (present_updateTime) - list.add(updateTime); - - boolean present_ownerId = true && (isSetOwnerId()); - list.add(present_ownerId); - if (present_ownerId) - list.add(ownerId); - - boolean present_updaterId = true && (isSetUpdaterId()); - list.add(present_updaterId); - if (present_updaterId) - list.add(updaterId); - - boolean present_shareMode = true && (isSetShareMode()); - list.add(present_shareMode); - if (present_shareMode) - list.add(shareMode.getValue()); - - boolean present_isTemplate = true; - list.add(present_isTemplate); - if (present_isTemplate) - list.add(isTemplate); - - boolean present_defaultPermissions = true && (isSetDefaultPermissions()); - list.add(present_defaultPermissions); - if (present_defaultPermissions) - list.add(defaultPermissions); - - boolean present_userPermissions = true && (isSetUserPermissions()); - list.add(present_userPermissions); - if (present_userPermissions) - list.add(userPermissions); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287); + if (isSetImageBaseId()) + hashCode = hashCode * 8191 + imageBaseId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetLatestVersionId()) ? 131071 : 524287); + if (isSetLatestVersionId()) + hashCode = hashCode * 8191 + latestVersionId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetVersions()) ? 131071 : 524287); + if (isSetVersions()) + hashCode = hashCode * 8191 + versions.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 + ((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 + org.apache.thrift.TBaseHelper.hashCode(createTime); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(updateTime); + + hashCode = hashCode * 8191 + ((isSetOwnerId()) ? 131071 : 524287); + if (isSetOwnerId()) + hashCode = hashCode * 8191 + ownerId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetUpdaterId()) ? 131071 : 524287); + if (isSetUpdaterId()) + hashCode = hashCode * 8191 + updaterId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetShareMode()) ? 131071 : 524287); + if (isSetShareMode()) + hashCode = hashCode * 8191 + shareMode.getValue(); + + hashCode = hashCode * 8191 + ((isTemplate) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetDefaultPermissions()) ? 131071 : 524287); + if (isSetDefaultPermissions()) + hashCode = hashCode * 8191 + defaultPermissions.hashCode(); + + hashCode = hashCode * 8191 + ((isSetUserPermissions()) ? 131071 : 524287); + if (isSetUserPermissions()) + hashCode = hashCode * 8191 + userPermissions.hashCode(); + + return hashCode; } @Override @@ -1262,7 +1225,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase { + private static class ImageDetailsReadStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, ImageDetailsRead struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1626,8 +1590,8 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list58.size); - ImageVersionDetails _elem59; + struct.versions = new java.util.ArrayList(_list58.size); + @org.apache.thrift.annotation.Nullable ImageVersionDetails _elem59; for (int _i60 = 0; _i60 < _list58.size; ++_i60) { _elem59 = new ImageVersionDetails(); @@ -1661,8 +1625,8 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list61.size); - String _elem62; + struct.tags = new java.util.ArrayList(_list61.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem62; for (int _i63 = 0; _i63 < _list61.size; ++_i63) { _elem62 = iprot.readString(); @@ -1803,7 +1767,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase { + private static class ImageDetailsReadTupleScheme extends org.apache.thrift.scheme.TupleScheme { @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(); + 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); } @@ -1951,7 +1915,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list68.size); - ImageVersionDetails _elem69; + org.apache.thrift.protocol.TList _list68 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.versions = new java.util.ArrayList(_list68.size); + @org.apache.thrift.annotation.Nullable ImageVersionDetails _elem69; for (int _i70 = 0; _i70 < _list68.size; ++_i70) { _elem69 = new ImageVersionDetails(); @@ -2025,9 +1989,9 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list71.size); - String _elem72; + org.apache.thrift.protocol.TList _list71 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.tags = new java.util.ArrayList(_list71.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem72; for (int _i73 = 0; _i73 < _list71.size; ++_i73) { _elem72 = iprot.readString(); @@ -2081,5 +2045,8 @@ public class ImageDetailsRead implements org.apache.thrift.TBase 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(); + } } -- cgit v1.2.3-55-g7522